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.
- Reads: yes
- Writes: yes
- Deletes: yes
- Runs code: no
- Network: no
- Sends: no
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.
| Tool | What it can do | Notes |
|---|---|---|
read_text_file | Reads | Reads a file as text, with head and tail options. |
read_media_file | Reads | Returns an image or audio file as base64. |
read_multiple_files | Reads | |
read_file | Reads | Deprecated alias of read_text_file. |
list_directory | Reads | |
list_directory_with_sizes | Reads | |
directory_tree | Reads | Recursive tree as JSON. |
search_files | Reads | Matches names with a glob, not file contents. |
get_file_info | Reads | |
list_allowed_directories | Reads | |
write_file | Writes, Deletes | Creates or overwrites a file. Annotated destructive. |
append_file | Writes | |
edit_file | Writes, Deletes | Line-based edits. Annotated destructive. |
create_directory | Writes | |
move_file | Writes, Deletes | Moves or renames files and folders. Annotated destructive. |
copy_file | Writes |
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.
| Advisory | Severity | Summary | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-74fx-4rhc-wgcp | High | filesystem: --read-only-dir bypass on case-insensitive Linux mounts | < 2.4.2 | 2.4.2 |
| GHSA-hc55-p739-j48w · CVE-2025-53110 | High | @modelcontextprotocol/server-filesystem vulnerability allows for path validation bypass via colliding path prefix | n/a | 2025.7.1 |
| GHSA-q66q-fx2p-7w4m · CVE-2025-53109 | High | @modelcontextprotocol/server-filesystem allows for path validation bypass via prefix matching and symlink handling | n/a | 2025.7.1 |
| GHSA-xchx-7969-4mm4 | Moderate | create_directory: NFC-twin symlink race creates dirs in --read-only-dir | < 2.4.2 | 2.4.2 |
| GHSA-v9mf-5f74-gfqh | Moderate | filesystem: non-UTF-8 allowed directory resolves to a sibling symlink | < 2.4.2 | 2.4.2 |
| GHSA-wvx6-97c6-mr3g | Moderate | filesystem: --read-only-dir bypass via move_file and intermediate symlinks | < 2.4.2 | 2.4.2 |
| GHSA-7m4x-rv66-mxhh | Moderate | server-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.0 | 2.3.0 |
| GHSA-6ffx-f875-85xq | Low | filesystem: symlink errors leak existence and real paths of outside files | < 2.4.2 | 2.4.2 |
| GHSA-rq2p-q7c4-6g27 | Low | Symlink swap after validation lets the directory-listing tools return entry names from outside allowedDirectories | < 2.4.0 | 2.4.0 |
What stands out
- The README says read-only mode registers only tools annotated
readOnlyHint: true, and that every write tool refuses a target inside a--read-only-dir. - Two high-severity path-validation advisories (prefix matching and symlink handling) were published in July 2025 and fixed in 2025.7.1. Older cached
npxcopies can still be affected. write_fileoverwrites existing files without warning, by its own tool description.- It reads whatever is in the allowed folders, including
.envfiles and key files, if they are there. It has no secret detection.
Safe-install checklist
Install command from the project's docs: npx -y @modelcontextprotocol/server-filesystem /path/to/project.
- 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. - Keep secrets out. Start it with a clean environment, so it does not inherit your shell's keys.
- Pass one project folder as the allowed directory. Do not pass
~,/or a folder that holds.env,.sshor cloud credentials. - Use
--read-onlywhen the task is only reading or searching. Use--read-only-dirfor reference material next to a writable workspace. - Keep secret files outside the allowed folder, or in a folder the agent does not need, so a prompt injection has nothing to read.
- Deny the tools you do not need. In Claude Code, deny rules in
.claude/settings.jsonuse the formmcp__<server name>__<tool>, where the server name is whatever you called it in your config. Example, if you named itfilesystem:{ "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" ] } } - Snapshot the tool list. Save the
tools/listoutput 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. - 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.
