Wink Pings

MCP and CLI Argued Endlessly, So OpenAI Mounted MCP as a Filesystem

OpenAI's mcpfs demo turns an MCP server into a read-only filesystem: tools are shell scripts, resources are files, and search runs locally. It sidesteps the protocol debate and gives agents and developers an out-of-the-box Unix interface.

OpenAI has released a developer demo called mcpfs that exposes an MCP server as a read-only filesystem. It has two mount backends: FUSE for local Linux, and vhost-user virtio-fs inside virtual machines. Resource and skill files are opened with ordinary Unix tools, while tools run as shell commands; they can take named parameters or read JSON objects from stdin. The project is at mcpfs. The README is very direct: this is a developer demo, not production-ready; you should only mount MCP servers you trust. On mount, the server's catalog is processed immediately, and a slow or failing server will slow down startup for all servers on the same mount.

The MCP vs. CLI debate sometimes feels more like an argument over what tools should look like. What the protocol itself can do often gets pushed to the background. In a post on X, Nick Cooper says he often finds discussions like MCP vs. CLI and whether tools should be stuffed into context somewhat entertaining. In his view, MCP is shape and transport, and clients can present it according to the model's needs: put it in context, abbreviate it, use tool search, use code mode, or combine them. It doesn't even necessarily have to go into the harness. mcpfs is a demonstration of mounting an MCP server as a traditional filesystem.

The most immediate value of this demo is that it gives agents and developers an off-the-shelf interface. Filesystems need no teaching: ls, grep, cat, and running scripts are all readily available. Developers can also use Unix tools to debug an MCP server first, without having to write a client first.

You can run a FUSE mount like this. Building requires Linux, Rust, and Cargo; the TLS backend also needs a C compiler, pkg-config, and OpenSSL development headers:

cargo build --workspace --locked --release
mkdir -p /tmp/openai-docs
target/release/mcpfs-fusefs mount https://developers.openai.com/mcp /tmp/openai-docs
ls /tmp/openai-docs/tools
/tmp/openai-docs/tools/list_api_endpoints --help
/tmp/openai-docs/tools/search_openai_docs --pretty --query 'Responses API streaming' --limit=1
fusermount3 -u -- /tmp/openai-docs

This example uses the OpenAI Docs MCP. After mounting, the directory will contain resources/, skills/, tools/, and a local search. Resources are mapped to paths according to their original URIs, skills are ordinary data files, and tools are executable Bash scripts. Opening a tool script lets you read its name, description, and schema; --help prints the same information. Call results are written to stdout, and tool errors, protocol errors, or invalid input return a non-zero exit code.

Multiple servers can be mounted under the same mount:

target/release/mcpfs-fusefs mount /tmp/mcp --server docs https://developers.openai.com/mcp --server local stdio:// --command /path/to/mcp-server

In the merged directory, unique names keep their original paths; if two servers both have a search tool, tools/docs:search and tools/local:search will appear. Resources that conflict at the same relative path collide directly, while skill directory conflicts get a prefix. search matches literal substrings in names and descriptions, reads a local catalog snapshot, and does not make MCP requests, making it suitable for an initial filter.

Tool parameters support --name VALUE and --name=VALUE. Strings are kept as-is, while numbers, booleans, null, arrays, and objects are passed as JSON. When there are no parameters, a JSON object is read from stdin. Output is compact JSON by default; add --pretty for indentation. Extended attributes are placed under user.mcp.*, and the original URI, MIME, and input/output schemas can all be read.

The caching and refresh rules are also worth noting. Each server caches at most 256 resource and skill entries, with a total of 16 MiB, and entries live for at most 30 seconds. If a resource's own ttlMs is shorter, that takes precedence. Every tool call clears that server's resource and skill caches when it finishes. Names and tool schemas only refresh after remounting. All servers share a 64 MiB catalog budget and at most reserve 262,144 projected nodes; exceeding that makes the mount fail outright.

There are quite a few limitations. mcpfs is read-only; prompts, sampling, interactive elicitation, and interactive OAuth have no filesystem mapping. A tool call starts canceling if there is no response for 5 seconds, but the remote side may already have changed state. virtio-fs has per-connection limits on deferred opens and tool call concurrency, as well as open-file count and byte budgets. It is suitable for demos and experiments, not for going straight into production.

There are several interesting discussions in the replies. Someone joked that WebDAV is back. A developer asked whether each MCP task could have a result file so an agent can read it after reconnecting. Nick replied that it could be done, but it would be more like dd; task semantics are invisible at the filesystem layer, and this is essentially an asynchronous guarantee, with USR1 possibly used to send progress updates. Someone else asked whether tool search belongs on the client or the server. Nick leans toward the client, because the client knows more about the model, multiple MCP servers, and other tools, and in code-mode it is unclear how to turn remote tool search into a library. For extremely large tool libraries, such as ten thousand tools, remote progressive discovery or search could be considered, but personally he would have client-side tool search do the backfill.

Another reply really gets to the heart of the filesystem shape: search results as files mean an agent can grep and deduplicate, without repeatedly reading the same story; it can also do multi-provider meta web search. In Unix, everything is a file, and that old saying holds true again here. Mounting a new protocol back onto the filesystem sounds retro, but it really is handy for agents. mcpfs's production value remains to be seen, but it turns MCP from a list of tools in context into a browsable, searchable, composable namespace. This MCP vs. CLI debate now has at least one concrete sample.

发布时间: 2026-12-03 00:36