MCP Gateway
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
English | 简体中文
MCP Gateway
Introduction
MCP Gateway puts multiple MCP services behind one endpoint. By default, an agent sees up to six routing tools and looks up downstream tools as needed. Clients with tool search can opt into transparent aggregation for direct calls.
Supports stdio and Streamable HTTP with MCP 2026-07-28, 2025-11-25, and 2025-06-18. Legacy /sse endpoints are unsupported.
Related MCP server: mcpstead
Quick Start
Install
Requires Node.js 24 or later.
npm install -g @jadchene/mcp-gateway-serviceCreate config.json using the configuration example. Replace the downstream command, arguments, and paths with those of an installed MCP server.
Stdio
The agent starts the gateway process, so no separate startup command is needed.
Codex:
codex mcp add gateway -- mcp-gateway-service --config /absolute/path/config.jsonClaude Code:
claude mcp add gateway -- mcp-gateway-service --config /absolute/path/config.jsonReplace /absolute/path/config.json with the file you created. On Windows, a path such as C:/mcp/gateway/config.json works. Absolute paths avoid depending on the client's working directory.
Streamable HTTP
Start the gateway:
mcp-gateway-service --http --config ./config.jsonThe default endpoint is http://127.0.0.1:3000/mcp.
HTTP hides gateway_manage_service by default. Binding to a non-loopback address requires a bearer token. The gateway reads it from MCP_GATEWAY_AUTH_TOKEN by default. Use --auth-token-env <name> to select a different environment variable.
Codex:
codex mcp add gateway --url http://127.0.0.1:3000/mcpClaude Code:
claude mcp add --transport http gateway http://127.0.0.1:3000/mcpConfiguration and Tools
CLI Options
Option | Description | Default |
| Config file path. |
|
| Enables the Streamable HTTP endpoint. | Disabled |
| HTTP bind address. |
|
| HTTP port. |
|
| HTTP endpoint path. |
|
| Environment variable containing the HTTP bearer token. |
|
| Exposes | Disabled |
| Limits in-flight HTTP requests and open notification streams separately. Each pool allows up to this many. |
|
| Rejects HTTP request bodies above this byte limit; maximum configurable value is 64 MiB. |
|
| Bounds retained stateful legacy HTTP sessions. |
|
| Prints the installed version. | — |
Stdio remains available when --http is enabled.
Config File
{
"services": [
{
"serviceId": "local-tools",
"name": "Local Tools",
"description": "Local MCP service",
"transport": {
"type": "stdio",
"command": "your-mcp-service",
"args": [
"--config",
"/absolute/path/service/config.json"
]
}
}
]
}See config.example.json for an HTTP downstream service and additional settings.
Setting | Usage |
| Unique identifier for each service. |
| Requires confirmation for matching downstream tool names. Patterns match the full original name, are case-sensitive, and support |
| Uses the same patterns to hide and block tools; takes precedence over confirmation rules. |
| Prefer absolute paths. Relative working directories resolve from the gateway process directory. |
| Supply variable values or allow named variables through. Custom variables are not inherited unless allowed; |
| Log paths resolve from the config directory; logs rotate at the configured size. |
The gateway reloads the file automatically and keeps the last valid configuration if a reload fails.
Gateway Tools
To enable transparent aggregation, set "transparentTools": true at the top level of the config file or turn on 透明聚合模式 under 通用设置 in the Web UI and save. The default is false.
Call gateway_list_services, choose a serviceId from services, and read the top-level transparentTools flag in the result.
Transparent (
true) — Use the returnedserviceIdand action keywords together in the client's tool search. For example, if the service ID isdatabase, search fordatabase list tables. Select the matching tool from this gateway and call it directly with its own arguments.Routing (
false) — Callgateway_list_toolswith the returnedserviceId. Get the schema withgateway_get_tool_schemaif needed, then callgateway_call_toolwithserviceId,toolName, andarguments. Pass{}forargumentswhen the tool takes no parameters.
Gateway tool | Mode | Description |
| Both | Returns the current mode and enabled services. Filter by identifier, description, or availability. |
| Both | Shows one service's connection state, protocol revision, server identity, and recent error. |
| Both | Reconnects, enables, or disables a service. HTTP requires |
| Routing | Searches a service's tools by name or description and can include schemas. |
| Routing | Returns schemas for exact tool names. |
| Routing | Calls one downstream tool and returns its MCP result. |
In transparent mode, schema loading and token usage depend on the client.
The gateway notifies listening clients when its tool catalog changes. If Codex still shows stale tools, reload MCP and open a new thread.
Manual approvals require a client that supports interactive confirmation. To enable Codex automatic review for gateway confirmations, set "codexAutoReview": true on the service and start Codex with codex -c approvals_reviewer=auto_review. Configure downstream approvals separately.
Agents with Skills support can use the included MCP Gateway Skill for the discovery and calling workflow.
Development
git clone https://github.com/jadchene/mcp-gateway.git
cd mcp-gateway
npm install
npm run verifyCreate config.json as shown above, then start the development service:
npm run dev -- --config ./config.jsonnpm run verify builds the service. Run the compiled output with npm start -- --config ./config.json.
Web configuration
Disabled by default. Web binds only to 127.0.0.1, needs no token, and uses a separate port from MCP communication.
mcp-gateway-service --config ./config.json --web --web-port 3100Open the printed URL and click Save configuration to apply edits. You can also set "web": { "enabled": true, "port": 3100 } in the config file. The --web and --no-web flags take precedence. Restart the gateway after changing the Web port or enablement setting.
Use Service status to start or stop stdio processes, or connect or disconnect HTTP services. A manual stop lasts until the gateway restarts. Set a service's webUrl to open its own configuration page.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
MCP federation gateway: route, govern and observe agent tools across clouds and MCP servers.
MCP Gateway: wrap any MCP server with cold-start retries, uptime SLA, and per-execution MPP billing.
Single-connection MCP gateway discovering and executing 490+ verified MCP & A2A tools.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA feature-rich Model Context Protocol gateway that federates MCP and REST services, unifying discovery, authentication, and transport protocols while providing virtualization of legacy APIs as MCP-compliant tools.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP Gateway that aggregates multiple upstream MCP servers into a single endpoint with persistent connections, tool registry, and authentication.75 npm2MIT
- FlicenseAqualityDmaintenanceUniversal MCP proxy server that discovers, searches, and executes tools across all configured MCP servers from a single entry point.7-
- FlicenseNot gradedqualityCmaintenanceEnables centralized routing, discovery, namespacing, and execution of tools from multiple remote MCP servers over HTTP/SSE, aggregating them behind a unified MCP gateway with dynamic server management.-