ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Getting Started
Concepts
API Management
AI Gateway
MCP Gateway
    Overview
    Getting Started
      How it works
      Connect MCP clients
      Authentication
      Cross App Access
      Configuration
      Policies
      Observability
      ReferenceServer RegistryTroubleshooting
    MCP Server
    Developer Portal
    Development
    Deploying & Source Control
    Analytics
    Observability
    Networking & Infrastructure
    Account Management
    Programming API
    Build with AI
    Zuplo CLI
    Migration Guides
    Platform LimitsVersion Support PolicySecuritySupportTrust & ComplianceChangelog
    powered by Zuplo
    MCP Gateway

    Gateway reference

    This page is the lookup table for facts about the gateway — every URL it exposes, every default TTL, the OAuth scope it issues, the headers it honors, and the configuration constants you need to set.

    Public URLs

    The URLs below are all relative to the gateway origin. For a project deployed to https://my-gateway.zuplo.dev with an MCP route at /mcp/linear-v1, the public route is https://my-gateway.zuplo.dev/mcp/linear-v1.

    The gateway mounts its internal OAuth and upstream-connection action routes under the basePath configured on the McpGatewayPlugin. The default base path is /__zuplo, which keeps gateway endpoints out of your API's route namespace. Discovery documents (/.well-known/…) always stay at the origin root because RFC 8414 / RFC 9728 locate them relative to the issuer. Pass basePath: "/" in the plugin options to mount action routes at the origin root instead.

    Well-known metadata

    PathMethodsPurpose
    /.well-known/oauth-authorization-serverGET, OPTIONSRFC 8414 Authorization Server metadata for the gateway. Issuer is the gateway origin.
    /.well-known/oauth-authorization-server/{routePath*}GET, OPTIONSPer-route AS metadata. The issuer is rebound to the route's canonical URI, and authorization_endpoint points at {basePath}/oauth/authorize/{routePath}.
    /.well-known/oauth-protected-resource/{routePath*}GET, OPTIONSRFC 9728 Protected Resource Metadata for an MCP route. Lists resource, resource_name, authorization_servers, bearer_methods_supported, scopes_supported, and mcp_protocol_version.

    These routes are CORS-permissive (Access-Control-Allow-Origin: *) because spec-compliant browser-resident MCP clients fetch them cross-origin.

    OAuth endpoints

    Paths below use the default basePath of /__zuplo. Substitute your configured basePath if you changed it.

    PathMethodsPurpose
    /__zuplo/oauth/registerPOSTRFC 7591 Dynamic Client Registration. Supports none, client_secret_basic, client_secret_post, and private_key_jwt token-endpoint auth methods. DCR clients expire after 90 days.
    /__zuplo/oauth/authorizeGETGateway-wide authorization endpoint. Requires the resource parameter unless exactly one MCP route is configured.
    /__zuplo/oauth/authorize/{routePath*}GETPer-route authorization endpoint. The resource is implicit from the path.
    /__zuplo/oauth/callbackGETBrowser-login callback from the configured identity provider. Renders the consent page.
    /__zuplo/oauth/setupGET, POSTConsent screen. Lists the upstream the requested MCP route depends on. POST accepts decision=continue / approve / cancel.
    /__zuplo/oauth/tokenPOSTRFC 6749 token endpoint. Supports authorization_code and refresh_token grants.
    /__zuplo/oauth/revokePOSTRFC 7009 revocation endpoint. Accepts public-client revocations without authentication.
    /__zuplo/oauth/dev-loginGETLoopback-only dev shortcut. Returns 403 over non-loopback addresses.
    /__zuplo/.well-known/oauth-client/{connection}GETOAuth Client ID Metadata Document the gateway hosts to identify itself to an upstream provider. Requires the ?authProfileId= query parameter.

    Upstream connection endpoints

    PathMethodsPurpose
    /__zuplo/auth/connections/{connection}/connectGETBrowser entry to the upstream OAuth flow. With redirect=true, returns a 302 to the upstream /authorize; otherwise returns 428 with the connect-required payload.
    /__zuplo/auth/connections/{connection}/callbackGETUpstream OAuth callback. Renders a success or failure page.

    MCP Server Registry

    The gateway serves a read-only MCP Server Registry API (v0.1) that advertises every MCP route. Enabled by default; see Server Registry for the endpoint reference and McpGatewayPlugin for configuration.

    PathMethodsPurpose
    {registryPath}/v0.1/serversGET, OPTIONSList servers with cursor/limit/search/version/updated_since.
    {registryPath}/v0.1/servers/{serverName}/versionsGET, OPTIONSList versions for a single server.
    {registryPath}/v0.1/servers/{serverName}/versions/{version}GET, OPTIONSGet a specific version (supports latest alias).
    {registryPath}/v0.1/publishPOST501 — publishing is optional in the spec and not supported.
    {registryPath}/v0.1/servers/{serverName}/versions/{version}PUT, DELETE501 — version update/delete is optional in the spec.
    {registryPath}/v0.1/servers/{serverName}/versions/{version}/statusPATCH403 — no publish/edit permissions.
    {registryPath}/v0.1/servers/{serverName}/statusPATCH403 — no publish/edit permissions.

    {registryPath} defaults to /__zuplo/mcp-registry. Discovery GETs are unauthenticated and CORS-permissive. Error bodies use the spec's {"error": "..."} shape.

    Customer-defined MCP routes

    PathMethodsPurpose
    /<route-path> (one per upstream, e.g. /mcp/linear)GET returns 405; POST proxies upstreamThe MCP route endpoints themselves. AI clients connect here. Path is set in routes.oas.json.

    OAuth scopes

    The gateway issues exactly one scope on access tokens:

    ScopeMeaning
    mcp:toolsPermission to call MCP methods (tools/call, tools/list, prompts/get, resources/read, and so on) on the bound MCP route.

    DCR requests that include any other scope value are rejected with invalid_client_metadata. Token responses always include scope: "mcp:tools".

    Default TTLs

    WhatDefaultWhere to overrideRationale
    Browser session (zuplo_mcp_session)8 hoursbrowserLogin.sessionTtlSeconds on the OAuth policy.Aligns with a typical workday so users don't re-authenticate mid-session.
    Access token15 minutesgateway.accessTokenTtlSeconds on the OAuth policy.Short window contains the blast radius of a leaked token. The token endpoint upper-bounds this by the grant's remaining lifetime, so refresh-rotated tokens shorten as the grant ages.
    Refresh token / grant~10 yearsgateway.refreshTokenTtlSeconds on the OAuth policy.Downstream refresh grants are gateway client sessions, not upstream OAuth token lifetimes. The default is intentionally long so the gateway doesn't impose a shorter session bound than the upstream provider's refresh-token policy already does.
    DCR-registered client90 daysNot configurable.Encourages clients to use CIMD where possible; stale DCR clients age out automatically.
    Authorization code60 secondsNot configurable.OAuth 2.1 recommendation.
    oauth_authorize state15 minutesbrowserLogin.stateTtlSeconds.Window between /__zuplo/oauth/authorize and /__zuplo/oauth/callback.

    Headers

    Required on requests to MCP routes

    HeaderRequiredNotes
    Authorization: Bearer <token>Yes (after initial 401)Opaque access token issued by /__zuplo/oauth/token. Tokens in query strings are rejected.
    Accept: application/json, text/event-streamYesPer the Streamable HTTP transport spec. The gateway forwards the body as-is.
    MCP-Protocol-Version: 2025-11-25Yes after initializePer the MCP spec. The gateway tracks the current MCP protocol revision.

    Honored when present

    HeaderPurpose
    HostSource for the gateway's issuer URL in AS metadata.
    X-Forwarded-HostUsed when behind a reverse proxy or custom domain that rewrites Host.

    If the issuer in your AS metadata document looks wrong (for example, https://*.zuplosite.com instead of your custom domain), check that your proxy or CDN propagates one of those headers correctly.

    Stripped before upstream

    Inbound auth headers don't leak to the upstream — the gateway sets its own upstream Authorization header.

    Compatibility date

    MCP Gateway features require compatibilityDate >= 2026-03-01 in zuplo.jsonc:

    Code
    { "compatibilityDate": "2026-03-01", }

    See Compatibility dates.

    Authorization Server metadata extensions

    In addition to the standard RFC 8414 / OIDC discovery fields, the gateway publishes a vendor extension:

    FieldTypeValuesPurpose
    x-zuplo-browser-login-kindstring"federated_oidc", "local_dev"Lets client tooling special-case local development configurations (which use /__zuplo/oauth/dev-login and a loopback IdP).

    Public route URL pattern

    Each MCP route exposes a stable public URL:

    Code
    https://<gateway-origin>/<route-path>
    • <gateway-origin> is your Zuplo deployment URL (for example https://my-gateway.zuplo.dev) or your custom domain.
    • <route-path> is the path set in config/routes.oas.json for the route — for example /mcp/linear-v1. The convention is /mcp/<provider>-v<n>, but any path works.

    Related references

    • How it works — request lifecycle and architecture.
    • Troubleshooting — symptoms, causes, and fixes for the issues these defaults most often cause.
    • MCP authorization spec (2025-11-25) — the canonical reference for the auth model the gateway implements.
    • MCP Streamable HTTP transport — the transport semantics the gateway uses.
    Edit this page
    Last modified on August 20, 2026
    LoggingServer Registry
    On this page
    • Public URLs
      • Well-known metadata
      • OAuth endpoints
      • Upstream connection endpoints
      • MCP Server Registry
      • Customer-defined MCP routes
    • OAuth scopes
    • Default TTLs
    • Headers
      • Required on requests to MCP routes
      • Honored when present
      • Stripped before upstream
    • Compatibility date
    • Authorization Server metadata extensions
    • Public route URL pattern
    • Related references
    JSON