A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Files from demonstration video regarding setting up Agentcore Gateway MCP Server
Transform your AWS Lambda functions into secure MCP (Model Context Protocol) tools using AWS Bedrock Agent Core Gateway. This tutorial demonstrates how to build enterprise-ready AI agents with OAuth authentication and serverless scaling.
AI Agent → Agent Core Gateway → AWS Lambda Function
↑ ↑ ↑
Strands OAuth + MCP Business Logic
Framework Protocol
git clone https://github.com/yourusername/aws-agentcore-gateway
cd aws-agentcore-gateway
test_lambdalambda_function.pycreate_gateway_with_targets.pypython create_gateway_with_targets.py
python test_gateway.py
python agent_with_gateway.py
aws-agentcore-mcp-tutorial/
├── README.md
├── lambda_function.py # Lambda function code
├── create_gateway_with_targets.py # Gateway setup script
├── test_gateway.py # Gateway testing script
├── agent_with_gateway.py # Interactive AI agent
WeatherAndTimeTools___get_weather)context.client_context.custom['bedrockAgentCoreToolName']The setup script generates gateway_config.json with:
{
"gateway_url": "https://your-gateway-url.amazonaws.com/mcp",
"gateway_id": "your-gateway-id",
"client_id": "your-oauth-client-id",
"client_secret": "your-oauth-secret",
"cognito_info": {...},
"target_id": "your-target-id"
}
curl -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-X POST "YOUR_GATEWAY_URL" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "WeatherAndTimeTools___get_weather", "arguments": {"location": "Boston"}}}'
Cognito tokens expire after 1 hour. Use the provided utility:
# Refresh token and test gateway
source get_token_and_test.sh
| Aspect | Traditional MCP | Agent Core Gateway |
|---|---|---|
| Deployment | Manual server setup | One-command creation |
| Authentication | DIY implementation | Built-in OAuth |
| Scaling | Manual configuration | Automatic serverless |
| Security | Custom SSL/certs | Managed TLS |
| Monitoring | Custom metrics | CloudWatch integration |
| Cost | Always-on servers | Pay-per-use |
"Invalid Bearer token"
source get_token_and_test.sh to refresh"Unknown tool: unknown"
bedrockAgentCoreToolName key casingLambda changes not applied
# Check token validity
python -c "
import json
from bedrock_agentcore_starter_toolkit.operations.gateway.client import GatewayClient
with open('gateway_config.json', 'r') as f:
config = json.load(f)
client = GatewayClient(region_name='us-east-1')
token = client.get_access_token_for_cognito(config['cognito_info']['client_info'])
print('Token valid:', len(token) > 100)
"
# Test Lambda directly
aws lambda invoke --function-name test_lambda --payload '{"tool_name":"get_weather","location":"Boston"}' response.json
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Built with AWS Bedrock Agent Core Gateway - Transform any Lambda into secure AI tools
A Jetbrains IDE IntelliJ plugin aimed to provide coding agents the ability to leverage intelliJ's indexing of the codeba
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots