{"slug": "openai-mcpfs-mcp-filesystem-tools", "title": "OpenAI mcpfs: MCP Filesystem Tools", "summary": "OpenAI released mcpfs, a developer demo that exposes one or more MCP servers as a read-only filesystem mountable locally via Linux FUSE or served to a Linux guest over vhost-user virtio-fs. The Rust/Cargo project builds three binaries — mcpfs-fusefs for local mounts, mcpfs-virtiofs for the VM backend, and mcpfs for the guest helper — letting users open resource and skill files with normal Unix tools and run each mounted tool as a shell command with named options or JSON input. OpenAI states mcpfs is not production ready and should only be used with trusted MCP servers, because mounting a server processes its catalog immediately and a slow or faulty server can delay startup for every server on the same mount.", "body_md": "Expose one or more MCP servers as a read-only filesystem. Mount it locally with Linux FUSE or serve it to a Linux guest over vhost-user virtio-fs. Open resource and skill files with normal Unix tools. Run each mounted tool as a shell command with named options or JSON input.\n\n**mcpfs is a developer demo and is not production ready. Only use it with MCP servers you trust.** Mounting a server processes its catalog immediately, before you open a file or run a tool. A slow or faulty server can delay startup for every server on the same mount.\n\nFrom the repository root on Linux, build all three binaries with Rust and Cargo. The TLS backend needs a C compiler, `pkg-config`, and OpenSSL development headers.\n\n```\ncargo build --workspace --locked --release\n```\n\nThe binaries are `target/release/mcpfs-fusefs` (local mounts), `target/release/mcpfs-virtiofs` (VM backend), and `target/release/mcpfs` (guest helper).\n\nTo try mcpfs on a FUSE-capable host, run the single-server demo. It mounts the bundled Python fixture, reads a resource and a skill, invokes a tool, and unmounts on exit.\n\n```\n./examples/fuse-single/run.sh\n```\n\n| Adapter | One MCP server | Multiple MCP servers | \n|---|---|---|\n| FUSE | [fuse-single](https://github.com/openai/mcpfs/blob/main/examples/fuse-single/README.md) | [fuse-multi](https://github.com/openai/mcpfs/blob/main/examples/fuse-multi/README.md) | \n| QEMU virtio-fs | [qemu-single](https://github.com/openai/mcpfs/blob/main/examples/qemu-single/README.md) | [qemu-multi](https://github.com/openai/mcpfs/blob/main/examples/qemu-multi/README.md) | \n\nRun these commands from the repository root on Linux. For an unprivileged mount, the user needs access to `/dev/fuse` and the FUSE 3 `fusermount3` helper. The mounted tool scripts use Bash.\n\n```\nmkdir -p /tmp/openai-docs\ntarget/release/mcpfs-fusefs mount https://developers.openai.com/mcp /tmp/openai-docs\n```\n\nThe mount runs in the foreground. In another terminal, read the tool's manual, run a search, and unmount it.\n\n```\nls /tmp/openai-docs/tools\n/tmp/openai-docs/tools/list_api_endpoints --help\n/tmp/openai-docs/tools/list_api_endpoints\n/tmp/openai-docs/tools/search_openai_docs --pretty --query 'Responses API streaming' --limit=1\nfusermount3 -u -- /tmp/openai-docs\n```\n\nThis example uses the public documentation server. [OpenAI Docs MCP](https://developers.openai.com/learn/docs-mcp)\n\n| Server | Arguments after `mount` | \n|---|---|\n| Streamable HTTP, including request-scoped SSE | `https://host.example/mcp /tmp/mcp` | \n| Local stdio, including authenticated bridges | `stdio:// /tmp/mcp -- program arg1 arg2` | \n| Concrete resource from a template or an unlisted URI | `https://host.example/mcp /tmp/mcp --resource 'records://team/42'` | \n\nFor the single-server syntax above, set `MCPFS_BEARER_TOKEN` in the mounting process's environment for an HTTP bearer token. Have the server's auth client acquire or refresh the token and remount after replacing it. Stdio launches the supplied argv directly.\n\nUse an `https://` endpoint whenever you supply a bearer token, whether through `MCPFS_BEARER_TOKEN` or a named server's `--bearer-token-env` option. With `http://`, mcpfs sends the token in the clear.\n\n```\nmkdir -p /tmp/mcp\ntarget/release/mcpfs-fusefs mount /tmp/mcp \\\n  --server docs https://developers.openai.com/mcp \\\n  --server local stdio:// --command /path/to/mcp-server\n```\n\nRepeat `--server NAME URI` to add a server. Put its `--resource URI` and `--bearer-token-env VAR` options before `--command`. For stdio, `--command` takes the program and its arguments up to the next `--server`. In a named mount, HTTP bearer tokens come from each server's explicit `--bearer-token-env` option.\n\nThe example exposes `docs/tools/` and the namespaces provided by `local/`. The mount also provides merged `tools/`, `resources/`, and `skills/` directories wherever there are entries. Unique names keep their paths. If two servers both have a tool named `search`, the merged directory exposes `tools/docs:search` and `tools/local:search`. Resources collide at the same relative path. Skill directory collisions receive the prefix on the directory, so each skill keeps its own `SKILL.md` and supporting files. A server named `search`, `tools`, `resources`, or `skills` gets a `~server-` prefix on its top-level directory.\n\nInstall the `mcpfs` binary and Bash inside the Linux guest for executable tool and search scripts. On the host, run the virtio-fs backend with that guest binary's path and a socket in a private runtime directory.\n\n```\nsocket=\"$XDG_RUNTIME_DIR/mcpfs.sock\"\ntarget/release/mcpfs-virtiofs \\\n  --guest-helper /usr/local/bin/mcpfs --uid 1000 --gid 1000 \\\n  https://developers.openai.com/mcp \"$socket\"\n```\n\nPass the socket to a VMM's vhost-user virtio-fs device. For QEMU, these options add the device with the tag `mcpfs` to a VM configured with 2 GiB of RAM. Adjust the guest UID, GID, and memory size to fit your VM.\n\n```\n-object memory-backend-memfd,id=mem,size=2G,share=on\n-machine memory-backend=mem\n-chardev socket,id=mcpfs,path=/path/to/mcpfs.sock\n-device vhost-user-fs-pci,chardev=mcpfs,tag=mcpfs\n```\n\nInside the guest, run `mount -t virtiofs -o ro mcpfs /mnt/mcp`. The backend uses the same single-server and named-server arguments as the FUSE CLI, with a socket path in place of the mountpoint. The guest UID and GID default to the daemon's effective IDs. A process that can execute the mounted tools can act with the backend's MCP credentials. [QEMU vhost-user backends](https://www.qemu.org/docs/master/system/devices/virtio/vhost-user.html)\n\nEach daemon serves one VMM connection with a high-priority queue and a single request queue. Start a new daemon for a new connection. The guest validation used QEMU with shared memory and an externally managed socket.\n\nFor a resource whose size is learned on open, guest programs that use `sendfile` can see the initial zero size until the kernel refreshes its attributes. A direct read, such as `dd if=/mnt/mcp/resources/example`, fetches the bytes immediately.\n\n- `mcpfs` provides the common tool and search commands and the helper binary for guests.\n- `mcpfs-fusefs` adapts the VFS to a local Linux FUSE mount.\n- `mcpfs-virtiofs` adapts the VFS to guest filesystem requests on vhost-user queues.\n- `mcpfs-vfs` owns MCP sessions, the namespace, resource and skill caches, open file handles, and tool result selection.\n- `mcpfs-ioctl` maps the VFS to the Linux tool invocation ABI used by both adapters.\n\nFor a server advertising `foo://a/b/c`, a `demo` skill, and a `do_stuff` tool:\n\n```\nsearch\nresources/foo/a/b/c\nresources/skill/demo/SKILL.md\nskills/demo/SKILL.md\nskills/demo/references/guide.txt\ntools/do_stuff\n```\n\n- **Resources** use cached bytes on open when available. A text response becomes UTF-8, a blob becomes its decoded bytes, and a multipart reply becomes a JSON array preserving the individual content blocks. An open fd keeps a consistent copy across seeks and partial reads. Until a file is opened, its size comes from the listing, or is zero if the server supplied none.\n- **Skills** use the[MCP Skills extension](https://skills.extensions.modelcontextprotocol.io/) . The driver follows paginated manifests, verifies advertised SHA-256 digests and sizes on open, and enumerates dynamic skills through`resources/directory/read` where available. Listed`skill://` resources are also visible under`skills/` . An extension-declared skill with another URI scheme lives at`skills/~scheme/<scheme>/…` . All skill files are ordinary, non-executable data.\n- **Tools** are executable Bash scripts. Open one as text to read its name, description, and schemas in comments above the executable logic. Pass`--help` to print that information. Invocations write their result to stdout. A tool error, protocol error, or invalid input yields a nonzero exit.\n- **Names** preserve URI scheme, authority, and slash-separated path. Unsafe bytes, a literal percent or tilde, and dot segments use uppercase percent encoding. Empty components use`~empty` . Non-hierarchical URIs use`~opaque` . Query strings and fragments stay on the final component after`~suffix` . If a resource is also a parent (e.g.`foo://a/b` and`foo://a/b/c` ), its own bytes live at`resources/foo/a/b/~value` . Overlong components and paths use SHA-256 names. The original URI and tool name are available as xattrs.\n- **Discovery** runs once per server and follows pagination. Each of`resources/` ,`skills/` , and`tools/` appears when it contains an entry. Remount to refresh names. Repeat`--resource URI` for concrete template instances. Prompts, sampling, interactive elicitation, and interactive OAuth flows have no filesystem mapping.\n\nDiscovery reserves space for up to 262,144 projected nodes across all servers in the mount. Each path reserves space for its parent directories and any merged view, so shared prefixes can make the estimate larger than the final inode count. If the catalog exceeds the limit, the mount fails during discovery.\n\nAll servers in a mount share a 64 MiB catalog budget. Discovery estimates the size of decoded entries and pagination cursors, and counts filesystem entries, generated tool scripts, and the search index against the same budget. If the catalog exceeds the budget, the mount fails to start. Total process memory can be higher while responses are in flight or temporary data is being built.\n\n```\n/tmp/mcp/search 'streaming'\n/tmp/mcp/search --tools 'OpenAPI'\n/tmp/mcp/search --resources --skills 'reference'\n```\n\n`search` matches a case-insensitive literal substring against names and advertised descriptions. It prints one path relative to the mount root per match. Scope flags can be combined, and the default searches all three namespaces. On a multi-server mount it prints paths from the merged views. Skills resolve to their `SKILL.md` files. Search reads the catalog snapshot locally, so it can run without making an MCP request. An empty result succeeds with no output.\n\nEach tool's embedded help is limited to 64 KiB. If detailed help exceeds the limit, `--help` shows a short usage message. Named options have a separate limit. If their table is too large, pass a JSON object as an argument or on stdin.\n\nThese three commands send the same input to the search tool.\n\n```\ntool=/tmp/openai-docs/tools/search_openai_docs\n\"$tool\" --query 'Responses API streaming' --limit=1\nprintf '%s\\n' '{\"query\":\"Responses API streaming\",\"limit\":1}' | \"$tool\"\n\"$tool\" '{\"query\":\"Responses API streaming\",\"limit\":1}'\n```\n\nBoth `--name VALUE` and `--name=VALUE` work. String fields preserve their text, including leading zeroes. Pass numbers, booleans, nulls, arrays, and objects as JSON values. For example, `--items '[1,2]'` passes an array. Use `--name=--literal` for a value beginning with two dashes. For a field with no declared type, valid JSON becomes a JSON value and other text becomes a string.\n\nFor fields whose types depend on a schema pattern, reference, or conditional branch, pass a JSON object if help gives no named option.\n\nWith no arguments, a tool reads a JSON object from stdin. On a terminal it prompts you to enter JSON and press Ctrl-D. For a plain object schema with no declared parameters, such as `list_api_endpoints`, running the tool on a terminal or with empty stdin sends `{}`. Piped JSON still passes through. An explicit `-` always requires JSON on stdin.\n\nA successful call prints `structuredContent` when present, including an explicit `null`. Otherwise it prints the `content` array. When that array contains only one unannotated text block, the script prints the text body verbatim. Tool and RPC errors print their JSON diagnostics.\n\nJSON output defaults to one compact line. Add `--pretty` to indent it, or `--pretty=false` to select compact output. Both JSON modes preserve newlines inside strings as JSON escapes and end the document with a newline. Plain text keeps its original line endings.\n\nUse `--` before a tool field named `help` or `pretty`. For example, `--pretty -- --pretty=false` indents output while sending `{\"pretty\":false}`, and `-- --help=topic` sends `{\"help\":\"topic\"}`.\n\nEach server keeps up to 256 entries and 16 MiB of resource and skill contents and MIME metadata in memory. Entries live for up to 30 seconds. A resource's shorter `ttlMs` takes precedence, including zero. Discovery builds each distinct skill file once per server. Its paths under `resources/` and `skills/` are hard links to the same inode. Repeated manifest declarations must agree on the file's digest and size. Each open file keeps its own snapshot across expiry and invalidation.\n\nThe driver updates a resource's modification time when an open observes different bytes. Reads of identical bytes preserve that timestamp. Attribute lookups use the last observed metadata without fetching the resource.\n\nEvery tool invocation sends a separate MCP request. A tool call clears its server's cached resource and skill contents when it finishes. When a server supports resource subscriptions, the mount watches up to eight recently read, cacheable URIs per server. A resource update evicts that URI, and a resource list change clears the server's cache. The TTL governs freshness when a resource has no active watch. Remount to refresh names and tool schemas.\n\n| Attribute | Value | \n|---|---|\n| `user.mcp.uri` | Original resource or skill-file URI | \n| `user.mcp.mime_type` | Advertised MIME, updated by a read response when supplied | \n| `user.mcp.name` ,`user.mcp.description` | Advertised tool or resource name and optional description | \n| `user.mcp.input_schema` ,`user.mcp.output_schema` | JSON schemas; output schema when advertised | \n| `user.mcp.frontmatter` ,`user.mcp.digest` | Advertised skill entry metadata and per-file digest, where supplied | \n\n`getfattr -d -m '^user\\.mcp\\.' PATH` lists metadata. Linux limits individual xattrs to 64 KiB.\n\nHelp is embedded in each script as literal data. Bash builtins handle help and split command-line options. The same local mcpfs binary encodes the values as one JSON object and opens the mounted script read-only. The daemon selects the tool by inode. Keep the binary at its original path while mounted.\n\n| ioctl | Linux encoding | Operation | \n|---|---|---|\n| APPEND | `_IOW('M', 0x70, char[4096])` | Append up to 4,092 JSON bytes. The first four bytes are a little-endian length. | \n| RUN | `_IO('M', 0x71)` | Seal the arguments and resolve one invocation. Returns 1 for JSON success, 2 for a tool or RPC error, and 3 for verbatim text encoded as a JSON string. Older daemons return 0 with the status in the result JSON. | \n| NEXT | `_IOR('M', 0x72, char[4096])` | Read the next framed chunk of compact JSON. A zero length means EOF. | \n\nThe kernel copies fixed-size frames between the helper and daemon. Arguments are limited to 8 MiB. Results span as many frames as needed. Independent opens have independent state. Reading or inspecting a script never invokes its tool. mcpfs starts cancelling an MCP resource read or tool call after five seconds without a response. A timed-out tool may already have changed remote state. Streamable HTTP limits each JSON response body and SSE event to 16 MiB.\n\nTool invocations and resource fetches run independently of the FUSE request dispatcher. Directory listings, metadata, and reads from open files can proceed while an MCP request is pending. The server determines how it handles concurrent requests.\n\nEach virtio-fs connection admits up to eight deferred opens and eight tool calls at once. It supports up to 1,024 open files, 64 MiB of open resource snapshots, and a separate 64 MiB for buffered tool input and output. A resource snapshot counts against the limit for each open handle, even when it shares cached bytes. The guest receives `EAGAIN` when deferred work slots are full, `EMFILE` when the open-file limit is reached, and `ENOSPC` when a byte budget is exhausted. Closing a file releases its snapshot and any unread tool output. Draining tool output also frees its buffer. `RUN` can return `ENOSPC` after the remote tool has executed if there is insufficient room to buffer its result.\n\nThe test suite starts its own MCP servers with Python 3. Run the workspace tests and Rust checks from the repository root.\n\n```\ncargo test --workspace --locked\ncargo fmt --all -- --check\ncargo clippy --workspace --all-targets --locked -- -D warnings\n```\n\nThe virtio-fs integration test sends filesystem operations and a tool invocation through shared guest memory and real vhost-user queues. It runs without a VM. Run the live FUSE test separately on a host with `/dev/fuse` and `fusermount3`.\n\n```\ncargo test --locked -p mcpfs-fusefs --test linux_mount -- --ignored\n```\n\nCopyright (c) 2026 OpenAI. mcpfs is licensed under the [Apache License, Version 2.0](https://github.com/openai/mcpfs/blob/main/LICENSE).", "url": "https://wpnews.pro/news/openai-mcpfs-mcp-filesystem-tools", "canonical_source": "https://github.com/openai/mcpfs", "published_at": "2026-12-05 13:06:08+00:00", "updated_at": "2026-12-05 15:12:48.793558+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["OpenAI", "mcpfs", "Model Context Protocol", "Linux FUSE", "virtio-fs", "Rust", "Cargo", "QEMU"], "also_reported_by": [], "takeaway": "mcpfs mounts MCP servers as a read-only filesystem so tools run as shell commands, but it processes each server's catalog at mount time and is explicitly not production ready, so only mount trusted servers.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/openai-mcpfs-mcp-filesystem-tools", "markdown": "https://wpnews.pro/news/openai-mcpfs-mcp-filesystem-tools.md", "text": "https://wpnews.pro/news/openai-mcpfs-mcp-filesystem-tools.txt", "jsonld": "https://wpnews.pro/news/openai-mcpfs-mcp-filesystem-tools.jsonld"}}