Skip to content

Conversation

BrokenDuck
Copy link

Why?

Making pyodide able to persist files would allow a lot of new workflows such as image manipulation or dataframe manipulation. A large file can be uploaded to the MCP server and manipulated in python. The file can later be downloaded.

What?

Add a new CLI option, --mount-fs, activates the persistence.

New MCP tools:

  • upload_file: Copy request content to the file in the persistence storage.
  • upload_file_from_uri: URI content will be copied to a file in the persistent storage. Any URI supported by fetch is supported.
  • retrieve_file: Retrieve file from its filename. Following MCP protocol, a resource link is returned.
  • delete_file: Delete a file from the persistence storage.

New MCP Resource:

  • Any file uploaded to the MCP server appears as a resource which can be retrieved. A text resource is returned for common file types, otherwise a base 64 blob is returned.

How?

We mount a NODEFS emscripten file system in a temporary directory of the local file system during the run of the MCP Server. Therefore, Deno requires access to the temporary directory.

@BrokenDuck BrokenDuck marked this pull request as ready for review September 3, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant