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 with no client-specific integration 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 |
| OAuth | Whether people sign in through your identity provider instead of sending a key - the gateway then answers unauthenticated requests with a 401 that names its metadata document, as described under OAuth |
| Scopes | With OAuth on, the scopes the metadata document tells clients to ask for, e.g. openid profile |
| 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 accepts 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.
Each JSON-RPC request is an HTTP POST and receives one JSON response. A notification, e.g. notifications/initialized, is accepted with 202 Accepted and no body, and a DELETE with the Mcp-Session-Id header ends a session. The gateway does not open server-sent events (SSE) streams - a GET returns 405 Method Not Allowed and MCP clients continue over POST. A body that is empty or not valid JSON returns the JSON-RPC error -32700, Parse error.
Clients
Each AI product connects to a gateway in its own way - a command, a JSON file or a form - and with either a key or a sign-in through your identity provider. One page per product says what to paste and where:
| Client | How it connects |
|---|---|
| VS Code | An entry in .vscode/mcp.json, with a header or an OAuth client ID |
| Cursor | An entry in .cursor/mcp.json, with a header or an OAuth client ID |
| Claude Code | One claude mcp add command, with a header or an OAuth client ID |
| Claude.ai and Claude Desktop | A custom connector with the gateway's URL and an OAuth client ID |
| ChatGPT | An app with the gateway's URL, registering itself with the identity provider or using a client ID |
| Microsoft 365 Copilot | An MCP tool of a Copilot Studio agent, signing people in through Entra ID |
The sharing page has the export that gives a client team the gateway's address and tools in one document, and the OAuth page has what the sign-in needs on the gateway and at the identity provider.
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 |
| OAuth | Has people sign in through your identity provider, with access decided by group membership and each person recorded by name |
| 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 |
| Alerts | Raises an alert when the backend fails, when agents call tools that do not exist or loop over one, and when the gateway exposes too many tools |
| 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 |
| OAuth | Sign-in through Entra ID, Keycloak or another identity provider |
| 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 |