anythingmcp
anythingmcp copied to clipboard
Let AI clients upload files they created for connector tools
Problem
Connector tools that send a file (123 tools in 58 adapters use the REST engine's __file marker: Etsy listing images and digital files, marketplace product images, document signing…) only take a public URL. An AI client that created the file itself, in its code sandbox, has no public URL, and an MCP tool call cannot carry the bytes (a 2 MB image is ~2.7 M base64 characters). File Share links do not help: a public share link opens a page, and __file needs a direct download.
Proposal
- A built-in MCP tool
file_upload_linkreturns a one-time upload URL (15 minutes) and a referenceamcp-file:<id>. The sandbox sends the file withcurl -T. - Every
__fileparameter also acceptsamcp-file:<id>: the REST engine reads the file from the File Share storage, only for a connector of the workspace that uploaded it. file_public_urlreturns a signed direct link valid for one hour, for tools where the provider fetches the file itself (images, videos and PDFs only, checked against the file's bytes; max 50 downloads).- Files are deleted 8 hours after upload by a sweep in the backend (no files-worker needed).
Schema change
New table file_uploads (additive migration, no foreign keys so a row outlives a deleted workspace until its stored file is swept).
Cloud and self-hosted
- Cloud: per-plan caps (25 MB trial, 50 MB Starter, 100 MB Team/Business, 200 MB Enterprise per file; daily and stored limits), instance-wide brakes, kill switch.
- Self-hosted: every edition, Community included; caps only when set by env.