home / mcp / fastmcp proxy server
Exposes MCP servers over SSE, HTTP, or stdio to enable flexible, scalable client access.
Configuration
View docs{
"mcpServers": {
"sokunmin-mcp-proxy": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp"
]
}
}
}You run a FastMCP Proxy Server to expose one or more underlying MCP servers to clients over multiple transports. This lets you connect with lightweight clients and flexibly route MCP services without changing your MCP implementations.
You can access your MCP services through either Server-Sent Events (SSE), HTTP, or local stdio connections. Start the proxy with your preferred transport, then ensure the MCP servers you want to expose are defined in the configuration. Your clients can connect to the proxy using the corresponding transport endpoints or by initiating local stdio connections from the host where you run the proxy.
Prerequisites: you need Docker and Docker Compose installed on your machine.
# 1. Clone the project repository
git clone https://github.com/sokunmin/mcp-proxy.git
cd mcp-proxy
# 2. Install and run with Docker Compose (recommended)
docker-compose up --build
# 3. Run in background (optional)
docker-compose up -d --build
# 4. Stop the service
docker-compose downConfigure which MCP servers are proxied by editing the servers.json file. The example configuration exposes three MCP services via stdio: context7, fetch, and time. You can adjust the command and arguments to match your MCP server setup.
{
"mcpServers": {
"context7": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
},
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
},
"time": {
"transport": "stdio",
"command": "uvx",
"args": ["mcp-server-time", "--local-timezone", "Etc/UTC"]
}
}
}The proxy supports multiple transport endpoints. Use SSE at the default port to stream MCP events, HTTP for traditional requests, or stdio for local inter-process communication. The exact ports and host bindings can be configured through environment variables when running the container or via Docker Compose.
Test the SSE and HTTP endpoints from any MCP-compatible client or using standard HTTP tools. The proxy will route requests to the configured MCP servers based on the chosen transport.
Use environment variables to adjust transport, host, and port without editing files. Mount the servers.json configuration as a volume for easy updates. Prefer Docker Compose for consistent deployments and monitor logs to ensure health.
Check for port conflicts on 8000/8001 or the ports you expose. If you modify servers.json, restart the proxy to apply changes. Review container logs for errors related to the MCP servers or transport initialization.