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 six routing tools; downstream services, tools, and schemas are looked up only when they are needed.
The project uses the official TypeScript SDK v2 and requires Node.js 24 or later.
MCP Gateway v0.6.2 and later accept only MCP2026-07-28, 2025-11-25, and 2025-06-18. Supported transports are newline-delimited stdio and single-endpoint Streamable HTTP. Standalone HTTP+SSE (/sse), Content-Length framing, and other protocol revisions are not supported.
Related MCP server: MCP Gateway (Parent MCP Server)
Why Use It
Keep the agent context small even when many MCP services are configured.
Connect the agent once, then add or remove downstream services in the gateway config.
Find tools by name or description and load schemas only when required.
Use stdio and Streamable HTTP services through the same interface.
Require user confirmation for selected tool-name patterns, or hide and block matching tools entirely.
Reload config changes without restarting the gateway.
Quick Start
Install
npm install -g @jadchene/mcp-gateway-serviceCreate config.json. Replace your-mcp-service with the command of an installed MCP server:
{
"services": [
{
"serviceId": "tools",
"name": "Tools",
"transport": {
"type": "stdio",
"command": "your-mcp-service"
}
}
]
}Stdio
The agent starts the gateway process, so no separate startup command is needed.
Codex config.toml:
[mcp_servers.gateway]
command = "mcp-gateway-service"
args = ["--config", "./config.json"]Claude Code:
claude mcp add gateway -- mcp-gateway-service --config ./config.jsonStreamable 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 config.toml:
[mcp_servers.gateway]
url = "http://127.0.0.1:3000/mcp"Claude 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"
},
"services": [
{
"serviceId": "local-tools",
"name": "Local Tools",
"confirmationRequiredTools": ["delete_*", "deploy_?"],
"disabledTools": ["internal_*", "legacy_tool"],
"transport": {
"type": "stdio",
"command": "your-mcp-service",
"args": []
}
},
{
"serviceId": "remote-tools",
"name": "Remote Tools",
"transport": {
"type": "http",
"url": "http://127.0.0.1:3200/mcp"
}
}
]
}Field | Description |
| List of downstream MCP services. |
| Required unique identifier used by gateway tools. |
| Required display name. |
| Optional service description. |
| Optional; defaults to |
| Optional downstream tool-call timeout; defaults to 120 seconds. |
| Optional unique array of case-sensitive full-name glob patterns. |
| Optional unique array using the same glob syntax. Matching tools are hidden from tool listing and schema lookup, and calls are rejected before reaching the downstream service. |
|
|
| Required command for a stdio service. |
| Optional command arguments for a stdio service. |
| Optional working directory for a stdio service. |
| Optional environment variables for a stdio service. |
| Opts into inheriting the complete gateway environment; defaults to |
| Additional process environment names passed to stdio services. |
| Required Streamable HTTP URL for an HTTP service. |
| Optional static headers for an HTTP service. |
| Enables file logging; defaults to |
| Log file path. Relative paths use the config file directory. |
| Active log size before rotation; defaults to 10 MiB. |
The config file is watched for changes. Invalid updates are rejected and the last valid config stays active. See config.example.json for another example.
Gateway Tools
Tool | Description |
| Searches configured 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.
gateway_list_services accepts optional serviceId and desc string arrays as case-insensitive substring filters. Matches across these two fields use OR. The optional available boolean further limits those matches by current availability.
Calls keep the downstream tool's original side effects and confirmation rules. Tools matching confirmationRequiredTools are never invoked until the current MCP session reviews the exact service, tool, and arguments and answers yes to the form elicitation; sessions without form elicitation support receive an error. A no, decline, or cancel returns an explicit rejection without invoking the downstream tool. An uncertain gateway_call_tool failure is never replayed automatically. Enabling or disabling a service with gateway_manage_service atomically updates the config file.
disabledTools takes precedence over confirmationRequiredTools when both match. A disabled tool is hidden and rejected immediately without asking for confirmation.
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 verify
npm run dev -- --config ./config.jsonBuild and run the compiled service:
npm run build
npm start -- --config ./config.jsonLicense
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.
Unified gateway exposing 150+ tools across all NexGenData MCP servers via one endpoint.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- -licenseNot 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.-
- FlicenseNot gradedqualityDmaintenanceEnables centralized management and unified interface for multiple child MCP servers (filesystem, sqlite, etc.), allowing users to discover, launch, and execute tools across different MCP servers through a single gateway.-
- AlicenseNot gradedqualityDmaintenanceMCP Gateway that aggregates multiple upstream MCP servers into a single endpoint with persistent connections, tool registry, and authentication.212MIT
- FlicenseAqualityDmaintenanceUniversal MCP proxy server that discovers, searches, and executes tools across all configured MCP servers from a single entry point.7-