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 Gatewayadd 40 and 2 using the calc__add tool"
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.
MCP Gateway
A managed gateway for Model Context Protocol servers. Register MCP servers once, then let many agents share them through one endpoint with API-key auth, per-tenant scopes, rate limiting, guardrails, and full audit logging.
How it works
agents gateway upstream MCP servers
┌──────┐ POST /mcp ┌──────────────┐ stdio / SSE ┌──────────────┐
│agent │ ──────────────────► │ auth, scope │ ──────────────► │ calc (stdio) │
│agent │ tools/list,call │ rate limit │ multiplexed ├──────────────┤
│agent │ ◄────────────────── │ guardrails │ shared conns │ notes (stdio)│
└──────┘ qualified tools │ audit log │ └──────────────┘
calc__add, … └──────────────┘The gateway presents itself as a single MCP server. Tools are namespaced by
upstream (calc__add), so clients discover and call everything through one
tools/list / tools/call surface.
Related MCP server: MCP Gateway
Quickstart
npm install
export MCP_GW_ADMIN_TOKEN="pick-a-secret"
npm run build
node dist/index.jsRegister the bundled demo servers and mint a key:
ADMIN=(-H "Authorization: Bearer pick-a-secret" -H "Content-Type: application/json")
curl "${ADMIN[@]}" -d '{"name":"calc","transport":{"type":"stdio","command":"node","args":["demo-servers/calc.ts"]}}' \
localhost:8080/admin/servers
KEY=$(curl -s "${ADMIN[@]}" -d '{"name":"agent-1","servers":["*"]}' \
localhost:8080/admin/keys | python3 -c "import json,sys; print(json.load(sys.stdin)['secret'])")
curl -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"calc__add","arguments":{"a":40,"b":2}}}' \
localhost:8080/mcp
# {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"42"}]}}Or run the full scripted tour (build, register, call, denied call, rate limit, audit):
./scripts/demo.shFeatures
Upstream registry: register stdio and SSE MCP servers; the gateway runs the
initializehandshake and caches the tool catalog. One shared connection per server, multiplexed across clients.Auth and scopes: API keys with per-tenant server scopes (
["calc"]or["*"]) and optional tool-level allowlists. Secrets are sha256-hashed at rest, shown once at creation.Rate limiting: per-key token buckets with optional per-key overrides;
x-ratelimit-remainingon every response.Guardrails: gateway-wide tool deny patterns, max argument size, per-call timeouts, max output size.
Audit and stats: every call (including denials and 429s) lands in a JSON-lines audit log and an in-memory ring for the live dashboard; per-tool/per-tenant counters for usage charts.
Admin API: manage servers, keys, stats, and logs under
/admin(bearer token).Dashboard: React UI for servers, tool catalog, live request log, usage charts, and key management. Served by the gateway when
dashboard/distexists.
API surface
Endpoint | Auth | Description |
| API key | JSON-RPC: |
| none | Liveness probe |
| admin token | Upstream registry |
| admin token | API key management |
| admin token | Aggregated tool catalog |
| admin token | Usage counters |
| admin token | Recent audit entries |
Tool calls return gateway error codes in the -3200x range: -32001 upstream
timeout, -32002 upstream unavailable, -32003 rate limited, -32004
unauthorized, -32005 forbidden, -32006 guardrail violation.
Configuration
Variable | Default | Description |
| (required) | Bearer token for |
|
| Listen address |
|
| Per tool-call timeout |
|
| Max tool arguments size |
|
| Max upstream output size |
|
| Default token bucket |
|
| Audit log directory |
Development
npm test # vitest, 37 tests
npm run typecheck # tsc --noEmit
npm run build # emit to dist/Docker (compose file included; images not built here):
MCP_GW_ADMIN_TOKEN=secret docker compose up --buildLayout
src/ gateway: proxy, admin api, registry, auth, limits, audit
transports/ stdio and SSE JSON-RPC transports
demo-servers/ calculator and notes MCP servers used by the demo
dashboard/ react admin UI (served from / when built)
tests/ 37 vitest tests
scripts/demo.sh end-to-end demo against real local processesLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Paid MCP tools behind one endpoint. Agents pay per call in USDC on Base via x402.
Context and control for any AI. Agent identity, scoped access, and proof across tools.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAggregates multiple Model Context Protocol servers into a single gateway to provide unified search, description, and execution of tools. It reduces context limit issues by dynamically fetching specific tool schemas only when needed rather than loading all available tools at once.12 npm22MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready unified entry point for AI agents that implements the Model Context Protocol (MCP). It provides a secure gateway with rate limiting, authentication, and observability for managing and proxying requests to multiple downstream APIs.MIT
- AlicenseNot gradedqualityCmaintenanceProvides a security and context-control layer that multiplexes multiple MCP servers behind a single endpoint, scanning tool definitions and results, enforcing authorization, rate limiting, and audit logging, and dynamically retrieving tools to manage context window usage.MIT
- AlicenseAqualityCmaintenanceProvides a security governance layer for AI agents to safely access upstream MCP servers, enforcing tool-level RBAC, parameter constraints, authentication via static tokens or OIDC, and tamper-evident audit logging.21Apache 2.0