MCP and Agents

One gateway for tool-calling traffic (MCP) and agent-to-agent delegation (A2A), with the same auth and observability as everything else.

Overview

SBproxy speaks two protocols for agent traffic. MCP (Model Context Protocol) is for tool calling: an agent discovers and calls tools exposed by one or more upstream servers. A2A (Agent-to-Agent) is for delegation: one agent handing work to another. Both run through the same gateway as your HTTP and AI traffic, so the same auth, rate limiting, and observability apply without a separate stack.

MCP gateway: federate and govern tool calls

The mcp action federates one or more upstream MCP servers behind a single endpoint, namespacing tools and resources per upstream, and serves the standard JSON-RPC method set (initialize, tools/list, tools/call, resources/*, prompts/*).

Four things sit on top of the wire protocol:

  • Security. A tool description or tool output can read as an instruction to the model, not just data. Threat classes here include tool poisoning, definition tampering after approval, and credentials an agent should never hold.
  • Guardrails. Deterministic egress allowlisting, a lethal-trifecta session guardrail (private-data tools plus external-communication tools in one session gets denied), dual-LLM output quarantine, and stdio supervision.
  • Tool lifecycle. MCP has no native answer for publishing several versions of one tool and resolving the right version per consumer. SBproxy adds a rollout plane and a compatibility oracle that fails a version bump when a breaking change ships without a matching major version.
  • Admin over MCP. The gateway's own admin API is exposed as governed MCP tools, so an agent client like Claude Code or Cursor can check health or read config without a human holding the admin credential.
Initialize an MCP session against the admin API and confirm the notification handshake

A2A gateway: agent-to-agent delegation

The a2a action proxies JSON-RPC A2A traffic to an upstream, and the a2a policy enforces per-hop chain depth, cycle detection, and a callee allowlist. It pairs with MCP federation, one gateway serving both protocols.

The trust story matters more than the wire format here. An envelope claiming who is calling, who is being called, and how deep the delegation chain already runs is only as trustworthy as its source. A signed claim chain is verifiable; a plain header is only honored from a trusted proxy peer.

Agent Skills and content for agents

Agent Skills discovery is a different thing from tool calling: a /.well-known/agent-skills/index.json manifest a cooperative agent fetches to learn what an origin advertises before ever making a tool call.

Content shaping for agents covers a different direction of traffic entirely: an agent fetching your pages instead of calling your tools. Accept negotiation picks a body shape (Markdown, or a JSON envelope with a token estimate), and a Content-Signal header carries your per-origin editorial stance.

Who this is for

AI users wiring an agent framework to real tools start with the MCP wire shape, then security, before federating anything they do not control. Developers building an MCP or A2A integration lean on tool versioning and A2A's trust model to stop a breaking change or a spoofed envelope from reaching production. SRE leads operating this in production tune the session and egress guardrails per incident, and rate-limit by resolved agent identity instead of IP.