MCP gateways
Expose Python services as tools that AI agents discover and call.
An MCP gateway exposes your Python services as tools that AI clients - Claude Code, Cursor, ChatGPT or any other MCP client - discover and invoke over the Model Context Protocol. You assign services and security definitions to a gateway, and every compatible client can use them without any glue code.
Gateways are managed in the dashboard under AI > MCP gateways, where a three-step wizard creates and edits them. Step 01, How do agents connect?, covers the name, URL path and the services, skills and security assignments. Step 02, What do they receive?, covers response shaping and the remaining options. Step 03, Review and go, shows everything on one screen before the gateway is saved.
To build your first gateway end to end, see the MCP tutorial - from installation to Claude Code calling your first service in under 5 minutes.
Configuration
| Field | Meaning |
|---|---|
| Name | A unique name for the gateway, used in logs, the dashboard and the audit log |
| Active | Whether the gateway accepts requests - MCP clients cannot reach inactive gateways |
| URL path | The path the endpoint is exposed under, e.g. /mcp/billing - this is the address MCP clients connect to |
| Services | The services exposed as tools - each service becomes one tool whose input schema is derived from the service's declared input, as described under tool schemas |
| Skills | The skills the gateway serves as MCP prompts - agents read them through prompts/list and prompts/get |
| Security | The API key and Basic Auth definitions whose holders may call the gateway - details under security |
| Session TTL | How many seconds a session may stay idle before it expires - 30 minutes by default, set through the session_ttl attribute in enmasse |
| Invoke timeout | How many seconds one tools/call invocation may run for before it times out - 90 seconds by default, set through the invoke_timeout attribute in enmasse |
Beyond these, each gateway has its own governance configuration, described under Governance.
Endpoint behavior
The gateway speaks JSON-RPC 2.0 over HTTP, in both MCP protocol revisions - 2025-06-18, session-based, and 2026-07-28, stateless. Clients pick per request and one gateway serves both at the same time. Sessions are bound to the identity that created them and expire after the Session TTL above.
Governance
Every control below is per-gateway and takes effect immediately when saved - no restarts.
| Control | What it does |
|---|---|
| Security | Requires API key, Basic Auth or bearer token credentials on every request, with rejections logged |
| Rate limits | Caps each agent's traffic, enforced per security definition |
| Audit log | Records one event per request, with the method, tool, caller, outcome and sizes |
| Argument validation | Checks tools/call arguments against each tool's schema before the tool runs |
| Response controls | Applies PII removal, prompt-injection safeguards and token-denominated size caps to tool responses |
| Agent filters | Runs a per-call JSONata expression the agent sends, returning only the fields it needs |
| Sharing with clients | Exports the gateway's address, headers and tools as one server.json document for client teams |
See also
| Feature | What it does |
|---|---|
| Tool schemas | How each service's input and output become its tool schema |
| Security | API keys, Basic Auth and bearer tokens for gateways |
| Audit log | One event per agent request, with caller, tool and outcome |
| MCP tutorial | A gateway built and called from Claude Code, end to end |