MCP filesystem server tools: which ones write, and how to make your agent ask

All 16 tools of the MCP filesystem server, checked by running version 2.4.0: which only read, which overwrite or move files, what --read-only and --read-only-dir do, and the Claude Code settings that make writes ask.

Checked on by running @modelcontextprotocol/server-filesystem 2.4.0 from @modelcontextprotocol/server-filesystem and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.

The short answer

10 of its 16 tools only read. --read-only serves just those; --read-only-dir protects one folder. Otherwise let reads run and make writes, edits and moves ask.

Can run on their own
10
Should ask a person
6

The folders are the first rule

The server can touch only the folders named when it starts, and checks a path after following symlinks, so a link inside an allowed folder cannot lead out of it. Name the project folder, never your home folder: ~/.ssh, ~/.aws and every .env under it would otherwise be one read_text_file away.

Read-only, for all folders or some

  • --read-only serves only the 10 tools the server marks read-only, so the write tools are not even listed. The server enforces it, whatever the client allows.
  • --read-only-dir <path> protects one folder while the others stay writable. The six write tools stay listed but refuse any target inside it.
npx -y @modelcontextprotocol/server-filesystem \
  --read-only-dir ~/projects/app/docs \
  ~/projects/app

write_file replaces a whole file and move_file can rename one over another, so both, with edit_file, are hard to undo in a folder that is not under version control. In a git checkout they are easier to take back, which is a reason to keep the agent there.

All 16 tools

Hard to undo3 toolsAsk a person every time. Consider two people, or deny it if the agent never needs it.

  • write_file

    Create a new file or completely overwrite an existing file with new content.

    Server says: destructive

  • edit_file

    Make line-based edits to a text file.

    Server says: destructive

  • move_file

    Move or rename files and directories.

    Server says: destructive

Changes data3 toolsAsk a person. Once it is routine, a standing rule can answer.

  • append_file

    Append text to the end of a file, creating the file if it does not exist.

    Server gives no read-only or destructive hint

  • create_directory

    Create a new directory or ensure a directory exists.

    Server gives no read-only or destructive hint

  • copy_file

    Copy a file to a new location, without reading its content into the conversation.

    Server gives no read-only or destructive hint

Only looks10 toolsLet it run. It only looks.

  • read_file

    Read the complete contents of a file as text.

    Server says: read-only

  • read_text_file

    Read the complete contents of a file from the file system as text.

    Server says: read-only

    Our call: Reads one file; the server marks it read-only.

  • read_media_file

    Read a file and return it as a base64-encoded content block with its MIME type.

    Server says: read-only

  • read_multiple_files

    Read the contents of multiple files simultaneously.

    Server says: read-only

  • list_directory

    List the files and directories directly inside a path, each marked [FILE] or [DIR].

    Server says: read-only

  • list_directory_with_sizes

    List the files and directories directly inside a path with each file's size, marked [FILE] or [DIR], sorted by name or by size, largest first (sortBy).

    Server says: read-only

    Our call: Lists a folder with each file's size; the server marks it read-only.

  • directory_tree

    Get a recursive tree view of files and directories as a JSON structure.

    Server says: read-only

  • search_files

    Find files and directories by NAME, not by content: this tool never reads or searches inside files.

    Server says: read-only

  • get_file_info

    Retrieve detailed metadata about a file or directory.

    Server says: read-only

  • list_allowed_directories

    Returns the list of directories that this server is allowed to access.

    Server says: read-only

Let the reads run in Claude Code

Claude Code asks before every MCP tool it has no rule for. Added as filesystem, this server’s tools are named mcp__filesystem__<tool>. These allow rules, in .claude/settings.json or ~/.claude/settings.json, let the tools that only look run without a prompt. Everything else keeps asking, including any tool a later version of the server adds.

{
  "permissions": {
    "allow": [
      "mcp__filesystem__read_file",
      "mcp__filesystem__read_text_file",
      "mcp__filesystem__read_media_file",
      "mcp__filesystem__read_multiple_files",
      "mcp__filesystem__list_directory",
      "mcp__filesystem__list_directory_with_sizes",
      "mcp__filesystem__directory_tree",
      "mcp__filesystem__search_files",
      "mcp__filesystem__get_file_info",
      "mcp__filesystem__list_allowed_directories"
    ]
  }
}

The command that adds the server:

claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/projects/app

Send the rest to a person, not the terminal

A prompt in the terminal only works while someone is watching it. With this hook, every other tool of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher names the look-only tools, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "mcp__filesystem__(?!(read_file|read_text_file|read_media_file|read_multiple_files|list_directory|list_directory_with_sizes|directory_tree|search_files|get_file_info|list_allowed_directories)$).*",
        "hooks": [
          { "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
        ]
      }
    ]
  }
}

Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.

Any MCP client: put the proxy in front

Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server, lets the look-only tools above through, and holds every other call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz login once to save a key, then use this in claude_desktop_config.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "filesystem": {
      "args": [
        "-y",
        "https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
        "mcp-proxy",
        "--name",
        "filesystem",
        "--look-only",
        "read_file,read_text_file,read_media_file,read_multiple_files,list_directory,list_directory_with_sizes,directory_tree,search_files,get_file_info,list_allowed_directories",
        "--",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "<home>/projects/app"
      ],
      "command": "npx"
    }
  }
}

Already have it in Claude Desktop? One command rewrites the file for you, with these look-only tools filled in, and keeps the old one (setup vscode does the same for VS Code; how it works):

npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz setup claude-desktop

The same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__filesystem, keeps Claude Code from asking a second time in the terminal:

claude mcp add filesystem -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name filesystem --look-only read_file,read_text_file,read_media_file,read_multiple_files,list_directory,list_directory_with_sizes,directory_tree,search_files,get_file_info,list_allowed_directories -- npx -y @modelcontextprotocol/server-filesystem ~/projects/app

See it before you decide.

The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.