Overview
Configuration workflow for setting up a single MCP gateway daemon that fronts all upstream MCP servers. Each AI assistant points at the daemon instead of spawning its own MCP fleet.
Trigger
One-time setup, plus rotation every config change
Schedule
One-time setup
Workflow Steps
Install MCP gateway
FastMCP, @modelcontextprotocol/server-gateway, or equivalent.
List upstream MCP servers
Scavio MCP, Postgres MCP, GitHub MCP, internal MCPs.
Define gateway config
JSON listing each upstream server's URL or command.
Run gateway as HTTP daemon
One process serving all agents on a known port.
Point agents at the daemon
Claude Desktop, Cursor, opencode all reference http://localhost:8765/mcp.
Verify consolidation
ps aux | grep mcp should show 1, not 30+.
Python Implementation
# Configuration-driven setup; no Python code needed.
# See gateway.json and per-agent mcp config below.JavaScript Implementation
// gateway.json
{
"upstreams": {
"scavio": { "url": "https://mcp.scavio.dev/mcp", "headers": { "x-api-key": "$SCAVIO_API_KEY" } },
"postgres": { "command": "npx", "args": ["@modelcontextprotocol/server-postgres", "$DATABASE_URL"] }
}
}
// Then in claude_desktop_config.json / .cursor/mcp.json / opencode config:
{
"mcpServers": {
"gateway": { "url": "http://localhost:8765/mcp" }
}
}Platforms Used
Web search with knowledge graph, PAA, and AI overviews