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

FieldMeaning
NameA unique name for the gateway, used in logs, the dashboard and the audit log
ActiveWhether the gateway accepts requests - MCP clients cannot reach inactive gateways
URL pathThe path the endpoint is exposed under, e.g. /mcp/billing - this is the address MCP clients connect to
ServicesThe 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
SkillsThe skills the gateway serves as MCP prompts - agents read them through prompts/list and prompts/get
SecurityThe API key and Basic Auth definitions whose holders may call the gateway - details under security
OAuthWhether 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
ScopesWith OAuth on, the scopes the metadata document tells clients to ask for, e.g. openid profile
Session TTLHow many seconds a session may stay idle before it expires - 30 minutes by default, set through the session_ttl attribute in enmasse
Invoke timeoutHow 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:

ClientHow it connects
VS CodeAn entry in .vscode/mcp.json, with a header or an OAuth client ID
CursorAn entry in .cursor/mcp.json, with a header or an OAuth client ID
Claude CodeOne claude mcp add command, with a header or an OAuth client ID
Claude.ai and Claude DesktopA custom connector with the gateway's URL and an OAuth client ID
ChatGPTAn app with the gateway's URL, registering itself with the identity provider or using a client ID
Microsoft 365 CopilotAn 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.

ControlWhat it does
SecurityRequires API key, Basic Auth or bearer token credentials on every request, with rejections logged
OAuthHas people sign in through your identity provider, with access decided by group membership and each person recorded by name
Rate limitsCaps each agent's traffic, enforced per security definition
Audit logRecords one event per request, with the method, tool, caller, outcome and sizes
AlertsRaises 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 validationChecks tools/call arguments against each tool's schema before the tool runs
Response controlsApplies PII removal, prompt-injection safeguards and token-denominated size caps to tool responses
Agent filtersRuns a per-call JSONata expression the agent sends, returning only the fields it needs
Sharing with clientsExports the gateway's address, headers and tools as one server.json document for client teams

See also

FeatureWhat it does
Tool schemasHow each service's input and output become its tool schema
SecurityAPI keys, Basic Auth and bearer tokens for gateways
OAuthSign-in through Entra ID, Keycloak or another identity provider
Audit logOne event per agent request, with caller, tool and outcome
MCP tutorialA gateway built and called from Claude Code, end to end

Learn more