MCP File Uploads: A Standard Way to Move Files

On November 10, 2026 the Model Context Protocol working group published a draft extension for moving files between MCP clients and servers: io.modelcontextprotocol/files. It is explicitly experimental, there is no reference implementation yet, and the group plans to submit it as an Extensions Track SEP once one exists. But it answers a question every agent platform has already had to answer badly.

The problem: files were never part of the contract

An agent that reads a PDF and writes back a CSV is table stakes. The protocol underneath never said how the bytes travel. So every server invented its own convention: a tool that takes a public URL to an already-uploaded file, a base64 blob stuffed into a string argument, a bespoke /upload endpoint documented in a README. Each one works until a second client shows up.

Base64 in the arguments is the tempting shortcut, and the one that fails first. Those bytes pass through the model's context window — a 20 MB PDF is not an argument, it is a budget.

What changed

The extension splits the problem into negotiation, annotation, and an out-of-band transfer.

Negotiation. The server advertises the extension in its server/discover response under capabilities.extensions, with upload for out-of-band transfer and maxInlineBytes for small inline payloads — 0 or absent means inline transfer is not accepted. The client declares its own side in io.modelcontextprotocol/clientCapabilities metadata on every request of a logical call, tools/list included, with upload, download, or both. A client that does not declare support should not be offered the tool at all, or should be offered an alternative.

Annotation. A file argument is marked in the tool's input schema with x-mcp-file, carrying accept and maxSize:

json
{
  "file": {
    "type": "object",
    "x-mcp-file": {
      "accept": ["application/pdf"],
      "maxSize": 157286400
    },
    "required": ["id", "mimeType", "size"]
  }
}

Clients that do not know the extension ignore the annotation — it is a plain JSON Schema extension keyword, following the same pattern as x-mcp-header.

Transfer. The client calls the tool with metadata only: id, mimeType and size are required, name and a SHA-256 digest optional. The server answers with resultType: "upload_required", an uploads array of targets, and an opaque top-level requestState:

json
{
  "resultType": "upload_required",
  "uploads": [
    {
      "fileId": "file-1",
      "url": "https://upload.example.com/u/01JD3V7K2M?sig=...",
      "headers": { "Content-Type": "application/pdf" },
      "credentials": "omit",
      "expiresAt": "2026-11-04T18:30:00Z"
    }
  ],
  "requestState": "..."
}

The client PUTs the bytes — or POSTs a multipart form when the target says so — then repeats the same tools/call with requestState added and the arguments unchanged. The server verifies that state, confirms the bytes with storage, re-validates size and type, and only then runs the tool. If any file failed to get a 2xx, the retry is never sent, so the tool never runs on bytes nobody confirmed.

Caveats worth reading before building on it

credentials: "omit" is the subtle one. It means no MCP credential is attached, which protects the token — but it says nothing about where the bytes go. Host approval happens before the target URL is known, so a malicious server can point an upload at an endpoint it controls and the approval prompt will never mention it. The spec's answer is an operator allowlist of origins, and whether that allowlist should be mandatory is still listed as an open question.

Downloads have no approval step at all. A downloaded file can carry instructions aimed at the model, and digest proves only that the bytes arrived intact. The spec is blunt about it: a harmful file with a matching digest is still a harmful file.

The hard requirements are what to implement first. Clients must not follow redirects and must treat any 3xx as a failed transfer; must check size, and digest when present, and discard on mismatch; must reduce name to a safe base name before it touches a filesystem, never overwrite without approval, never set the execute bit. Both sides must redact target URLs, headers, form fields, requestState and inline data from logs, traces and error reports — a pre-signed URL is the credential.

The download shape itself is unsettled: the working group notes it has discussed downloads without reviewing the current _meta design, and is weighing resource_link instead.

Takeaway

This sits at the right layer. Platforms moving files through agents today pay a per-server integration tax, and a negotiated extension with out-of-band transfer removes it without pushing bytes through the context window. Read it and send feedback now; ship on it once the SEP and a reference implementation land. It pairs naturally with the auth work in MCP 2026-07-28 — credentials: "include" only makes sense when the token story is already solid.

Primary sources: Exploring File Uploads and Downloads in MCP and the draft specification.