SEP-2631: File Objects and Transfer#2631
Draft
caseychow-oai wants to merge 11 commits into
Draft
Conversation
9f7caad to
d1e6de6
Compare
localden
added a commit
to modelcontextprotocol/access
that referenced
this pull request
Apr 24, 2026
Casey is the author of SEP-2631 (File Objects and Transfer), see modelcontextprotocol/modelcontextprotocol#2631. :house: Remote-Dev: homespace
d1e6de6 to
8c45ad6
Compare
fe09240 to
9bb59fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces SEP-2631 for first-class MCP file transfer. It builds on SEP-2356's
x-mcp-fileinput declaration model, keeps file-valued inputs as URI strings, and adds out-of-band upload/download negotiation plus generated file outputs.Motivation
MCP has partial primitives for file-like workflows, but no single interoperable story for "the user gives a file to a tool" or "a tool returns a file to the user." Implementations currently rely on ad hoc argument conventions, hosted-storage handles, inline base64, or harness-specific rewriting. That makes file upload behavior drift across clients, gateways, and servers, and it makes it hard for server authors to declare portable file-taking tools.
What This SEP Proposes
This SEP adds a focused file transfer contract:
x-mcp-fileon URI string schema properties.data:URIs or with file URIs prepared throughfiles/prepareUpload.x-mcp-file.transferModeslets servers allow inline transfer, require upload transfer, or leave clients free to choose.FileValueoutputs — generated or returned files use a URI plus optional display metadata such as name, MIME type, and size.files/prepareUploadandfiles/getDownloadnegotiate HTTPS transfer descriptors while keeping bytes out of JSON-RPC payloads.resources/read.FileValuecan appear in structured tool output, file content blocks, and optional file-backed resource contents.Relationship to Other SEPs
This SEP is designed to complement nearby work:
x-mcp-filedeclarations and extends the URI-string value contract with negotiated file URI transfer.Validation
npm run generateenv npm_config_cache=/private/tmp/mcp-npm-cache mise x node@22.20.0 -- npm run checkAI Assistance Disclosure
This SEP was drafted with Codex assistance under human direction and review.