Skip to main content
Glama
yeelam-gordon

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 tools

The 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

Install

Upgrade

VS Code (editor)

Install

Upgrade

Claude Code

Install

Upgrade

Codex CLI

Install

Upgrade

OpenCode

Install

Upgrade

Qwen Code

Install

Upgrade

Kimi CLI

Install

Upgrade

Antigravity CLI

Install

Upgrade

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:lifecycle

npm 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.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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
  • F
    license
    Not graded
    quality
    A
    maintenance
    Runs 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
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables 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
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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