Open Protocol for MCP

Server-to-Server Data Transfer for MCP

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.

Get Started Read the Spec
S2SP Protocol Diagram
83–93%
Token savings (fewer abstract cols = more savings)
7ms
Data-plane fetch (localhost)
100%
MCP backward compatible

What is the S2SP Protocol?

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.

How S2S Works

Why does S2SP matter?

Current MCP forces all data through the agent. S2SP fixes this.

$

Eliminate Token Waste

A 50K-row CSV transfer consumes ~500K tokens through the agent. With S2SP: zero data tokens. Only small control messages pass through the agent.

Sub-12ms Transfers

Benchmarked 6–11ms mean latency for transfers up to 5MB. Data flows directly via HTTP, bypassing LLM inference entirely.

🔒

Agent Stays in Control

The agent initiates and orchestrates all transfers. No data moves without agent authorization. The agent controls which servers receive each resource_url.

🔧

Zero New Dependencies

Built on Starlette and httpx — already dependencies of MCP. S2SP adds nothing new to your dependency tree.

🛡

Secure by Design

256-bit presigned URLs — single-use, 10-min TTL. Agent-delegated authorization.

Fully Backward Compatible

S2SP uses existing MCP mechanisms: experimental capabilities, standard tools, logging notifications. No spec changes needed.

What can S2SP enable?

📊

Database → Analytics Pipelines

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.

📄

File Processing Pipelines

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.

👥

Cross-Service Data Sync

Sync customer records from a CRM server to an email marketing server. Agent orchestrates the filter and sync; data moves directly between services.

Token Savings

Measured on 8 NWS weather alerts (29 columns each). The agent picks which columns it needs — the rest go server-to-server.

Token Savings Comparison

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.

Quick Start

Get up and running in minutes.

$ pip install mcp-s2sp

Resource Server (exposes an S2SP tool)

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)

Agent Orchestration (control plane + data plane)

# 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://...")

Start Building