OpenAI’s mcpfs turns an MCP server into a directory you can ls. Every tool becomes an executable Bash script and every resource becomes a file, so any agent or script that can run a shell can call MCP tools without an MCP client library. You mount it locally with FUSE, or hand it to a VM over virtio-fs.
We built mcpfs from source, mounted OpenAI’s public docs server, and then mounted Google Cloud’s managed BigQuery MCP server with a VM service account token. It works, but OpenAI calls it a developer demo. Two things will bite you first: a hard five-second limit on every tool call, and the Rust cat on Ubuntu 26.04, which reads mounted resources as empty through a pipe. Every command below was run on Ubuntu 26.04 LTS and 24.04 LTS VMs on Google Cloud in December 2026, built from the first public mcpfs commit.
How mcpfs maps an MCP server to files
mcpfs reads the server’s catalog once at mount time and projects it into three read-only directories. Nothing executes when you list or open a file, so you can grep tool descriptions and schemas all day without making a single MCP call. Only running a tool script, or reading a resource the cache does not hold, sends a request to the server.
| MCP object | Path in the mount | How you use it |
|---|---|---|
| Tool | tools/<name> | Run it like a command; --help prints the description and input schema |
| Resource | resources/<scheme>/<path> | Read it with dd, head or any program that calls read() |
| Skill (MCP Skills extension) | skills/<name>/SKILL.md | Plain data files, digests verified on open |
| Catalog | search | Substring search over names and descriptions, no network call |
| Metadata | user.mcp.* xattrs | getfattr shows the original URI, name and JSON schemas |
Prompts, sampling, interactive elicitation and OAuth login flows have no file mapping, so a server that depends on them only half works here. The project README on GitHub also documents hard limits that matter once an agent starts using the mount:
- 5 seconds per tool call or resource read, then mcpfs cancels it
- 64 MiB catalog budget shared by every server on one mount
- 8 MiB of tool arguments, 64 KiB of help text per tool
- 16 MiB per streamable HTTP response or SSE event
- 30 second cache on resource contents (shorter if the resource sets its own
ttlMs), 256 entries and 16 MiB per server
Tool names and schemas are read once, so a server that adds a tool after you mount needs a remount before the new script appears. The same goes for a changed schema. If you wire mcpfs into anything long-running, plan a remount the way you would plan a config reload, because the mount will not notice on its own.
Prerequisites
mcpfs has no release binaries yet, so you build it with Cargo, and the build is the heaviest part of the whole setup. Our release builds peaked at about 790 MB of RAM and left roughly 450 MB in target/. Any Linux box with FUSE works for the core path, while the BigQuery section needs a Google Cloud project:
- Ubuntu 26.04 LTS or 24.04 LTS, 2+ vCPU, 4 GB RAM recommended (2 GB minimum for the build), 10 GB free disk
/dev/fuseand the FUSE 3fusermount3helper- Rust 1.95 or newer (the code uses
if letmatch guards; tested with 1.97 and 1.100) - A C compiler,
pkg-configand OpenSSL headers for the TLS backend - For BigQuery: a Google Cloud project,
gcloud, and rights to create service accounts
Our lab used two e2-standard-4 Compute Engine VMs, mcp01 on 26.04 and mcp02 on 24.04. Both GCE images ship /dev/fuse world-writable with fusermount3 already installed, so unprivileged mounts worked with no group changes. On a hardened image where /dev/fuse is root-only, you will need to add your user to the group that owns it before any mount in this guide works.
Install Rust and the build dependencies
The default cargo package can’t build mcpfs on either release, and each one fails differently. Ubuntu 24.04 ships cargo 1.75, which can’t even parse a 2024-edition manifest, while 26.04 ships 1.93, which gets further and then stops at an if let guard. Both archives also carry a versioned 1.97 toolchain that installs beside the default, so you get a working compiler from apt without touching anything else on the box:
sudo apt update
sudo apt install -y build-essential pkg-config libssl-dev git fuse3 jq attr cargo-1.97 rustc-1.97
Confirm the versioned cargo answers.
cargo-1.97 --version
You should see the 1.97 line, built from the Ubuntu source package. It calls the matching rustc-1.97 on its own, so you do not need to set RUSTC:
cargo 1.97.1 (c980f4866 2026-06-30) (built from a source tarball)
rustup is the faster alternative if you don’t mind a toolchain in your home directory. On the same 4 vCPU VM, a release build took 2m 37s with rustup’s current stable compiler against 5m 17s with the packaged 1.97. We built with 1.97 and 1.100 only; 1.95 added the language feature mcpfs needs, so older compilers fail:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
source "$HOME/.cargo/env"
rustc --version
Ours reported a compiler well past the minimum.
rustc 1.100.1 (20ddd0171 2026-11-25)
The rustup env script puts ~/.cargo/bin first in PATH, so it wins over any distro compiler in new shells. Our general guide to installing Rust on Ubuntu 26.04 covers both methods in more depth.
Build and install mcpfs
Clone the repository and build all three binaries in release mode. --locked pins every crate to Cargo.lock. That matters on a project this young, because a fresh dependency resolve is the easiest way to end up with a build nobody upstream has tested:
git clone https://github.com/openai/mcpfs.git
cd mcpfs
cargo-1.97 build --workspace --locked --release
With rustup, the last line is plain cargo build --workspace --locked --release. The build peaked at about 790 MB of RAM in every run, so a 2 GB VM is the practical floor. It ends like this:
Compiling mcpfs-virtiofs v0.1.0 (/home/josphat/mcpfs/virtiofs)
Compiling mcpfs-fusefs v0.1.0 (/home/josphat/mcpfs/fusefs)
Finished `release` profile [optimized] target(s) in 4m 52s
Install the binaries somewhere permanent before you mount anything. Each generated tool script hardcodes the absolute path of the driver that created it (the line reads driver='/usr/local/bin/mcpfs-fusefs' inside every script), so a mount made straight from target/release/ breaks the moment you run cargo clean:
sudo install -m 0755 target/release/mcpfs target/release/mcpfs-fusefs target/release/mcpfs-virtiofs /usr/local/bin/
That gives you three programs. You will use mcpfs-fusefs for every local mount in this guide; mcpfs-virtiofs is the vhost-user backend for serving the same tree to a QEMU guest, and mcpfs is the small helper that guest needs to run tool scripts.
Mount the OpenAI docs MCP server
OpenAI’s documentation server needs no token, which makes it the quickest way to check that FUSE, the build and outbound HTTPS all work. The mount runs in the foreground, so start it in one terminal and keep it open:
mkdir -p ~/mcp/openai-docs
mcpfs-fusefs mount https://developers.openai.com/mcp ~/mcp/openai-docs
It prints nothing when it succeeds, which is easy to mistake for a hang. Leave it running, open a second terminal on the same machine, and list the tools the server advertised:
ls ~/mcp/openai-docs/tools
Five tools came back, each one an executable file.
fetch_openai_doc
get_openapi_spec
list_api_endpoints
list_openai_docs
search_openai_docs
Every script documents itself. --help renders the tool’s JSON input schema as command-line options, which is exactly what an agent needs to call it correctly without ever loading the schema into its context up front:
~/mcp/openai-docs/tools/search_openai_docs --help | sed -n '/^SYNOPSIS/,$p'
The required --query and the bounded --limit come straight from the server’s schema. That is the whole contract an agent needs, and it cost nothing to read, because opening or --help on a script never calls the server:
SYNOPSIS
search_openai_docs --help
search_openai_docs [--pretty] TOOL_OPTIONS
search_openai_docs [--pretty] < input.json
search_openai_docs [--pretty] 'JSON_OBJECT'
OPTIONS
--help Show this page.
--pretty[=true|false] Indent JSON output. JSON defaults to one compact line.
-- Pass remaining options to the tool. Use -- --pretty=VALUE or -- --help=VALUE.
INPUT SCHEMA
--cursor (optional) string
--limit (optional) integer
maximum 50
minimum 1
--query (required) string
minLength 1
OUTPUT SCHEMA
No output schema supplied.
Call the tool with named options. The output is one compact JSON line, so pipe it through jq to pull out what you want:
~/mcp/openai-docs/tools/search_openai_docs --query 'Responses API streaming' --limit=3 | jq -r '.hits[].hierarchy.lvl1'
Each round trip took between 0.15 and 0.4 seconds from us-east1.
Streaming API responses | OpenAI API
Migrate to the Responses API
Build a per-run spending controller with the Responses API
The same tool also takes a JSON object on stdin, which is the easier form when an agent or script already holds the arguments as JSON:
echo '{"query":"MCP connectors","limit":2}' | ~/mcp/openai-docs/tools/search_openai_docs | jq -r '.hits[].url'
Two URLs come back, one per hit.
https://developers.openai.com/api/docs/guides/tools-connectors-mcp
https://developers.openai.com/api/docs/guides/secure-mcp-tunnels#how-it-works
Don’t expect --pretty to format this server’s output. When a tool returns a single plain text block, mcpfs prints the text verbatim, and this server returns its JSON as text, so the flag changed nothing in our runs. Pipe to jq instead. The metadata the scripts were built from is also readable as extended attributes:
getfattr -d -m '^user\.mcp\.' ~/mcp/openai-docs/tools/list_api_endpoints
The description and the input schema sit on the file itself. That means you can index a whole mount with a short loop over getfattr and never open a script:
# file: home/josphat/mcp/openai-docs/tools/list_api_endpoints
user.mcp.description="List all OpenAI API endpoint URLs available in the OpenAPI spec."
user.mcp.input_schema="{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"properties\":{},\"type\":\"object\"}"
user.mcp.mime_type="text/x-shellscript"
user.mcp.name="list_api_endpoints"
Unmount with fusermount3 when you are done. Never stop the foreground process with Ctrl-C or kill instead, because the FUSE binary installs no signal handler and leaves a dead mount behind that fails every access until you clean it up (the error is covered further down):
fusermount3 -u ~/mcp/openai-docs
If you already run MCP servers through a client, our guide to setting up MCP servers in Claude Code covers the client-side config that mcpfs replaces with a mount point.
Mount the Google Cloud BigQuery MCP server
Google runs managed MCP servers for BigQuery, Cloud Run and other services, most of them at https://<service>.googleapis.com/mcp, and they accept a plain OAuth bearer token. That fits mcpfs well, because the only auth it supports for HTTP servers is a bearer token in an environment variable. On a Compute Engine VM you don’t need a key file at all: the metadata server hands out short-lived tokens for the VM’s service account.
Run this part from a workstation or Cloud Shell where gcloud is logged in as a project owner. You will reuse the project, zone and service account in every command, so set them once:
export PROJECT_ID="your-gcp-project-id"
export ZONE="us-east1-b"
export SA_EMAIL="mcpfs-agent@${PROJECT_ID}.iam.gserviceaccount.com"
The BigQuery MCP endpoint comes up with the BigQuery API. New projects have it on already, and the command is harmless when it is:
gcloud services enable bigquery.googleapis.com --project "${PROJECT_ID}"
Create a dedicated service account for the mount and give it the three roles Google lists for the BigQuery MCP server. roles/mcp.toolUser allows tool calls at all, and the two BigQuery roles decide what those calls can touch. Leaving out a write role is deliberate, as you’ll see when the agent tries to create a dataset:
gcloud iam service-accounts create mcpfs-agent --display-name "mcpfs agent" --project "${PROJECT_ID}"
for role in roles/mcp.toolUser roles/bigquery.jobUser roles/bigquery.dataViewer; do
gcloud projects add-iam-policy-binding "${PROJECT_ID}" --member "serviceAccount:${SA_EMAIL}" --role "${role}" --condition None --format none
done
Now attach the account to the VM with the cloud-platform scope. The default Compute Engine scopes don’t include BigQuery, so a VM created with defaults gets tokens that the MCP server rejects. A new VM takes both settings at creation:
gcloud compute instances create mcp01 --project "${PROJECT_ID}" --zone "${ZONE}" \
--machine-type e2-standard-4 --image-family ubuntu-2604-lts-amd64 --image-project ubuntu-os-cloud \
--boot-disk-size 30GB --service-account "${SA_EMAIL}" --scopes cloud-platform
A new VM means repeating the Rust install and the build on it, so if you already built mcpfs on a Compute Engine VM, change that VM’s service account instead (swap mcp01 for its name). Compute Engine only allows that while the instance is stopped, so expect a short outage:
gcloud compute instances stop mcp01 --project "${PROJECT_ID}" --zone "${ZONE}"
gcloud compute instances set-service-account mcp01 --project "${PROJECT_ID}" --zone "${ZONE}" --service-account "${SA_EMAIL}" --scopes cloud-platform
gcloud compute instances start mcp01 --project "${PROJECT_ID}" --zone "${ZONE}"
Back on the VM, fetch a token from the metadata server into MCPFS_BEARER_TOKEN, the variable mcpfs reads for a single-server mount, and mount BigQuery:
export MCPFS_BEARER_TOKEN=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token | jq -r .access_token)
mkdir -p ~/mcp/bigquery
mcpfs-fusefs mount https://bigquery.googleapis.com/mcp ~/mcp/bigquery
From a second shell on the VM, read the project ID from the metadata server too and ask BigQuery for a dry run. --dryRun true validates the query and reports the bytes it would scan without running it. That makes it a free way to test the token, the roles and the mount in one call:
export PROJECT_ID=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/project/project-id)
~/mcp/bigquery/tools/execute_sql_readonly --projectId "$PROJECT_ID" --dryRun true --query 'SELECT island, COUNT(*) FROM `bigquery-public-data.ml_datasets.penguins` GROUP BY island'
BigQuery reports 2,784 bytes processed and nothing billed. That single line proves the token, the scope, both roles and the mount all work, because any one of them missing would have returned an error instead.
{"jobComplete":true,"schema":{"fields":[{"mode":"NULLABLE","name":"island","type":"STRING"},{"mode":"NULLABLE","name":"f0_","type":"INTEGER"}]},"totalBytesBilled":"0","totalBytesProcessed":"2784"}
Run a real query against the public penguins table. Single quotes around the SQL keep the backticks away from your shell, and the jq filter flattens BigQuery’s rows[].f[].v layout into tab-separated columns:
~/mcp/bigquery/tools/execute_sql_readonly --projectId "$PROJECT_ID" --query 'SELECT species, island, COUNT(*) AS penguins, ROUND(AVG(body_mass_g)) AS avg_mass_g FROM `bigquery-public-data.ml_datasets.penguins` GROUP BY species, island ORDER BY penguins DESC' | jq -r '.rows[] | [.f[].v] | @tsv'
The screenshot shows the nine BigQuery tools and the query result, captured on mcp01.

Gentoo penguins on Biscoe come out on top at 124 birds and about 5 kg each. More useful than the numbers is what you didn’t need: no MCP client, no SDK and no JSON-RPC framing, just a script on a path. An agent that knows ls, --help and a pipe has everything it needs, which is the whole pitch of mcpfs.
The missing write role holds, too. Ask the general execute_sql tool to create a dataset and IAM refuses it, with a nonzero exit an agent can check:
~/mcp/bigquery/tools/execute_sql --projectId "$PROJECT_ID" --query "CREATE SCHEMA mcpfs_scratch"; echo "exit=$?"
IAM answers with a clear denial, and the script exits 1:
{"content":[{"type":"text","text":"Access Denied: Project your-gcp-project-id: User does not have bigquery.datasets.create permission in project your-gcp-project-id."}],"isError":true}
exit=1
That’s the right shape for agent access: the filesystem is read-only, and what a tool can change is decided by IAM, not by the mount. Keep a billing kill switch on the project before you let an agent run queries unattended, because a read-only role still spends money on every scan.
Handle BigQuery queries longer than five seconds
mcpfs cancels any tool call that gets no response within five seconds, and that limit isn’t configurable. BigQuery’s own tool waits up to 20 seconds by default before answering, so a query that takes 6 seconds fails on the mount even though BigQuery would have finished it. This one cross-joins two generated arrays to burn CPU without scanning stored data:
~/mcp/bigquery/tools/execute_sql_readonly --projectId "$PROJECT_ID" --query 'SELECT COUNT(*) AS n FROM UNNEST(GENERATE_ARRAY(1, 1000000)) a CROSS JOIN UNNEST(GENERATE_ARRAY(1, 3000)) b WHERE MOD(a*b, 7) = 3'
It died at exactly five seconds, even though BigQuery was still working on it.
{"error":{"message":"request timeout after PT5S"}}
The fix is to make BigQuery answer first. Pass --timeoutMs 3000 so the tool returns a job ID after three seconds instead of waiting, then poll get_query_results with the same short timeout until jobComplete turns true:
~/mcp/bigquery/tools/execute_sql_readonly --projectId "$PROJECT_ID" --timeoutMs 3000 --query 'SELECT COUNT(*) AS n FROM UNNEST(GENERATE_ARRAY(1, 1000000)) a CROSS JOIN UNNEST(GENERATE_ARRAY(1, 3000)) b WHERE MOD(a*b, 7) = 3' > /tmp/job.json
cat /tmp/job.json
Instead of rows, you get the job’s ID and location.
{"jobComplete":false,"jobId":"job_-AVmzlKK7tMWuCRzCFwRzwyx-NVn","location":"US","queryId":"job_-AVmzlKK7tMWuCRzCFwRzwyx-NVn"}
Poll until the job finishes. Each get_query_results call holds for at most three seconds, which keeps every request under the mcpfs limit:
JOB=$(jq -r .jobId /tmp/job.json); LOC=$(jq -r .location /tmp/job.json)
until ~/mcp/bigquery/tools/get_query_results --projectId "$PROJECT_ID" --jobId "$JOB" --location "$LOC" --timeoutMs 3000 > /tmp/res.json && jq -e .jobComplete /tmp/res.json > /dev/null; do echo "still running"; done
jq -c '{n: .rows[0].f[0].v}' /tmp/res.json
Our job needed 20 polls, about a minute, before it returned the count. Keep this loop interactive: a call that errors (expired token, wrong location) fails the condition instantly and spins forever, so a scripted version wants a sleep, a poll limit and a check for an error key, plus cancel_job when it gives up.
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
still running
{"n":"367428633"}
Teach your agent this pattern for any server with slow tools. The README is blunt about the other side of the timeout: a tool call mcpfs gave up on may still have changed remote state, so a write tool that timed out must be checked, never blindly retried.
Mount several MCP servers on one path
A named mount puts any number of servers under one directory and merges their tools/, resources/ and skills/ into shared views. HTTP servers in a named mount don’t read MCPFS_BEARER_TOKEN; each one names its own variable with --bearer-token-env. We added a local stdio server too, the MCP reference “everything” server from npm, because it exposes resources and odd tool types the other two don’t:
sudo apt install -y nodejs npm
sudo npm install -g @modelcontextprotocol/server-everything
We ran this part on Ubuntu 26.04, whose Node 22 runs the server but prints an EBADENGINE warning, because the package asks for Node 24. Ubuntu 24.04 ships Node 18, and the server crashes there on its first request with ReferenceError: crypto is not defined. mcpfs then aborts the whole named mount, not just that one server. On 24.04, install Node 22 or newer from NodeSource or nvm before the npm install, or leave the stdio server out.
Then mount all three servers under ~/mcp/all, giving each one a short name. The name becomes both its own directory and the prefix mcpfs uses when two servers clash:
export GCP_TOKEN=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token | jq -r .access_token)
mkdir -p ~/mcp/all
mcpfs-fusefs mount ~/mcp/all \
--server bq https://bigquery.googleapis.com/mcp --bearer-token-env GCP_TOKEN \
--server docs https://developers.openai.com/mcp \
--server demo stdio:// --command mcp-server-everything
The root holds one directory per server plus the merged views.
ls ~/mcp/all
Only the everything server advertised resources, which is why resources/ exists here but skills/ does not.
bq
demo
docs
resources
search
tools
The merged tools/ held 37 scripts across the three servers. When two servers advertise the same tool name, mcpfs prefixes both with the server name (tools/bq:search next to tools/docs:search); ours had no clash, so every name stayed bare. The catalog search runs locally against all of them at once, which makes it the cheapest discovery step you can give an agent:
~/mcp/all/search --tools dataset
It matched names and descriptions and printed paths relative to the mount.
tools/execute_sql
tools/execute_sql_readonly
tools/get_dataset_info
tools/list_dataset_ids
tools/list_table_ids
We checked one thing before trusting a mixed mount: whether the local stdio server can see the Google token sitting in the mount process’s environment. The everything server’s get-env tool dumps the environment it was started with:
~/mcp/all/tools/get-env | jq -r 'keys[]'
GCP_TOKEN is not in the list. mcpfs strips MCPFS_BEARER_TOKEN and every --bearer-token-env variable from the environment of stdio children. That is hygiene, not isolation. The child runs as your user, so it can still read the token from /proc/<mcpfs pid>/environ, and on a Compute Engine VM it can ask the metadata server for its own token. Only mount stdio servers you would trust with the BigQuery credential.
DBUS_SESSION_BUS_ADDRESS
HOME
LANG
LOGNAME
PATH
PWD
SHELL
SHLVL
SSH_CLIENT
SSH_CONNECTION
USER
XDG_RUNTIME_DIR
XDG_SESSION_CLASS
XDG_SESSION_ID
XDG_SESSION_TYPE
_
Resources from the everything server landed under resources/demo/resource/, with the original demo:// URI kept as an xattr. Read them with dd or head on Ubuntu 26.04, for the reason covered in the errors section. A whole stack is now one directory an agent can explore; for how this compares with RAG and agent skills as a way to feed context, see our MCP vs RAG vs agent skills breakdown.
Keep the bearer token fresh with systemd
Metadata server tokens expire within an hour (the server hands out a cached token until it has five minutes left, so a fresh fetch may live anywhere from 5 to 60 minutes), and mcpfs reads the token once at mount time. It does not refresh it, so once it expires every BigQuery tool call fails with Auth required while ls keeps working, which looks like a healthy mount to anything that only checks the directory. The fix is to remount before the token expires. A small wrapper does it by reading expires_in from the metadata server, sleeping until two minutes before expiry, and unmounting so systemd starts it again with a new token.
Create the wrapper script.
sudo vim /usr/local/bin/mcpfs-bigquery
Add the following:
#!/bin/bash
set -euo pipefail
MOUNTPOINT="${HOME}/mcp/bigquery"
TOKEN_URL="http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token"
resp=$(curl -sf -H "Metadata-Flavor: Google" "$TOKEN_URL")
MCPFS_BEARER_TOKEN=$(echo "$resp" | jq -r .access_token)
export MCPFS_BEARER_TOKEN
ttl=$(echo "$resp" | jq -r .expires_in)
refresh=${MCPFS_REFRESH_SECONDS:-$(( ttl > 300 ? ttl - 120 : 60 ))}
mkdir -p "$MOUNTPOINT"
fusermount3 -u "$MOUNTPOINT" 2>/dev/null || true
/usr/local/bin/mcpfs-fusefs mount https://bigquery.googleapis.com/mcp "$MOUNTPOINT" &
pid=$!
echo "mounted, token expires in ${ttl}s, remounting in ${refresh}s"
sleep "$refresh"
fusermount3 -u "$MOUNTPOINT"
wait "$pid"
Make it executable.
sudo chmod 0755 /usr/local/bin/mcpfs-bigquery
The mount should belong to the user the agent runs as, not root, so it’s a systemd user unit. Create it in your home directory:
mkdir -p ~/.config/systemd/user
vim ~/.config/systemd/user/mcpfs-bigquery.service
Paste the unit.
[Unit]
Description=mcpfs mount of the BigQuery MCP server
After=network-online.target
[Service]
ExecStart=/usr/local/bin/mcpfs-bigquery
ExecStopPost=-/usr/bin/fusermount3 -u %h/mcp/bigquery
Restart=always
RestartSec=2
[Install]
WantedBy=default.target
Restart=always brings the mount back each time the wrapper exits after its planned unmount, and ExecStopPost clears a dead mount if the service is stopped mid-run. Enable lingering so the user service starts at boot without a login session, then start it:
sudo loginctl enable-linger "$USER"
systemctl --user daemon-reload
systemctl --user enable --now mcpfs-bigquery
Check the service and the mount.
systemctl --user status mcpfs-bigquery --no-pager | head -12
findmnt -t fuse
The cgroup shows the wrapper, the mcpfs driver and the sleep that times the next remount. The whole service used under 14 MB of memory.

To prove the remount loop before trusting it for an hour, we added Environment=MCPFS_REFRESH_SECONDS=20 under [Service] with systemctl --user edit mcpfs-bigquery, which forced a remount roughly every 22 seconds:
journalctl --user -u mcpfs-bigquery --no-pager -o cat | tail -6
The fusermount3 complaint comes from ExecStopPost finding the mount already gone, so it is harmless.
Started mcpfs-bigquery.service - mcpfs mount of the BigQuery MCP server.
mounted, token expires in 1683s, remounting in 20s
/usr/bin/fusermount3: entry for /home/josphat/mcp/bigquery not found in /etc/mtab
mcpfs-bigquery.service: Scheduled restart job, restart counter is at 2.
Started mcpfs-bigquery.service - mcpfs mount of the BigQuery MCP server.
mounted, token expires in 1661s, remounting in 20s
Without the override, the wrapper sleeps until two minutes before the token expires; on one run it logged remounting in 2874s, about 48 minutes. The mount disappears for two to three seconds during each swap, so your agent should retry a read-only tool call that fails with “No such file or directory” once before it gives up. A write that was in flight during a swap gets checked, like any other interrupted write. If an agent keeps a shell or an open file inside the mount, a plain fusermount3 -u fails with “Device or resource busy”; use fusermount3 -uz (lazy unmount) in the wrapper and ExecStopPost in that case. After=network-online.target does nothing in a user unit, since that target only exists in the system manager, so you can drop that line.
Fix common mcpfs errors
Every error below came up while building and running the mounts on the two lab VMs. The exact messages are here because they are what you will paste into a search box when one hits you.
feature `edition2024` is required
This is Ubuntu 24.04’s packaged cargo 1.75 failing to parse the workspace manifest, before it compiles anything:
error: failed to parse manifest at `/home/josphat/mcpfs/Cargo.toml`
Caused by:
feature `edition2024` is required
The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.75.0).
Do not add the cargo-features line the message suggests, because that only works on nightly. Install cargo-1.97 or use rustup as shown above.
error[E0658]: `if let` guards are experimental
Ubuntu 26.04’s default cargo 1.93 gets past the manifest but fails in mcpfs-vfs:
error[E0658]: `if let` guards are experimental
--> vfs/src/catalog_result.rs:30:17
if let guards on match arms became stable in Rust 1.95, so any older compiler stops here. Build with cargo-1.97 from the archive or with rustup.
cat prints nothing from an mcpfs resource on Ubuntu 26.04
This one cost us the most time. Ubuntu 26.04 ships the Rust uutils coreutils as /usr/bin/cat, and when its output is a pipe it copies with splice() instead of read(). mcpfs reports a size of 0 for a resource whose server did not advertise one, and under strace the splice() call returned 0 straight away. The result is that cat file | jq gets zero bytes and still exits 0. Measured against the same 22,684-byte resource:
| Command on Ubuntu 26.04 | Bytes read |
|---|---|
cat file | wc -c (uutils) | 0 |
wc -c file (uutils) | 0 |
cat file > out or cat to a terminal | 22,684 |
gnucat file | wc -c | 22,684 |
dd if=file status=none, head -c, Python read() | 22,684 |
Ubuntu 24.04’s GNU cat 9.4 reads the same files correctly through a pipe, which strace confirmed as plain read() calls. On 26.04, use dd if=FILE status=none or gnucat in scripts that pipe resources, and tell your agent the same thing, because an empty result with exit code 0 is the worst kind of failure to hand a model.
request timeout after PT5S
The tool didn’t answer within mcpfs’s fixed five seconds. Lower the server-side wait so it answers sooner (for BigQuery, --timeoutMs 3000 and polling, as shown earlier). There is no mcpfs flag to raise the limit.
Transport send error … Auth required
BigQuery’s MCP endpoint lists its tools without checking the token, so a mount with an expired or wrong token succeeds and only the tool calls fail. We reproduced it by mounting with a junk token:
{"error":{"message":"Transport send error: Transport [rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorker<mcpfs_vfs::http::BoundedHttpClient>>] error: Auth required"}}
Remount with a fresh token. If it happens within an hour of mounting by hand, the token simply expired, which is what the systemd unit above prevents.
Transport endpoint is not connected
The mcpfs-fusefs process died or was killed with the mount still attached. SIGTERM alone does not unmount, so every access to the directory fails:
mountpoint: /home/josphat/mcp/t: Transport endpoint is not connected
Clear it with fusermount3 -u on your mount path, then mount again. The systemd unit above does this for you in ExecStopPost, which is one more reason to run long-lived mounts as a service rather than in a terminal.
Cannot request input ‘form’ (elicitation/create)
Tools that ask the user for input mid-call can’t work through a filesystem, and mcpfs doesn’t advertise the elicitation capability:
{"error":{"message":"Mcp error: -32021: Cannot request input 'form' (elicitation/create): the request's client capabilities do not declare the required capability({\"requiredCapabilities\":{\"elicitation\":{\"form\":{}}}})"}}
There is nothing to fix on your side. Call that tool through a real MCP client, or pick a tool that takes all its input as arguments.
Harden an mcpfs mount before an agent uses it
Anything that can execute a tool script acts with the mount’s credentials, so the mount is a credential boundary and should be treated like one. The mount itself already does part of the job: our mounts came up ro,nosuid,nodev with mode 0500 (dr-x------) on the root, so other local users can’t reach the tools. The rest is on you:
- Give each mount its own service account with the narrowest roles, as with
mcpfs-agentabove - Mount only servers you trust, since mcpfs runs every catalog at mount time
- Use
https://endpoints only; overhttp://mcpfs sends the bearer token in the clear - Run the agent as the mount’s user and nobody else
- Check, don’t retry, any write tool that hit the five-second timeout
On Google Cloud you can go further than roles. IAM deny policies understand MCP attributes such as tool.isReadOnly and tool.name, so you can block every non-read-only BigQuery tool for the agent’s account. That still holds if someone later grants the account a write role by mistake. Google documents the attributes in Control MCP use with IAM.
For a single VM experiment, the service account and roles above are enough. Before anything production-facing, remember the README’s own verdict: mcpfs is a developer demo, its catalog is fixed until a remount, and one slow server on a shared mount delays startup for all of them. We’d use it today to give a shell-only agent read access to a handful of trusted servers, and keep a real MCP client for anything that writes. If you later move a server of your own behind it, our notes on migrating an MCP server to the stateless protocol cover the server side.