File uploads for MCP servers using short-lived upload tickets.
View on GitHub ↗File uploads for MCP servers, using short-lived upload tickets.
An MCP tool that needs a file hands back a single-use URL. Whoever holds the file posts it there over plain HTTPS. The server streams the bytes straight through to the backend you already have, and keeps a small record of what happened. Nothing about the file ever travels through MCP except a reference to it. No change to the protocol is needed, and no host has to know the library exists.
Targets protocol revision 2026-07-28. Works with the official Python SDK (mcp 2.x) and with FastMCP (fastmcp 3.x). Python 3.11 or later. Apache 2.0.
MCP can carry binary data from a server back to a model, as image, audio or embedded resource content. It cannot carry a file the other way. A tool call is JSON, its inputs are described by JSON Schema, and there is no file type in that vocabulary and no way to tell a host "this argument is a file, show a picker".
The usual workaround is to base64 the file into a string argument. The objection people reach for is context-window size. The real problem is who types the bytes. Tool arguments are model output, generated token by token, so the model has to produce the whole encoded file, perfectly. Base64 tokenizes at roughly 1.4 to 1.5 characters per token on OpenAI's encoders (English runs about five). A 126 KB image costs about 120,000 output tokens. That is 94% of the 128,000-token per-response ceiling of the largest models available today and over the 64,000-token ceiling of smaller ones. A 500 KiB photo costs about 490,000 tokens, almost four times the larger ceiling. These a
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/imaadkhan-tz--mcp-upload.html)
Self-hosted MCP server: your codebase as a knowledge graph, your secrets in an encrypted vault — both reachable by your AI assistant, and by nobody else.
hirotomasato/yowesGenerate realistic teacher documents (ID cards, licenses, letters) for 13 countries via MCP.
rokbenko/quackd🦆🧠 Give your small robot a brain. Tell a Microduck, a Reachy Mini, a LeRobot arm or any ROS base what you want in plain language. An LLM (Claude, OpenAI, Gemini, Grok, or a local model via Ollama, vLL
lotchuazzz-crypto/papergraph-mcpTurn arXiv and LaTeX mathematical papers into theorem dependency graphs for AI agents through MCP.
Stupidoodle/swissdevjobs-cliSearch & apply to ~4,700 salary-transparent tech jobs across 7 countries (🇨🇭🇩🇪🇬🇧🇺🇸🇨🇦🇳🇱🇫🇷) from your terminal or AI agent — zero-dependency Python CLI + MCP server + Claude Code plugin
bybit-exchange/kaasTurn scattered notes, docs and transcripts into a queryable Markdown wiki — an LLM knowledge-base compiler with MCP access, no embeddings, self-hosted.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.