shared-mcp-gateway
Shared MCP Gateway
Languages: English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Español · Français · Deutsch · Português · Italiano · Русский · العربية · हिन्दी · Bahasa Indonesia · Türkçe · Tiếng Việt
Save RAM. Keep context for your work. Tools on demand.
More agents should mean more work done—not more copies of the same MCP setup.
5 agents. 12 MCP connections. One shared setup.
Illustrative example: those 12 connections expose 1,000 tools and use 1.5 GB of local process memory per independent setup.
Benefit | Separate setup per agent | With MCPGateway |
Save RAM | 7.5 GB across five independent MCP setups. | 1.5 GB shared, plus gateway/connector overhead. 6 GB of duplicated memory avoided. |
Keep context for your work. Tools on demand. | 1,000 tool definitions loaded upfront per agent, potentially growing as you add MCP connections. | 6 gateway tools upfront—99.4% fewer definitions. Keep all 1,000 tools available; each agent discovers and loads only what it needs. Add more MCP connections without loading their entire catalogs into every agent. |
Keep your agents. Keep your MCP connections. Stop making every session carry its own copy.
RAM figures are illustrative, not measured savings; agent memory is additional. Definition counts are not token savings, and clients that already defer tool loading may see a smaller context benefit. Sharing does not enlarge the model's context window or make total RAM usage constant.
Related MCP server: warmplane
Contents
How it works
Agent A ─┐ ┌─ Integration A: many tools
Agent B ─┼─ connector ─ gateway ──┼─ Integration B: many tools
Agent C ─┘ └─ Integration C: many toolsThe gateway exposes four discovery/execution tools—list_servers, search_tools, get_tool_schema, and call_tool—plus claim_server and release_server for integrations that require exclusive workflow ownership.
A request follows discover → retrieve schema → call. Discovery does not start every integration. If shared state requires exclusive ownership, the agent claims that integration before its calls and releases it after the workflow.
Install and upgrade by client
One shared MCP catalog across your agents. Start with 10 connections in Copilot, then explicitly migrate a supported Claude configuration with 2 new connections: both agents can use the same 12. Same-name identical entries deduplicate; conflicts stop for review. Preview and back up the migration; unsupported native settings are rejected.
The shared runtime is bootstrapped through Copilot CLI today. Other clients can register the same connector or explicitly migrate supported entries into its catalog. Installing a plugin alone does not merge configurations. Configuration-format and SDK tests do not mean every native client has been exercised end to end.
Prerequisites: Node.js 24 or newer, npm, Git, Copilot CLI with plugin support for the current bootstrap, and integrations already configured with their required authentication. Windows is the primary tested platform. Agency is optional.
Client | Installation | Upgrade |
GitHub Copilot CLI | ||
VS Code (editor) | ||
Claude Code | ||
Codex CLI | ||
OpenCode | ||
Qwen Code | ||
Kimi CLI | ||
Antigravity CLI |
The client guide is the canonical installation and upgrade source. It documents native configuration locations, preview/apply behavior, support status, restart/readiness steps, and conflict handling.
Safety and operations
Setup is preview-first. Approved changes create private backups and return exact readiness and rollback commands. Configuration adapters preserve unrelated client settings and refuse conflicting gateway aliases instead of silently replacing them.
The runtime is installed outside the plugin cache, so removing or updating plugin files does not silently replace the running gateway. Exclusive integrations can be claimed for a complete multi-call workflow, and an unknown timeout outcome remains blocked rather than being handed to another agent.
See the operational reference for workflow ownership, privacy, recovery, and configuration transfer. For Windows plugin updates reporting Access denied, use the tested cache-only recovery.
Verified scope
1,000-tool synthetic catalog, 2 clients: a focused search returns one matching summary, and the second client reuses the cached catalog. Test
237 local checks passed for v0.6.0: core sharing, recurring synchronization, cross-client migration, client/documentation behavior, installation, upgrade, rollback, cancellation, and recovery.
10 existing connections + 2 new = 12 shared: migration across seven native formats, with two SDK clients reusing the same imported local process. Claude Code also parsed the actual migrated configuration without starting a model or MCP connection.
Windows and Ubuntu CI on Node.js 24, plus CodeQL analysis.
Copilot marketplace installation and setup-skill discovery verified in an isolated home for v0.5.0.
These checks demonstrate the mechanism, not unlimited capacity. Authentication, network latency, active workloads, and client initialization still affect startup time and resource use.
Development
git clone https://github.com/yeelam-gordon/MCPGateway
cd .\MCPGateway
npm ci
npm test
npm run setup
npm run test:sync
npm run test:clients
npm run test:lifecyclenpm run setup previews only. Use npm run setup -- --apply only after reviewing the preview. The lifecycle suite exercises fresh installation, shared use, upgrade activation, and rollback with isolated fixtures rather than personal credentials or production services.
More documentation
License
MIT - see LICENSE. Third-party dependencies retain their respective licenses.
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP memory server. One memory your agents share — across models, devices and apps.
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables multiple Claude Code sessions to share a single HTTP MCP endpoint, lazily spawning stdio MCP servers only when their tools are called, reducing idle processes and memory usage.MIT
- FlicenseNot gradedqualityAmaintenanceRuns multiple upstream MCP servers behind one local process, keeping sessions persistent and exposing a compact, policy-aware surface for tools, resources, and prompts via HTTP, CLI, and MCP-native clients.5-
- FlicenseNot gradedqualityCmaintenanceEnables agents to connect to remote MCP servers once, access their tools through a compact MCP endpoint, pair a CLI inside sandboxes, and create watches that turn command or tool output into pollable structured events.2-
- AlicenseNot gradedqualityBmaintenanceEnables agent clients to safely connect to tools and execution resources through MCP with authorization, approvals, audit, chat-context isolation, SSH/Docker access, and long-running command session tracking.MIT