Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Model Context Protocol 11 min read Deep dive mediumAdept

Exploring File Uploads and Downloads in MCP

A draft MCP extension, io.modelcontextprotocol/files, moves file bytes between clients and storage outside JSON-RPC so models never handle file contents or transfer URLs. Tools mark file arguments with x-mcp-file. The client first sends only metadata, letting the server check permissions and quota, and the server answers with an upload_required result containing pre-signed targets and a tamper-protected requestState. The client then retries the call statelessly under the Multi Round-Trip Requests pattern. Downloads return targets in the result's _meta, a credentials field (omit/include) limits where MCP tokens are sent, and destination allowlisting and the _meta download format remain open questions for feedback.

Assumes: Model Context Protocol basicsJSON-RPCpre-signed URLs

Related posts

  • What’s MCP all about? Comparing MCP with LLM function calling

    Neon mediumAdept

    The Model Context Protocol (MCP) builds on LLM function calling by moving tool definitions and execution out of individual LLM applications into standalone servers that any MCP-compatible client can discover and invoke. A Home Assistant light-control function is implemented both ways. The first version uses OpenAI tool definitions in JSON, with the app parsing tool_calls and executing them itself. The second is an MCP server built with the TypeScript SDK, a Zod schema and stdio transport, registered in Cursor. The takeaway is that function calling leaves discovery and execution to each app, while MCP standardizes them so tools can be reused across agents like Cursor, Windsurf and Claude Desktop.

  • Building the Hugging Face MCP Server

    Hugging Face mediumAdept

    Hugging Face's hosted MCP server at hf.co/mcp runs in production on Streamable HTTP in a stateless, direct-response configuration. That choice permits simple horizontal scaling, since per-user tool selections and Gradio Spaces are looked up per request from HF_TOKEN or OAuth credentials. The write-up compares STDIO, deprecated HTTP+SSE, and the Streamable HTTP patterns (direct response, request-scoped streams, server push), including which MCP features each supports and when sessions are needed. It also explains why real-time tool-list-change notifications are impractical for a public server and reports operational findings: VSCode polling the endpoint when served an HTML page, roughly 100 control messages per tool call, and 164 distinct clients in a week, about half connecting via mcp-remote.

  • MCP Horror Stories: The Supply Chain Attack

    Docker mediumAdept

    CVE-2025-6514 (CVSS 9.6) in mcp-remote, an OAuth proxy downloaded over 437,000 times, let a malicious MCP server achieve remote code execution on developer machines. mcp-remote passed the server-supplied authorization_endpoint unvalidated to the npm 'open' package. On Windows that runs PowerShell, and an 'a:' scheme prefix keeps a $() subexpression from being URL-encoded, so the embedded command executes. Docker pitches its MCP Toolkit as the fix: native OAuth handling in place of the proxy, plus containerized servers with signature verification, network allowlisting, secret blocking and resource limits. It concedes that containerization alone would not have stopped this host-side bug.

  • Bringing MCP to the Cloud

    Neon mediumAdept

    Neon moved its MCP server from a locally spawned stdio process authenticated by a long-lived API key to a hosted server at mcp.neon.tech, using SSE for server-to-client messages and HTTP POST to a /messages endpoint routed by an in-memory session map. Authentication uses OAuth 2.1: the MCP server acts as an OAuth server to MCP clients, with dynamic client registration, PKCE and refresh tokens, and as an OAuth client to Neon upstream. Each session gets its own MCP server instance scoped to the user's Neon token. The server runs as a Docker image on Fly. Open issues include the Node.js dependency introduced by mcp-remote and clients restarting the OAuth flow instead of using refresh tokens.

  • Five Big Improvements to Gradio MCP Servers

    Hugging Face mediumAdept

    Gradio 5.38.0 adds five features for building MCP servers. A "File Upload" MCP server lets agents send local files to remote Gradio apps, and progress notifications now stream to MCP clients. `gr.load_openapi` turns an OpenAPI spec into an MCP server in one line, `gr.Header`-typed arguments extract auth headers and list them in the connection docs, and the `api_description` parameter overrides auto-generated tool descriptions. Short code examples cover the OpenAPI loader, header-based auth and custom descriptions.

The quest for software engineering knowledge.

Look:
Layout: