MCP Gateway

MCP Gateway & Tool Catalog

Govern remote Streamable HTTP MCP servers through one unified endpoint or isolated per-server paths—with cryptographic tool pinning, poisoning quarantine, and six upstream authentication modes.

Streamable HTTP Scope: /mcp vs. /s/<slug>/mcp

Remote Streamable HTTP only: The Control Proxy MCP Gateway governs remote Streamable HTTP MCP servers reachable over HTTPS. It does not execute or intercept local stdio MCP servers running as child processes on employee laptops.

Once a catalog admin adds a server (assigning an immutable lowercase slug, upstreamUrl, dataClassification of public / internal / confidential / restricted, and riskTier of low / medium / high) and moves it from draft to published, users can connect via two endpoint patterns:

Endpoint Behavior Best Used For
/mcp Aggregated gateway exposing every published server the caller holds an active grant for. Tool names are prefixed as <slug>__<tool>; newly approved servers appear automatically on reconnect without changing client config. General-purpose coding and desktop agents (Claude Code, Claude Desktop, Codex, Cursor, VS Code) across engineering and business teams.
/s/<slug>/mcp Isolated endpoint scoped strictly to a single catalog server with unprefixed tool names. Still enforces all grants, approvals, DLP, guardrails, and audit logging. Focused business agents (such as a Copilot Studio HR or CRM agent) or pipelines that should only ever see one server’s tool surface.

Protocol & Transport Hardening

Before any MCP request reaches authorization or upstream forwarding, the gateway validates transport and JSON-RPC framing at Tier 1:

  • Supported MCP protocol versions: Accepts validated MCP-Protocol-Version headers for 2026-07-28, 2025-11-25, 2025-06-18, and 2025-03-26. Unsupported versions are rejected immediately with HTTP 400 (JSON-RPC error -32022).
  • Strict Origin checks: Validates HTTP Origin headers on incoming requests and rejects untrusted or null origins with HTTP 403 untrusted_origin.
  • Strict JSON-RPC 2.0 parsing: Enforces valid JSON-RPC 2.0 envelopes and rejects duplicate keys or Unicode-escaped JSON keys that could cause parser-differential bypasses (HTTP 400, JSON-RPC -32600).

Proxying tools/*, resources/* & prompts/*

Both /mcp and /s/<slug>/mcp govern the full set of MCP capability primitives—each gated by the caller’s active server grants:

  • Tools: tools/list (served from pinned catalog definitions, with quarantined/drifted tools filtered out) and tools/call (guarded by 6-class argument guardrails, DLP, and AI Judge).
  • Resources: resources/list, resources/templates/list, and resources/read. Resource URIs and returned contents pass through URI/path-traversal/SSRF guardrails, DLP detectors, and the AI Judge.
  • Prompts: prompts/list and prompts/get. Template arguments and returned prompt messages are checked by poisoning scanners, DLP, and Threat Protection before reaching the client.

6 Upstream Authentication Modes

Configure how Control Proxy authenticates outbound requests to each upstream MCP server under Sign-in to the server in Catalog & Models → Manage catalog:

Mode Portal Label Mechanism & Security Properties
none None needed Public or unauthenticated upstream servers (such as public documentation MCP endpoints).
shared_api_key One shared token / API key for everyone Admin stores one bearer token or custom header/prefix credential (default Authorization: Bearer). Sealed with hardware-backed envelope encryption bound to upstream_origin, write-only, and never returned via API.
user_api_key Each user’s own API key Each authorized user stores their own write-only credential on the server’s catalog page; the gateway injects it strictly on that user’s calls.
oauth_user Each user signs in at the server (OAuth) Per-user OAuth against the upstream authorization server (supports one-click metadata discovery via Detect). The gateway stores, encrypts, and refreshes per-user tokens.
oauth_xaa Cross App Access — company sign-in decides (ID-JAG) Zero-click enterprise authorization: exchanges the user’s IdP assertion for an ID-JAG (RFC 8693) and redeems it at the upstream server via jwt-bearer (RFC 7523).
gateway_token The gateway tells the server who is calling Designed for internal/custom MCP servers. No shared secret is stored; the gateway signs a short-lived 5-minute RS256 JWT identifying the caller and target server.

Building Internal MCP Servers with gateway_token (RS256 JWKS)

When a server uses gateway_token, Control Proxy signs a fresh 5-minute RS256 JWT per call containing iss (gateway URL), aud (server slug or configured audience), sub (immutable IdP subject ID), email, name, exp, and jti. Your server verifies the signature against three non-secret values displayed on the server’s catalog page:

GATEWAY_KEYS_URL=https://yourcompany.controlproxy.com/.well-known/jwks.json
GATEWAY_ISSUER=https://yourcompany.controlproxy.com
TOKEN_AUDIENCE=<server-slug>

Gateway signing keys rotate automatically every 90 days with a 1-hour overlap at /.well-known/jwks.json. Pair JWT verification with network ACLs so only the gateway can reach the internal server directly.

One-Click Tool Sync & Cryptographic Drift Detection

To prevent silent “rug pull” mutations where a remote MCP server alters tool behavior after approval, Control Proxy pins every synced capability:

  1. One-click sync: Click Sync tools from the server (or call POST /api/v1/admin/catalog/servers/:id/tools/sync). For none, shared_api_key, and gateway_token, the gateway queries the upstream server automatically; for per-user modes (user_api_key, oauth_user, oauth_xaa), supply a temporary sync token (never stored).
  2. Cryptographic pinning: Each tool’s description, inputSchema, annotations, and outputSchema is hashed (toolSchemaHash, SHA-256) and stored in the catalog.
  3. Runtime enforcement & drift hold: At runtime, tools/list is served from the pinned catalog definitions. Any tool whose live schema, description, annotations, or outputSchema has changed (drifted) or appeared unexpectedly (uncatalogued) is automatically held back from AI agents until an admin reviews and re-syncs.
  4. Scheduled checks & poisoning quarantine: Background drift checks run automatically every 24 hours by default (configurable 0–168 hours) and raise tools_held alerts. High-risk poisoned metadata (hidden Unicode tags, override instructions, shadowing) is quarantined automatically.

Access Grants & Payload Capture

  • Lifecycle & grants: Servers move through draft, published, deprecated, and retired. Users request access in the Catalog (routed to Access → Approvals) or admins grant access directly via Give access or Server groups.
  • Payload capture: Portal payload capture is configurable per MCP server. When enabled, secret-looking values, card numbers, SSNs, and bank account numbers are scrubbed (Storage redaction) before hardware-backed envelope encryption, and every payload inspection writes an entry to the Audit Log. SIEM export of payloads is controlled separately and off by default.