MCP Server

Model Context Protocol gateway. Federate one or more upstream MCP servers behind a single endpoint.

Overview

The mcp action turns SBproxy into an MCP gateway. It accepts JSON-RPC 2.0 over HTTP, presents one endpoint to MCP clients (Claude Desktop, agent runtimes, custom hosts), and forwards tools/call requests to one or more upstream MCP servers.

Today the action operates exclusively as a federating gateway. To author tools, run a small MCP server (Python, TypeScript, or Go SDK) and federate it under SBproxy.

Capabilities

  • Federation. Aggregate list_tools from one or more upstream MCP servers into a single catalog.
  • Namespace prefixing. Apply a per-upstream prefix so tool names from different servers don't collide.
  • Tool allowlist. Restrict which tools the gateway forwards tools/call requests to.
  • Transport choice. streamable_http or sse per upstream.
  • Standard origin features. Authentication, rate limits, audit logging attach the same way they do to any other origin.

Minimal configuration

proxy:
  http_bind_port: 8080

origins:
  "mcp.example.com":
    action:
      type: mcp
      mode: gateway
      server_info:
        name: my-mcp
        version: "1.0.0"
      federated_servers:
        - origin: tools.internal
          prefix: internal
          transport: streamable_http

Test it:

curl -H "Host: mcp.example.com" http://localhost:8080/mcp   -H "Content-Type: application/json"   -d '{"jsonrpc": "2.0", "method": "initialize", "id": 1}'

Authentication and policy

Attach the standard authentication: block to gate access. Any of the OSS auth providers work: api_key, basic_auth, bearer, jwt, digest, forward_auth, bot_auth. Rate limits, tool allowlists, and audit logging attach the same way they do to any other origin.

See also