Skip to content

SEP-2433: Transfer Descriptors — Out-of-Band Data Transfer Negotiation#2433

Open
bhanquier wants to merge 6 commits intomodelcontextprotocol:mainfrom
bhanquier:sep/transfer-descriptors
Open

SEP-2433: Transfer Descriptors — Out-of-Band Data Transfer Negotiation#2433
bhanquier wants to merge 6 commits intomodelcontextprotocol:mainfrom
bhanquier:sep/transfer-descriptors

Conversation

@bhanquier
Copy link
Copy Markdown

@bhanquier bhanquier commented Mar 22, 2026

Summary

This SEP proposes Transfer Descriptors, a structured mechanism for MCP servers to negotiate out-of-band data transfers instead of passing large payloads inline through JSON-RPC.

The core idea: MCP remains the control plane (discovery, negotiation) and delegates actual data transfer to the optimal channel (HTTP, S3, WebSocket, BitTorrent, filesystem, etc.) via a structured Transfer Descriptor.

Three Levels

Level When Token cost How it works
Level 1 Client knows the protocol 0 Native handler — deterministic, no LLM
Level 1.5 Same protocol seen before 0 Cached code from prior Level 2 — replay without LLM
Level 2 Unknown protocol ~2-10K (one-time) LLM reads protocol description, generates transfer code, executes in sandbox. Code cached for Level 1.5

After a single Level 2 invocation, all subsequent transfers with the same protocol cost 0 tokens.

Analogy

SDP in WebRTC: SDP negotiates codecs and transport, media flows peer-to-peer. Transfer Descriptors do the same for agent data transfer.

Motivation

  • MCP today passes everything through JSON-RPC (base64 for binary) — doesn't scale for large payloads
  • SEP-1306 (Binary Mode Elicitation) validates the out-of-band pattern but is limited to uploads
  • MCP 2026 roadmap lists "reference-based results" as planned but unspecified
  • No protocol in the ecosystem (MCP, A2A, ACP, ANP) has a structured per-transfer negotiation mechanism

Key Features

Protocol Selection Hierarchy

When offering multiple protocols, servers rank by strict priority:

  1. Security — encrypted > unencrypted, built-in integrity, scoped credentials
  2. Efficiency — match protocol to data pattern (streaming, P2P fan-out, bulk download)
  3. Overhead — binary > base64, compressed, Level 1 > 1.5 > 2

Protocol Marketplace

A registry where protocol descriptions are published, versioned, and discovered by agents. Ships with built-in descriptions for HTTP, SSE, WebSocket, S3 presigned, MQTT, WebRTC DataChannel, WebTorrent/BitTorrent v2.

Use Cases

Use case Protocol What it enables
Voice over MCP (VoMCP) HTTPS, WSS STT/TTS/duplex voice via descriptor extension. Validated E2E with Groq Whisper: 283ms, 0 tokens.
P2P between agents WebTorrent 10 agents need same dataset → P2P swarm. More agents = faster. Server cost O(1) not O(n).
Large dataset export S3 presigned 2GB Parquet with range requests, resume, integrity check. Zero context consumed.
Real-time telemetry WSS, SSE One connection, continuous events. No polling, no token cost per data point.
Multi-agent handoff Descriptor chains Data moves A → storage → B (once), not A → server → B (twice).

Reference Implementation

A working PoC with 5 npm packages (types, server, client, CLI, proxy) + VoMCP extension (voice, voice-server). Three demo scenarios validate Level 2 with protocols the client has never seen:

Scenario What it proves
Paginated API with HMAC-SHA256 auth LLM learns a non-standard auth scheme + pagination
Proprietary binary codec LLM parses a binary format that exists nowhere on the internet
SSE stream with custom framing LLM consumes a real-time stream with custom event parsing

PoC: transfer-over-mcp

Seeking Sponsor

Looking for a sponsor among the Core Maintainers to shepherd this proposal.

Discussion: #2437


Disclosure: AI assistance (Claude Code) was used for implementation and documentation. The design, architecture decisions, and specification text were authored by the PR author.

bhanquier added a commit to bhanquier/tomcp that referenced this pull request Mar 22, 2026
MCP as negotiation layer for data transfer, not the pipe itself.

Packages:
- @tomcp/types: shared Zod schemas and TypeScript types
- @tomcp/server: buildDescriptor(), tomcpResult(), registerToMCPTools()
- @tomcp/client: executeTransfer(), handleDescriptor(), LLM providers

Features:
- Level 1: structured descriptor routing (http, https, fs)
- Level 2: LLM generates transfer code from protocol description
- Multi-LLM: Gemini 2.5 Flash + Claude Sonnet + bring-your-own
- Retry with tier escalation (high → mid → full)
- Demo: 3 scenarios pass end-to-end (paginated API, binary codec, SSE)

SEP-2433: modelcontextprotocol/modelcontextprotocol#2433

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bhanquier bhanquier requested review from a team as code owners March 23, 2026 02:26
@dend dend added proposal SEP proposal without a sponsor. SEP labels Mar 23, 2026
@dend dend changed the title SEP: Transfer Descriptors — Out-of-Band Data Transfer Negotiation SEP-2433: Transfer Descriptors — Out-of-Band Data Transfer Negotiation Mar 23, 2026
bhanquier and others added 4 commits March 23, 2026 07:18
Table alignment, blank lines before lists.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run `npm run generate:seps` to produce the required .mdx file
and fix table/list formatting issues caught by CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SEP previously described two levels. The implementation has three:
- Level 1: native handler (0 tokens)
- Level 1.5: cached code from prior Level 2 (0 tokens after first run)
- Level 2: LLM generates code (one-time cost, then cached)

Added:
- Level 1.5 flow diagram and specification (§3.2)
- Updated Abstract to describe three levels
- Updated Rationale (§Why Three Levels) with cost curve
- Replaced "Descriptor caching" open question with specific
  cache invalidation and cross-agent sharing questions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bhanquier bhanquier force-pushed the sep/transfer-descriptors branch 2 times, most recently from 777544a to 96eaba9 Compare March 23, 2026 06:20
bhanquier and others added 2 commits March 23, 2026 08:26
…ead)

When servers offer multiple protocol candidates, they MUST rank by:
1. Security: encrypted over unencrypted, built-in integrity, scoped creds
2. Efficiency: match protocol to data pattern (streaming, P2P, bulk)
3. Overhead: binary over text, compressed, Level 1 > 1.5 > 2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add 'collaborate' as 4th transfer mode
- Add collaborate config schema (session_id, role, intent, participants, sync_protocol, blackboard)
- Add Section 7: Collaborative Transfers with flow diagram and 5 use cases
- Add collaborative mode security risks (session hijacking, poisoned contributions, participant enumeration)
- Add 4 collaboration-related open questions (7-10)
- Reference implementation: @tomcp/collab npm package

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proposal SEP proposal without a sponsor. SEP

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants