Skip to main content
MCP servers typically receive files only through the LLM conversation — every byte burns tokens and inflates latency. File upload components let users send files directly to your backend tools via CallTool, keeping binary data out of the context window entirely. This example stays fully client-side to demonstrate the UI mechanics, but in practice you’d wire the DropZone’s on_change (or a button’s on_click) to a CallTool that sends the base64 payload to your server for processing.