Multi-user MCP management and lazy proxy gateway that makes MCP work like Skills: progressive capability discovery, on-demand server startup, and one stable gateway for every agent.
pip install mcp-manager-gateway==1.4.0 Copy PIP instructions
Make MCP work like Skills: discover capabilities progressively, start servers only when needed, and give every agent one stable gateway.
MCP servers are useful, but a large MCP configuration creates a new set of problems:
MCP Manager Gateway, or MMG, puts those servers behind one gateway. An agent sees a small discovery surface, searches for the capability it needs, reads the exact schema, and calls the selected tool. Catalog operations do not start downstream services; a lazy server starts on its first real call.
Agent / IDE │ configure MMG once ▼ MCP Manager Gateway ├── discover MCPs and tools without starting them ├── call an exact tool and start it only when required ├── manage users, tokens, permissions, OAuth, and lifecycle └── agent proposal → human review → real test → approval │ ├── Filesystem MCP ├── Database MCP ├── Browser MCP └── other stdio / HTTP / SSE / REST services Why MMG Faster, smaller agent startup On-demand discovery exposes three core gateway tools instead of injecting every downstream tool schema into the initial context. The agent first finds an MCP, then retrieves the full schema for a relevant tool, and finally invokes its exact gateway name.
This is progressive disclosure for MCP: reveal what exists first, then load detail only when it is useful. See Progressive discovery.
Listing MCPs, searching tools, and paging through the catalog never starts a downstream service. A lazy service starts on its first business call and can be reclaimed after an idle period. Frequently used services can be eager; unavailable services can be disabled.
Each agent connects to MMG instead of carrying dozens of independent MCP definitions. The gateway centrally manages services, credentials, permissions, health, and runtime state. The same catalog can be safely assigned to different users and tokens.
For Web integrations with large catalogs, use capability summary pages and exact definitions. Capability cards wrap long descriptions, URLs, and identifiers within their borders on desktop and mobile. Scheduled refresh retries enabled lazy/eager services even after a manual stop or startup failure and publishes the paged catalog. Stopping a service forcibly closes its current instances without disabling it or blocking later calls; a later call restarts a lazy/eager service, and an eager service then stays running. A failed refresh empties the catalog and persists its error for agents and the console; it never disables an enabled service. Catalog queries remain read-only. Explicit exact calls may rediscover current contracts before validation and execution. Approved proposals discard diagnostic catalog entries and, like rejected proposals, no longer show the diagnostic catalog button. Approval tests support a bounded summary response; legacy full-list responses have explicit size limits. Agent service summaries include a bounded tool-name preview; enumerate gateway_search_tools for the full catalog. Exact calls use indexed routes and reuse schema validators.
The Connections page lists your business leases and their MCP instances; administrators can manage other users' leases. It supports filters, safe JSON details, confirmed single/batch disconnects, and five-second refresh that pauses in hidden tabs. Each lease shows current/queued calls, cumulative downstream business calls and the last dispatch time; short calls remain visible in these lease-lifetime counters. One or two instance entries use their natural height; three or more share a compact capped viewport, with scrolling for additional entries. Disconnect releases a permit and its sessions: unreferenced lazy instances drain and stop; eager instances remain, including session-isolated instances. Clients can reconnect; this does not revoke credentials. Settings provide independent instance idle reclamation and business lease validity (default 43,200 seconds; 0 disables lease expiry). The Bridge connects clients to MMG through stdio. Its heartbeats default to 90 seconds, with disconnection after three missed intervals even when lease expiry is disabled. See Connection management.
The recommended migration path is not to rebuild every MCP by hand. Give a trusted administrator token permission to submit MCP proposals, then ask an agent to:
The agent prepares the migration; the human keeps the final decision. A proposal cannot choose privileged lifecycle or isolation fields and cannot bypass review. Read the full MCP migration guide and the agent contract in AGENTS.md.
MMG requires Python 3.12 or newer and is published on PyPI.
uv tool install mcp-manager-gateway mmg Upgrade a uv tool installation with:
uv tool upgrade mcp-manager-gateway pip Install into a dedicated virtual environment:
pip install --upgrade mcp-manager-gateway mmg mmg, mcp-manager, and mcp-manager-gateway are equivalent commands. The default address is http://127.0.0.1:8765. The first registered account becomes the administrator; passwords must contain at least 10 characters.
On first start, MMG creates its configuration, SQLite database, and runtime data under:
mmg serve --port 8766 Docker (pull from registry) Both registries publish the same multi-arch image (linux/amd64, linux/arm64):
docker pull eraycc/mcp-manager-gateway:latest docker run -d --name mmg \ -p 127.0.0.1:8765:8765 \ -v mmg-data:/data \ eraycc/mcp-manager-gateway Pull and run from GHCR:
docker pull ghcr.io/eraycc/mcp-manager-gateway:latest docker run -d --name mmg \ -p 127.0.0.1:8765:8765 \ -v mmg-data:/data \ ghcr.io/eraycc/mcp-manager-gateway Pinning a specific release is recommended in production:
docker run -d --name mmg \ -p 127.0.0.1:8765:8765 \ -v mmg-data:/data \ eraycc/mcp-manager-gateway:1.3.9 Data is persisted in /data inside the container; map it to a named volume or host directory. See Deployment for Compose files and production notes.
For source and container options, see Installation and Quick start.
Create an access token in the Web console. The profile page generates copy-ready HTTP, stdio, Codex, and generic client configuration for the current gateway address.
{ "mcpServers": { "mcp-manager": { "command": "mmg", "args": ["stdio", "--url", "http://127.0.0.1:8765"], "env": { "MCP_MANAGER_TOKEN": "mcpm_YOUR_TOKEN" } } } } The bridge only connects the client to MMG. Downstream MCP processes still belong to the gateway and follow its lifecycle rules. See Connect clients.
Read the MCP configuration in my current client, normalize it, and batch-submit it as MMG proposals. Do not edit the original configuration. Wait for my review, testing, and approval. Remove migrated entries only after I explicitly approve cleanup.
Keep a backup, preserve unrelated settings, and never remove the MMG connection itself.
Reliable agents do not guess tool names or arguments: search for the MCP, retrieve the tool schema, and call the exact returned name. Discovery and pagination do not wake lazy services. See the Gateway tool reference. Failed services report their state without advertising executable tools; keyword search supports bounded one-character typo recovery.
MMG supports optional browser-side interface translation:
The language selected from the top-right control is saved in the current browser profile and takes priority over the system default. On later visits and sign-ins, MMG automatically applies that saved selection while translation remains enabled. The default target language only initializes browsers that have no local choice, so different browsers can choose independently.
Browser translation can send visible page text to the configured translation provider. Use a reviewed private provider for sensitive deployments, or keep translation disabled. Configuration, cache controls, and provider details are covered in Interface translation and update checks.
See Manage services, Runtime and lifecycle, and Security model.
Environment variables override the user-home .env. MMG does not automatically load .env from the source tree or current working directory. Start from .env.example.
HOST=127.0.0.1 PORT=8765 PUBLIC_URL=http://127.0.0.1:8765 COOKIE_SECURE=false DATABASE_URL= Use MCP_MANAGER_HOME or mmg --home /path serve to select another configuration and data directory. Back up the complete data directory before upgrades or migration.
Start the included container deployment with:
docker compose up --build -d The default bind address is local-only. For remote or production use, place MMG behind an HTTPS reverse proxy and set PUBLIC_URL and COOKIE_SECURE=true correctly. MMG is currently designed as a single gateway runtime; do not share one downstream process scheduler across multiple workers or replicas.
Read Database deployment, migration, and backup, Configuration, Deployment and upgrades, and Backup and migration.
Upgrade with the mechanism that installed MMG:
# uv tool uv tool upgrade mcp-manager-gateway # pip virtual environment pip install --upgrade mcp-manager-gateway Source and container installations should be updated through Git plus uv or by rebuilding/pulling the relevant image. mmg upgrade performs database schema migration; it does not update the installed Python package.
A one-time startup background pass reclaims historical cache residue. During operation, cache reconciliation follows MCP deletion, successful capability changes, or embedding model changes; there is no hourly cache sweep, vector TTL, or entry-count eviction. Unchanged tools reuse existing same-scope vectors without requesting the model again; disabled services and failed discovery scopes are preserved. Legacy jobs/jobs.jsonl is no longer read or imported and is not automatically deleted. See Backup and migration.
Update detection in System Settings → About only reports availability. It never modifies the installation. Automatic checks can be disabled while the manual Check for Updates action remains available.
uv sync --frozen --group dev uv run pytest tests -q node --test tests/frontend/core.test.mjs uv build Contributor guidance is in Contributing; transport extension details are in Transport plugins.
MCP configuration can start local processes, access networks, and read data. Treat service administration as privileged. Review proposed commands and permissions, use least-privilege accounts and tokens, isolate different trust domains, and verify arguments before invoking tools with side effects.
An outcome_unknown result means a request may already have reached its destination. Agents must not automatically replay it.
Large catalogs support progressive gateway_search_tools with names_only: true (no Schema reads). Query exact names again without that flag before calling. Follow next_cursor without changing query arguments. Native tool/resource/prompt/template listings and gateway_list_resources paginate; complete MCP JSON-RPC envelopes are budgeted at 1 MiB including text and structured duplication. An individually oversized complete contract returns catalog_entry_too_large, never a truncated Schema.
agent-tools gateway lazy-loading lazy-start lifecycle-management mcp mcp-gateway mcp-lifecycle mcp-manager mcp-proxy model-context-protocol progressive-disclosure proxy
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.




