MCP federation

Aggregate multiple upstream MCP servers behind one endpoint with namespace prefixes and a tool allowlist.

What it does

MCP federation puts one endpoint in front of multiple upstream MCP servers. The gateway aggregates each upstream's list_tools response into one catalog, applies an optional namespace prefix per upstream, and dispatches tools/call JSON-RPC requests to the right server.

Configuration

origins:
  "mcp.example.com":
    action:
      type: mcp
      mode: gateway
      server_info:
        name: example-mcp
        version: "1.0.0"
      federated_servers:
        - origin: github.example.com
          prefix: gh
          transport: streamable_http
        - origin: postgres.example.com
          prefix: db
          transport: streamable_http
        - origin: jira.example.com
          prefix: jira
      guardrails:
        - type: tool_allowlist
          allow:
            - gh.search_repos
            - db.query
            - jira.search_issues

Field reference

FieldDescription
modeOnly gateway is implemented today. Defaults to gateway.
server_info.name / .versionIdentity returned in MCP initialize responses.
federated_servers[].originUpstream endpoint. Full URL or bare hostname (bare hostnames resolve to https://<host>/mcp).
federated_servers[].prefixNamespace prefix applied to every tool from this upstream. Tools become <prefix>.<tool>.
federated_servers[].transportstreamable_http (default) or sse.
guardrails[].type: tool_allowlistAllow only the named (already-prefixed) tools through tools/call. An empty list denies every call.

Federation behavior

  • Discovery merge. Each upstream's list_tools response is merged with its prefix applied. Tool name collisions get the server name as an additional prefix automatically.
  • Tool allowlist. The gateway-level allowlist runs before forwarding any tools/call.
  • Transport choice. Per-upstream streamable_http or sse. The federation client uses a single shared HTTP client.

Authentication

SBproxy's auth providers (api_key, basic_auth, bearer, jwt, digest, forward_auth, bot_auth) attach to MCP origins through the standard authentication: block, the same way they attach to any other origin. See Authentication.

Reserved fields

The following fields parse but are not yet enforced. Setting either is a hard config error today.

  • federated_servers[].rbac
  • federated_servers[].timeout

Per-server credential injection from the vault, OAuth 2 with DCR / PKCE / DPoP, and the OpenAPI-to-MCP bridge are on the roadmap and not present in the data plane today.

Audit

Every tool call is logged through the standard SBproxy access log. Stream it to OpenTelemetry, syslog, or any sink the OSS audit pipeline supports.

See also