PTS security notes / MCP servers / Filesystem MCP server

Is Filesystem MCP server safe to install?

By PTS · Based on public source as of December 5, 2026

Short answer

Safe only as far as the folders you pass it. It can read, write, edit, copy and move any file inside its allowed directories, and the allowed directories are the whole boundary. Two path-validation CVEs (CVE-2025-53109 and CVE-2025-53110) were fixed in 2025.7.1. Pin a current version, give it one project folder, and use --read-only if you only need reads.

What it is

The Filesystem server is one of the MCP project's reference implementations. It gives an agent file tools over the directories you list on the command line, with an optional --read-only mode and --read-only-dir for single folders. The project calls its reference servers examples, not production-ready products.

Maintainer
Reference server (MCP project)MCP project reference servers (github.com/modelcontextprotocol)
Source
modelcontextprotocol/servers92,573 GitHub stars · not stated on GitHub licence
Transport
stdio (default), Streamable HTTP (optional)
Packages
@modelcontextprotocol/server-filesystem npm · latest 2.4.2 · 5,529,577 downloads last month
Latest release
v2.7.0 2026-12-05
Public advisories
9GitHub and OSV, as of December 5, 2026

What it can do

Read from the public tool definitions in the source, not from a live run. A capability marked "yes" means at least one tool can do it.

There is no dedicated delete tool, but overwriting and moving can destroy data. The README also notes that checks are path-based, so a hard link to a file inside an allowed folder lets a write change the other name too.

ToolWhat it can doNotes
read_text_fileReadsReads a file as text, with head and tail options.
read_media_fileReadsReturns an image or audio file as base64.
read_multiple_filesReads
read_fileReadsDeprecated alias of read_text_file.
list_directoryReads
list_directory_with_sizesReads
directory_treeReadsRecursive tree as JSON.
search_filesReadsMatches names with a glob, not file contents.
get_file_infoReads
list_allowed_directoriesReads
write_fileWrites, DeletesCreates or overwrites a file. Annotated destructive.
append_fileWrites
edit_fileWrites, DeletesLine-based edits. Annotated destructive.
create_directoryWrites
move_fileWrites, DeletesMoves or renames files and folders. Annotated destructive.
copy_fileWrites

Counted from the registerTool calls in src/filesystem/server.ts. In --read-only mode the server registers only the tools annotated read-only.

Credentials and least privilege

No credential. The access control is the list of directories you pass, so that list is the thing to keep small.

Public security advisories

Advisories published on GitHub or OSV for this project, as of December 5, 2026. Fixed issues are a normal part of a maintained project. What matters is that the version you run is not in an affected range.

AdvisorySeveritySummaryAffectedFixed in
GHSA-74fx-4rhc-wgcpHighfilesystem: --read-only-dir bypass on case-insensitive Linux mounts< 2.4.22.4.2
GHSA-hc55-p739-j48w · CVE-2025-53110High@modelcontextprotocol/server-filesystem vulnerability allows for path validation bypass via colliding path prefixn/a2025.7.1
GHSA-q66q-fx2p-7w4m · CVE-2025-53109High@modelcontextprotocol/server-filesystem allows for path validation bypass via prefix matching and symlink handlingn/a2025.7.1
GHSA-xchx-7969-4mm4Moderatecreate_directory: NFC-twin symlink race creates dirs in --read-only-dir< 2.4.22.4.2
GHSA-v9mf-5f74-gfqhModeratefilesystem: non-UTF-8 allowed directory resolves to a sibling symlink< 2.4.22.4.2
GHSA-wvx6-97c6-mr3gModeratefilesystem: --read-only-dir bypass via move_file and intermediate symlinks< 2.4.22.4.2
GHSA-7m4x-rv66-mxhhModerateserver-filesystem: `move_file`'s same-device rename leaves the source unpinned - a swapped source parent moves an outside file into the allowed directories, where it becomes readable< 2.3.02.3.0
GHSA-6ffx-f875-85xqLowfilesystem: symlink errors leak existence and real paths of outside files< 2.4.22.4.2
GHSA-rq2p-q7c4-6g27LowSymlink swap after validation lets the directory-listing tools return entry names from outside allowedDirectories< 2.4.02.4.0

What stands out

Safe-install checklist

Install command from the project's docs: npx -y @modelcontextprotocol/server-filesystem /path/to/project.

  1. Pin the version. Use an exact version, not latest: npx -y @modelcontextprotocol/server-filesystem@2.4.2 /path/to/project. Pass one project folder, never your home directory.
  2. Keep secrets out. Start it with a clean environment, so it does not inherit your shell's keys.
  3. Pass one project folder as the allowed directory. Do not pass ~, / or a folder that holds .env, .ssh or cloud credentials.
  4. Use --read-only when the task is only reading or searching. Use --read-only-dir for reference material next to a writable workspace.
  5. Keep secret files outside the allowed folder, or in a folder the agent does not need, so a prompt injection has nothing to read.
  6. Deny the tools you do not need. In Claude Code, deny rules in .claude/settings.json use the form mcp__<server name>__<tool>, where the server name is whatever you called it in your config. Example, if you named it filesystem:
    {
      "permissions": {
        "deny": [
          "mcp__filesystem__write_file",
          "mcp__filesystem__append_file",
          "mcp__filesystem__edit_file",
          "mcp__filesystem__create_directory",
          "mcp__filesystem__move_file",
          "mcp__filesystem__copy_file"
        ]
      }
    }
  7. Snapshot the tool list. Save the tools/list output right after you install, then compare it before every upgrade with the free PTS MCP tool diff checker. It runs in your browser and flags new tools and changed descriptions or schemas.
  8. Watch for fixes. Watch the project's security advisories and upgrade on purpose, after the diff.

For the general version of this list, see the MCP server security checklist. Not sure about a server that is not listed here? Read Is an MCP server safe to install?

Quick follow-ups

What can Filesystem MCP server do on my machine or accounts?

Based on its public tool definitions, it can: reads local files or data; creates or changes files, records or settings; deletes or destroys data. There is no dedicated delete tool, but overwriting and moving can destroy data. The README also notes that checks are path-based, so a hard link to a file inside an allowed folder lets a write change the other name too.

Does Filesystem MCP server need a token or API key?

No credential. The access control is the list of directories you pass, so that list is the thing to keep small.

Has Filesystem MCP server had public security advisories?

Yes. 9 public advisories (GitHub or OSV) listed for it as of December 5, 2026. Each one is linked on this page with its affected and fixed versions, so you can check the version you run. Fixed issues are normal for active projects. Running a current, pinned version is what matters.

How do I keep Filesystem MCP server from changing under me?

Pin the version, for example npx -y @modelcontextprotocol/server-filesystem@2.4.2 /path/to/project. Then save its tool list (name, description, input schema) with the free PTS MCP tool diff checker and compare it before each upgrade.

Sources

This page is a factual summary of public information about the software. It is not a verdict on the maintainers and not an audit. Check the project's own docs for your version before you rely on it. Educational, not legal or security advice.

Get the free checklist

A 9-page worksheet plus starter files for Claude Code and Codex. It maps what your agent can reach and shrinks it. Download it on Gumroad. This site does not collect email.

Get the free checklist

Before you install anything, try the MCP tool diff checker. See all 54 servers.

More server pages