MCP Gateway
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Gatewaywhat services are available?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
English | 简体中文
MCP Gateway
Introduction
MCP Gateway puts multiple MCP services behind one endpoint. An agent connects to the gateway and sees up to six routing tools; downstream services, tools, and schemas are looked up only when they are needed.
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. Non-loopback binds require a bearer token in MCP_GATEWAY_AUTH_TOKEN.
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 |
| Bounds in-flight HTTP requests. |
|
| 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
{
"logging": {
"enable": false,
"path": "./logs/mcp-gateway.log",
"maxBytes": 10485760
},
"services": [
{
"serviceId": "local-tools",
"enable": true,
"name": "Local Tools",
"description": "Local MCP service",
"callTimeoutMs": 120000,
"confirmationRequiredTools": ["delete_*", "deploy_?"],
"codexAutoReview": false,
"disabledTools": ["internal_*", "legacy_tool"],
"transport": {
"type": "stdio",
"command": "your-mcp-service",
"args": ["--config", "/absolute/path/service/config.json"],
"cwd": "/absolute/path/service",
"env": {},
"inheritEnv": false,
"envAllowlist": []
}
},
{
"serviceId": "remote-tools",
"enable": false,
"name": "Remote Tools",
"description": "Remote MCP service",
"callTimeoutMs": 120000,
"confirmationRequiredTools": [],
"codexAutoReview": false,
"disabledTools": [],
"transport": {
"type": "http",
"url": "http://127.0.0.1:3200/mcp",
"headers": {
"Authorization": "Bearer replace-with-token"
}
}
}
]
}Configure and enable the services you use. Remove Authorization for an HTTP service without token authentication.
Setting | Usage |
| Unique identifier for each service. |
| Case-sensitive full tool-name patterns: |
| 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. |
Configuration reloads automatically; invalid updates keep the last valid configuration. The complete example is also available in config.example.json.
Gateway Tools
Tool | Description |
| Searches enabled services by identifier or description and can filter by availability. |
| Shows one service's connection state, protocol revision, server identity, and recent error. |
| Searches a service's tools by name or description and can include schemas. |
| Returns schemas for exact tool names. |
| Reconnects a service or enables/disables it in the config file. |
| Calls one downstream tool and returns its MCP result. |
The usual flow is gateway_list_services → gateway_list_tools → gateway_get_tool_schema when needed → gateway_call_tool. Pass {} to gateway_call_tool when the downstream tool has no arguments.
Confirmations show the service, tool, and arguments and require a client with interactive confirmation support. Calls with uncertain outcomes are not retried automatically.
For Codex automatic review, set "codexAutoReview": true in the selected services[] block and start Codex with codex -c approvals_reviewer=auto_review. This applies to gateway confirmations; configure downstream services' own approvals separately. Otherwise, use Accept / Decline / Cancel. Codex policy determines whether an operation is approved.
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.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
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.
Unified gateway exposing 150+ tools across all NexGenData MCP servers via one endpoint.
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.16 npm2MIT
- FlicenseAqualityDmaintenanceUniversal MCP proxy server that discovers, searches, and executes tools across all configured MCP servers from a single entry point.7-
- FlicenseNot gradedqualityBmaintenanceEnables 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.-