S2SP enables direct data transfer between MCP servers without passing data through the agent's context window — saving tokens, reducing latency, and preserving agent control.
S2SP (Server-to-Server Protocol) is an open protocol extension for MCP that enables direct data transfer between MCP servers, orchestrated by the AI agent.
Think of S2SP like a direct pipeline between servers. Just as you wouldn't route a file transfer through your brain when copying between two USB drives, S2SP lets MCP servers exchange data directly — while the agent stays in control of what moves where.
Current MCP forces all data through the agent. S2SP fixes this.
A 50K-row CSV transfer consumes ~500K tokens through the agent. With S2SP: zero data tokens. Only small control messages pass through the agent.
Benchmarked 6–11ms mean latency for transfers up to 5MB. Data flows directly via HTTP, bypassing LLM inference entirely.
The agent initiates and orchestrates all transfers. No data moves without agent authorization. The agent controls which servers receive each resource_url.
Built on Starlette and httpx — already dependencies of MCP. S2SP adds nothing new to your dependency tree.
256-bit presigned URLs — single-use, 10-min TTL. Agent-delegated authorization.
S2SP uses existing MCP mechanisms: experimental capabilities, standard tools, logging notifications. No spec changes needed.
Transfer 50K-row query results directly from a database server to an analytics server. Agent says "analyze last month's sales" — data flows directly, results come back as a summary.
Send large files from a filesystem server to a processing server for OCR, text extraction, or image resizing — without base64-encoding megabytes into the agent's context.
Sync customer records from a CRM server to an email marketing server. Agent orchestrates the filter and sync; data moves directly between services.
Measured on 8 NWS weather alerts (29 columns each). The agent picks which columns it needs — the rest go server-to-server.
Data-plane fetch latency (7ms) measured on localhost. For remote deployments, latency depends on network distance between the two MCP servers, not the protocol — S2SP adds no overhead beyond standard HTTP.
Get up and running in minutes.
pip install mcp-s2sp
from mcp_s2sp import S2SPServer server = S2SPServer("weather-server") @server.s2sp_resource_tool() async def get_alerts(area: str) -> list[dict]: return await fetch_from_nws(area)
# 1. Control plane: agent gets only selected fields + _row_id result = get_alerts(area="CA", abstract_domains="event,severity,headline") # result.abstract = [{_row_id: 0, event: "Wind Advisory", ...}, ...] # result.resource_url = "http://..." # 2. Agent filters on abstract, picks rows it cares about selected = [row for row in result.abstract if "Wind" in row["event"]] # 3. Pass abstract rows to consumer — it fetches body from data plane draw_chart(abstract_data=json.dumps(selected), resource_url="http://...")
Learn what S2S is, why it exists, and the core concepts behind the protocol.
Message types, state machine, transfer lifecycle, and security model.
Build S2S-capable MCP servers with the mcp_s2sp Python package.
Three runnable demos: DB-to-Analytics, File Processing, CRM Sync.