AI Agents

OpenAI mcpfs mounts MCP servers as a read-only filesystem with tools as Bash scripts

OpenAI's mcpfs turns MCP tools, resources and skills into files and shell commands over FUSE or virtio-fs, so an agent with a shell can use MCP without loading every schema.

Published
December 5, 2026
Read
7 min
Published by
Samir Sengupta
OpenAI mcpfs projects MCP servers as a read-only filesystem with tools as Bash scripts and resources as files
Note 181 / 181Daily note · Written from 1 source

How this was madeDrafted with Claude, Anthropic’s model, from 1 cited source, then checked against it in a second editing pass. Editorial policy

Disclosure I build Wayne, an AI coding harness for VS Code, and Omnitron, an agent harness, so I work in this category. See the project

the short version

  • OpenAI mcpfs does not add filesystem tools to MCP. It does the reverse: it mounts MCP servers as a read-only filesystem where each tool is an executable Bash script.
  • The read-only mount does not limit what tools can do. The README says a process that can execute the mounted tools can act with the backend's MCP credentials.
  • A local search command and per-tool --help let an agent find and inspect tools without loading every schema into context. One commenter on Hacker News singled this out as the main benefit.
  • OpenAI labels mcpfs a developer demo that is not production ready, and the README says to use it only with MCP servers you trust.

OpenAI mcpfs does not expose filesystem tools over MCP. It does the reverse. It mounts one or more MCP servers as a read-only filesystem through Linux FUSE or vhost-user virtio-fs. Each MCP tool becomes an executable Bash script, and each resource or skill becomes a file you can read with normal Unix tools. Scope is limited by the read-only mount, a shared 64 MiB catalog budget, a cap of 262,144 projected nodes, and a guest UID and GID on the VM path, but any process that can run a mounted tool still acts with the backend's MCP credentials.

The repository has a single commit, and the source is dated 2026-12-05. It is built with Rust and Cargo and produces three binaries: mcpfs-fusefs for local mounts, mcpfs-virtiofs as a VM backend, and mcpfs as a helper that runs inside the guest. OpenAI calls it a developer demo that is not production ready.

The angle for this note also asked for a comparison with the reference MCP filesystem server. The sources provided do not describe that server, so this note does not compare the two.

What OpenAI mcpfs actually mounts

Take a server that advertises the resource foo://a/b/c, a skill called demo, and a tool called do_stuff. The mount projects it into the paths below. Names keep the URI scheme, the authority and the slash-separated path. Unsafe bytes, a literal percent or tilde, and dot segments use uppercase percent encoding, and overlong components and paths are replaced with SHA-256 names. The original URI and tool name are available as xattrs such as user.mcp.uri.

  • search: a local catalog search command at the mount root
  • resources/foo/a/b/c: the resource bytes, served from cached bytes on open when available
  • skills/demo/SKILL.md and skills/demo/references/guide.txt: skill files from the MCP Skills extension. The paths under resources/ and skills/ are hard links to the same inode, as with resources/skill/demo/SKILL.md
  • tools/do_stuff: an executable Bash script that calls the tool

Text resources are returned as UTF-8 and blobs as their decoded bytes. A multipart reply becomes a JSON array that keeps each content block separate. For skills, the driver checks the advertised SHA-256 digests and sizes when a file is opened, and all skill files are ordinary, non-executable data. Prompts, sampling, interactive elicitation and interactive OAuth flows have no filesystem mapping, so those features of a server are not reachable through the mount.

On the transport side, a mount can point at a Streamable HTTP endpoint (including request-scoped SSE) or launch a local stdio server, which the README notes can include authenticated bridges. Resource templates are not expanded automatically. You repeat --resource URI for each concrete template instance or unlisted URI you want mounted.

bash
mkdir -p /tmp/openai-docs
target/release/mcpfs-fusefs mount https://developers.openai.com/mcp /tmp/openai-docs

# in another terminal
ls /tmp/openai-docs/tools
/tmp/openai-docs/tools/search_openai_docs --pretty --query 'Responses API streaming' --limit=1
fusermount3 -u -- /tmp/openai-docs

Tools run as shell commands with JSON input

If you open a tool script as text, the comments above the executable logic show the tool's name, description and schemas, and running it with --help prints the same information. Embedded help is limited to 64 KiB. Above that, --help shows a short usage message instead. Arguments can be passed as named options (--name VALUE or --name=VALUE), as a JSON object in an argument, or as JSON on stdin.

Results go to stdout. A successful call prints structuredContent when present, including an explicit null. Otherwise it prints the content array, and a single unannotated text block is printed verbatim. A tool error, a protocol error or invalid input produces a nonzero exit code, which a shell-driven agent loop can check like any other command failure.

Some schemas will not map cleanly to named options. This happens when a field's type depends on a schema pattern, a reference or a conditional branch, or when the named-options table is too large. In those cases the README says to pass a JSON object instead. To send a tool field literally named help or pretty, put -- before it, an edge case that harnesses generating shell calls automatically need to handle.

Read-only mount, shared credentials: how access is scoped

The mount is read-only. Inside a VM, the share is mounted with mount -t virtiofs -o ro mcpfs /mnt/mcp. Read-only stops writes to the projected files but does not stop side effects from running a tool, and the README states that a process that can execute the mounted tools can act with the backend's MCP credentials. On the virtio-fs path, the guest UID and GID default to the daemon's effective IDs, and the example sets --uid 1000 --gid 1000. The README does not describe any further permission model for who may execute tools.

  • Bearer tokens come from MCPFS_BEARER_TOKEN for a single-server mount, or from a per-server --bearer-token-env for named servers. Over http:// the token is sent in the clear, so the README recommends https://.
  • The README tells you to have the server's auth client acquire or refresh the token and to remount after replacing it.
  • The catalog is processed as soon as the mount starts, before any file is opened or tool is run. One slow or faulty server can delay startup for every server on the same mount.
  • Each virtio-fs daemon serves one VMM connection, with a high-priority queue and a single request queue. A new connection needs a new daemon.

The README excerpt covered here does not describe a per-tool allow list or deny list. If you want an agent to see only some of a server's tools, the sources offer no mcpfs mechanism for it. The README's own instruction is to use mcpfs only with servers you trust.

How mcpfs search could cut context cost

In the Hacker News thread, one commenter said they did not understand what the tool was for. One reply said modern models are intensely trained to work with file system ergonomics. Another gave the most concrete answer, which was about context cost:


it allows MCP servers for local applications to expose a much larger number of tools without filling the context window upfront.
A commenter on Hacker News

The mechanism behind this is the search command. It runs a case-insensitive literal substring match over names and advertised descriptions, and prints one path relative to the mount root per match. It can be scoped with --tools, --resources or --skills, and with no flag it searches all three. It reads a local catalog snapshot and can run without making an MCP request, so an agent can search, run --help on a match, and only then call the tool.

The repository makes no claim about how many tokens this saves. It includes no benchmark comparing it with loading schemas up front.

Caching rules an agent loop has to respect

Each server caches up to 256 entries and 16 MiB of resource and skill contents and MIME metadata. Entries live for at most 30 seconds, and a shorter ttlMs on a resource takes priority, including zero. Every tool call is its own MCP request, and when it finishes it clears that server's cached resource and skill contents. If the server supports resource subscriptions, the mount watches up to eight recently read, cacheable URIs per server. Each open file keeps its own snapshot across expiry and invalidation.

Tool names and schemas are discovered once per server and are refreshed only by remounting, so a long-running agent will not see new tools until the mount is remounted. There is also a known quirk on the virtio-fs path. A guest program that uses sendfile can see a size of zero for a resource whose size is learned on open, until the kernel refreshes its attributes. A direct read, such as dd, fetches the bytes immediately.

Merging multiple MCP servers into one mount

You can repeat --server NAME URI to mount several servers, and the mount also provides merged tools/, resources/ and skills/ directories. Unique names keep their paths. Colliding tools get a server prefix: if two servers both have a search tool, the merged view shows tools/docs:search and tools/local:search. Colliding skill directories get the prefix on the directory, while resources collide at the same relative path. A server named search, tools, resources or skills gets a ~server- prefix on its top-level directory.

All servers on one mount share the 64 MiB catalog budget and the 262,144-node limit. If either is exceeded, the mount fails during discovery. Total process memory can be higher than the budget while responses are in flight.

Commenters raised two follow-ups. One pointed to similar FUSE projects for OpenAPI, apifusefs and openapi-fs. Another said there is a tension between tickets in Linear and local docs, and that having both appear as local files would help. For harness builders, the practical change is that an agent with a Bash shell and a file reader can reach an MCP server's catalog. The open questions are the ones the sources leave unanswered: production readiness, per-tool scoping, and any measured effect on agent accuracy or token use.

Questions this raises

Does the read-only mount stop mcpfs tools from causing side effects?

No. Read-only blocks writes to the projected files, but running a mounted tool still acts with the backend's MCP credentials. The README describes no per-tool allow list or deny list and says to use mcpfs only with servers you trust.

How does mcpfs help an agent avoid loading every MCP tool schema?

A search command at the mount root runs a case-insensitive substring match over names and descriptions using a local catalog snapshot, without an MCP request. An agent can search, run --help on a match, and only then call the tool. The repository makes no claim about token savings and includes no benchmark.

Which MCP features are not available through mcpfs?

Prompts, sampling, interactive elicitation and interactive OAuth flows have no filesystem mapping, so the mount cannot reach them. Resource templates are not expanded automatically, so each concrete instance must be passed with --resource.

Spotted an error? Email samir.s.sengupta@gmail.com and I will correct it and date the change at the top of the note. How these notes are researched, drafted and checked is in the editorial policy.

More notes

Building something on this?

I ship production LLM, RAG and agentic systems for a living - the infrastructure behind the things these notes are about. Open to roles, contract work and research collaboration.