An MCP proxy server that reduces Claude Code's context window usage by keeping tool definitions server-side and using AWS Bedrock's tool search to find relevant tools on-demand.
With 50+ tools from multiple MCP servers, Claude Code's context becomes bloated (~10,000 tokens). This proxy keeps tools server-side and only exposes 2 tools to Claude Code.
Claude Code → Tool Proxy (2 tools in context)
|
├── search_tools(query) → Bedrock tool search → returns tool names
├── call_tool(name, args) → routes to backend
|
└── Backend MCP servers (tools cached server-side)
- Node.js 20+
- AWS account with Bedrock access
- Claude Opus 4.5 model enabled in Bedrock
- AWS credentials configured
npm install
npm run buildConfigure backend MCP servers to proxy:
{
"backends": {
"aws-knowledge": {
"url": "https://knowledge-mcp.global.api.aws",
"type": "http"
},
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"type": "http",
"headers": {
"Authorization": "Bearer ${GITHUB_PAT}"
}
}
}
}Configure Claude Code to connect only to the proxy:
{
"mcpServers": {
"tool-proxy": {
"command": "npx",
"args": ["-y", "tool-search-bedrock-mcp"]
}
}
}The proxy exposes 2 tools:
Search for relevant tools by query:
{
"query": "I need to search AWS documentation",
"max_results": 5
}Returns tool names that can be used with call_tool.
Execute a discovered tool:
{
"tool_name": "aws-knowledge__aws___search_documentation",
"arguments": {
"search_phrase": "Lambda best practices"
}
}| Variable | Default | Description |
|---|---|---|
PROXY_CONFIG |
./proxy-config.json |
Path to backend config |
AWS_REGION |
us-west-2 |
AWS region for Bedrock |
AWS_PROFILE |
claude_code |
AWS credentials profile |
BEDROCK_MODEL_ID |
global.anthropic.claude-opus-4-5-20251101-v1:0 |
Bedrock model ID for tool search |
GITHUB_PAT |
- | GitHub personal access token for GitHub MCP backend (optional for demo) |