MCP Proxy is a powerful tool that connects to multiple MCP resource servers and aggregates their tools and capabilities into a unified interface. It supports various client types including stdio, SSE, and streamable-HTTP with customizable settings. The proxy provides real-time updates through Server-Sent Events (SSE) and offers flexible configuration options for managing multiple MCP resources efficiently.
MCP Proxy is a specialized server that aggregates multiple Model Context Protocol (MCP) resource servers and exposes them through a single HTTP endpoint. This allows AI assistants to access a wide range of tools from different sources without needing to connect to each one individually.
The Docker image comes with support for both npx
and uvx
MCP calling methods by default:
docker run -d -p 9090:9090 -v /path/to/config.json:/config/config.json ghcr.io/tbxark/mcp-proxy:latest
You can also specify a remote configuration:
docker run -d -p 9090:9090 ghcr.io/tbxark/mcp-proxy:latest --config https://example.com/path/to/config.json
If you have Go installed, you can install MCP Proxy directly:
go install github.com/TBXark/mcp-proxy@latest
For those who prefer to build from source:
git clone https://github.com/TBXark/mcp-proxy.git
cd mcp-proxy
make build
./build/mcp-proxy --config path/to/config.json
MCP Proxy uses a JSON configuration file to define its behavior and the MCP servers it connects to. Here's an example configuration:
{
"mcpProxy": {
"baseURL": "https://mcp.example.com",
"addr": ":9090",
"name": "MCP Proxy",
"version": "1.0.0",
"options": {
"panicIfInvalid": false,
"logEnabled": true,
"authTokens": [
"DefaultTokens"
]
}
},
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
},
"options": {
"toolFilter": {
"mode": "block",
"list": [
"create_or_update_file"
]
}
}
},
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch"
],
"options": {
"panicIfInvalid": true,
"logEnabled": false,
"authTokens": [
"SpecificTokens"
]
}
},
"amap": {
"url": "https://mcp.amap.com/sse?key=<YOUR_TOKEN>"
}
}
}
baseURL
: The publicly accessible URL of the serveraddr
: The address and port the server listens onname
: The name of the proxy serverversion
: The version of the proxy serveroptions
: Default options that apply to all MCP servers unless overriddenThis section defines the MCP servers to connect to. Each server can be configured with:
command
and args
)url
)env
)options
)You can filter which tools are exposed from each server using the toolFilter
option:
mode
: Either "allow" (whitelist) or "block" (blacklist)list
: Array of tool names to allow or blockAuthentication can be configured at both the proxy level and for individual servers:
authTokens
: List of valid authentication tokensTo use your MCP Proxy with AI assistants like Claude or other MCP-compatible clients, you'll need to provide them with the proxy's URL. The proxy will handle connecting to all the configured MCP servers and present their tools as a unified set.
You can use the web interface at https://tbxark.github.io/mcp-proxy to convert your MCP Proxy configuration into a format that Claude and other AI assistants can use.
panicIfInvalid
optionlogEnabled
option