MCP Server Proxy Aggregating MCP Resource Servers
Aggregate multiple MCP resource servers behind a single HTTP endpoint with this MCP server proxy for simplified access and centralized management.
npx -y @TBXark/mcp-proxyOverview
This MCP Server Proxy aggregates multiple Model Context Protocol (MCP) resource servers behind a single HTTP endpoint. Instead of clients keeping track of many individual MCP endpoints, the proxy exposes a unified surface that forwards requests to configured resource backends — simplifying discovery, access control, logging and routing.
The proxy is useful when you want centralized management of resources (datasets, embeddings, context stores, etc.) across environments, teams or tenants. It can be deployed at the edge or inside a private network and configured to route or rewrite incoming MCP requests to one or more backends, making it easier for client applications to consume model context without changing endpoints.
Features
- Aggregate multiple MCP resource servers behind one HTTP endpoint
- Centralized routing and path-prefix rewriting
- Simple YAML/JSON configuration for backend servers
- Support for running as a standalone binary or inside Docker
- Optional CORS and TLS configuration for secure access
- Lightweight proxying — forwards requests and returns responses with minimal transformation
- Basic health and discovery endpoints for monitoring available resources
Installation / Configuration
Prerequisites: Go toolchain not required to run releases. You can run a pre-built binary or use Docker.
Install and run (example: Linux/macOS binary)
# download a release binary (replace version)
Docker run
Example configuration (YAML)
listen: "0.0.0.0:8080"
cors:
enabled: true
allow_origins:
resources:
- id: "vector-db"
base_url: "http://10.0.1.5:9000"
prefix: "/vector"
- id: "file-index"
base_url: "http://10.0.1.6:9000"
prefix: "/files"
health:
path: "/health"
Configuration fields (quick reference)
| Key | Type | Description |
|---|---|---|
| listen | string | Address to bind (host:port) |
| resources[].id | string | Logical name for the resource server |
| resources[].base_url | string | Backend server URL to forward requests to |
| resources[].prefix | string | Incoming request prefix mapped to this backend |
| cors.enabled | bool | Enable CORS headers |
| health.path | string | Health check endpoint path |
Available Tools / Resources
Typical endpoints exposed by the proxy (implementation may vary slightly):
- GET /health — Returns proxy health status
- GET /v1/resources — Lists configured resource servers and prefixes
- Proxying behavior: any request to /mcp/{prefix}/… is forwarded to the backend mapped for that prefix, preserving method, headers and body
Example: if the config maps “vector” to /vector and backends vector-db, a request to GET /mcp/vector/items/123 will be forwarded to http://10.0.1.5:9000/items/123
Use the discovery endpoint to programmatically enumerate available resources:
Use Cases
Centralized SDK endpoint for clients
- Problem: multiple microservices expose separate MCP resource APIs and clients must be configured with different URLs.
- Solution: deploy the proxy and configure each backend with a stable prefix. Clients only need to call the proxy URL; the proxy routes to the appropriate backend.
Staging vs Production routing
- Use different resource entries or weights to route traffic for testing or blue/green deployments. Change proxied base_url or prefix centrally without touching clients.
Access control and monitoring
- Insert authentication, request logging and CORS at a single location. Track usage across all MCP backends using the proxy access logs and metrics.
Local development and aggregation
- Run local MCP resource servers for embeddings, file indices, and context stores. Use the proxy to present a consistent API to local model runners and integration tests.
Concrete example: combining a vector DB and a file index
- Configure two backends in config.yaml (vector-db -> /vector, file-index -> /files).
- Start proxy on localhost:8080.
- Vector lookup: curl http://localhost:8080/mcp/vector/search -d ‘{“q”:“query”}’
- File metadata: curl http://localhost:8080/mcp/files/metadata/doc-123
Tips and Next Steps
- Keep configuration in source control and use environment-specific config files for dev/staging/prod.
- Use a reverse proxy (nginx/traefik) or load balancer in front for TLS termination if you need advanced TLS features.
- Combine with observability (Prometheus, structured logs) to monitor backend health and latency across aggregated resources.
Repository and source: https://github.com/TBXark/mcp-proxy