
Filesystem MCP
io.github.j0hanzPublished by GitHub account j0hanzv2.19.3Updated Nov 8, 2026
Filesystem MCP server for AI assistants.
Overview
Local MCP server that gives an AI assistant 14 tools to list, search, read, edit, patch, move and delete files inside folders you allow.
- What you can do
- List allowed folders, browse trees and find files by name or glob
- Search inside files with literal text or RE2 regex, with context lines
- Read files whole, by lines, head or tail, and check size and token estimates
- Compare files with unified diffs and preview edits before applying them
- Create, edit, patch, replace text across files, move, copy and delete
- Undo recent changes by undo id or the last N calls
- When to use it
- Useful when you want an assistant to work directly on a local project or document folder: finding TODOs, renaming symbols across a repo, reviewing diffs before writing, or reading the tail of a large log. It suits code work and file housekeeping where you want a sandboxed, read-only-capable alternative to a plain filesystem server.
- Requirements
- Runs locally over stdio (or HTTP with --port). Node.js 24 or later for the npm package, or Docker for the container image. At least one allowed folder passed as an argument or via FS_ALLOWED_DIRS; optional FS_READ_ONLY_DIRS for read-only folders. No account, API key or network access needed.
Installation
In SourceWeft
- Open Filesystem MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Filesystem MCP
Let your AI assistant work with your files, safely.
Read, search, edit, and patch files in the folders you choose.
Secret files stay hidden, and risky changes wait for your OK.
[npm version] [CI] [License: MIT] [GitHub stars] [HOL Trust] [Filesystem MCP security badge] [Filesystem MCP status badge] [TDQS]
[Install in VS Code] [Install in VS Code Insiders] [Install in Visual Studio] [Install in Cursor] [Install in Claude Desktop]
[filesystem-mcp MCP server – quality and maintenance score on Glama]
Real sessions with a real model, except the web client demo. The apply? prompt comes from the example gatekeeper client, not the server.
Undo skips a file you edited since, so your edit stays
Rename across a repo, reviewed as one diff, with dist/ and .env untouched
Bring back a deleted folder that git can't restore
Secret files stay hidden, and overwrites wait for your OK
Move files into an archive, then undo a move that overwrote one
Review different edits to three files as one diff before they are written
A patch that no longer fits changes nothing
Find a crash in a 14 MB log without reading all of it
What is this?
Model Context Protocol (MCP) is how AI apps such as Claude, GitHub Copilot in VS Code, and Cursor connect to tools. Filesystem MCP is an MCP server: a small program that runs on your computer and gives the AI 14 tools for working with files. You choose which folders it can use, and everything outside them is off limits.
Once it is connected, you can ask things like:
- "Find every TODO in this repo and group them by file."
- "Rename
getUsertofetchUserin all.tsfiles. Show me the diff first." - "What changed between
config.dev.jsonandconfig.prod.json?" - "Read the last 50 lines of
server.logand explain the error." - "Move the old screenshots into
archive/2025/."
Why Filesystem MCP?
- It is safe by default. The AI can use only the folders you allow, and
.envfiles, private keys, and cloud credentials are blocked. The server asks you before the AI deletes a non-empty folder, opens a folder you did not allow, or writes over a file withcreateormove. These questions need a client that can show them. If yours cannot, the server refuses each of those actions instead of asking. Onlycreateand copies can skip the question, becauseoverwrite: truereplaces a file without asking, on any client.undocan usually restore a file thatcreateor a copy replaced. Edits made withedit,patch, andreplace_textapply without asking, but the AI can show you the diff first withdryRun. If the AI should never change anything,--read-onlyremoves every tool that writes. - Search and editing are made for code. The AI can search inside files like
grep, with a regex engine (RE2) that cannot hang, and by default the server skips.gitignored files and folders likenode_modules. Edits are exact-match replacements that return an error when the text does not match, and you can preview them as a diff first. - It saves the AI's context. The AI can read many files in one call or only the lines it needs, and it can check a file's size and token estimate before reading it.
- It works with any MCP client, over stdio or HTTP, on macOS, Linux, and Windows. You can install it with npx, Docker, or a one-click Claude Desktop extension, or build your own client on it.
- It is private. It runs on your machine, has no telemetry, and makes no network calls.
Compared with the reference server
How this server differs from the official
@modelcontextprotocol/server-filesystem,
checked against its README on 2026-11-05:
Quick start
[!NOTE] You need Node.js 24 or later. Check with
node --version.
- Add the server to your AI app. Pick yours below.
- Replace
/path/to/projectwith the folder the AI may use. You can list several folders. - Restart the app and ask: "Which folders can you access?"
[!TIP] VS Code currently shares the folders you have open with the server, so the one-click VS Code install works without a path. In other apps, or over HTTP, put the folder in
args. If the AI says it has no folders, that is the fix.
VS Code
Click Install in VS Code above, or add this to .vscode/mcp.json:
Or from a terminal:
Cursor
Click Install in Cursor above, then add your folder to args. Or add this
to .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all
projects:
Claude Desktop
For a one-click install, download
filesystem-mcp.mcpb,
open it with Claude Desktop, and pick the folders to allow. Claude Desktop's
built-in Node.js runs it. The extension's settings also let you turn on
read-only mode, pick read-only folders with a folder picker, block more files,
and unblock a built-in secret file.
To set it up by hand, add this to claude_desktop_config.json
(Settings → Developer → Edit Config):
Claude Code
Or install the plugin, which points the server at your current project:
Visual Studio
Add this to .vs\mcp.json in your solution folder, or %USERPROFILE%\.mcp.json
for all solutions:
GitHub Copilot CLI and Antigravity CLI (plugin)
The filesystem-mcp plugin sets the server up for your current project:
Docker
The container can only see the folders you mount. This setup blocks writes
twice, with the :ro mount and with the --read-only flag.
Drop :ro and --read-only to let the AI make changes. VS Code and Visual
Studio use "servers" instead of "mcpServers". See
Running in Docker for more.
Other MCP clients
Windsurf, Cline, and most other clients use the same mcpServers JSON as
Claude Desktop above. In any client, the server is:
- command:
npx - args:
-y,@j0hanz/filesystem-mcp@latest, then one or more folders
You can also install it globally and run filesystem-mcp /path/to/project:
Tools
✎ changes files. --read-only removes these tools. To refuse changes under
one folder while the rest stay writable, pass --read-only-root <dir>
(repeatable, or FS_READ_ONLY_DIRS): those tools still exist, but a call
that writes, moves, or deletes under the folder fails with
Read-only root: ..., while listing, searching, and reading keep working.
Search and listing tools skip hidden files, .gitignored files, and folders
like node_modules, dist, and .git unless the AI asks for them.
Configuration
Most people only need the folder argument. These options cover the common cases:
Flags go in args after the package name, for example
["-y", "@j0hanz/filesystem-mcp@latest", "--read-only", "/path/to/project"].
The full configuration reference covers every flag and environment variable, the complete secret-file list, limits, HTTP setup with API keys, Docker, and troubleshooting.
Security
If you find a vulnerability, please report it privately. SECURITY.md explains how.
Build your own client
You can also call Filesystem MCP from your own code: an agent, an editor plugin, a web app, a CI job, or a script. The same rules apply as for an AI app, so your code cannot reach outside the allowed folders or read secret files.
The basics:
- Where the data is. The text block is written for a model. The same data
as JSON is in
_metafor tools that write their own text (list,search_text,edit, ...) and instructuredContentforstat,create, andlist_roots.readis the exception: the file's text is only in the text block, and_metaholds metadata about it. - Paths. A relative path resolves against the server's working directory when that is inside a root, and against the root otherwise. With several roots, it must exist under exactly one of them. Absolute paths are never ambiguous. Search results are printed relative to the root, or absolute when a relative path would not read back, so a result can be passed straight back. A name that differs from the one on disk only in Unicode form (NFC or NFD) or in its space characters (U+00A0, U+202F) finds that entry.
- Confirmations. Overwrites, recursive deletes, and paths outside the
roots are questions for the user. Declare the
elicitationcapability and answer them in a handler, or, on the 2026-07-28 protocol, take them as data (input_required) and answer later. A client that can do neither gets a refusal.overwrite: trueoncreateand copies never asks. - Protocol versions. The server speaks the 2025 protocol and 2026-07-28, over stdio and Streamable HTTP. Over HTTP, 2025-era clients get no confirmations or change notifications.
- Resources. Read and subscribe to any file as
filesystem-mcp://file/{+path};internal://instructionsand theget-helpprompt hold the server's guide for models.
The client guide has the details, tested with the
TypeScript and Python SDKs, and examples/ has six runnable
clients:
Privacy policy
Filesystem MCP runs entirely on your machine. This policy covers the npm
package, the Docker image, and the .mcpb desktop extension.
- Data collection: none. The server has no telemetry, analytics, or crash
reporting, and starts no network connections of its own.
SECURITY.mdnames the Windows paths that make the OS contact a host. - Use and storage: the server reads and writes files only inside the folders you allow, and only when your MCP client calls a tool. Tool results go to that client and nowhere else. Short-lived result caches and the undo history (saved file contents) live in memory and disappear when the server exits.
- Third-party sharing: none by this server. Your MCP client may send tool results to its model provider under that client's own privacy policy.
- Retention: the server keeps nothing after the process exits. Diagnostic logs go to stderr on your machine; your MCP client may save them in its own log files.
- Contact: open an issue at https://github.com/j0hanz/filesystem-mcp/issues, or report security problems privately through GitHub Security Advisories.
Contributing
Bug reports, ideas, and pull requests are welcome. Start with CONTRIBUTING.md. It covers setup, running the server from source, and the checks a pull request needs.
If Filesystem MCP is useful to you, a star on GitHub helps other people find it.
License
Source: README.md at commit b47e142
Tools
0Version history
25- v2.19.3LatestNov 8, 2026
- v2.19.2Nov 7, 2026
- v2.18.2Nov 5, 2026
- v2.17.0Nov 5, 2026
- v2.16.0Nov 5, 2026
- v2.15.0Nov 3, 2026
- v2.13.0Oct 29, 2026
- v2.11.0Oct 25, 2026
- v2.10.1Oct 23, 2026
- v2.10.0Oct 23, 2026
- v2.9.1Oct 16, 2026
- v2.9.0Oct 16, 2026
- v2.8.1Oct 13, 2026
- v2.8.0Oct 13, 2026
- v2.7.6Oct 12, 2026
- v2.7.5Oct 9, 2026
- v2.7.3Oct 7, 2026
- v2.7.1Oct 2, 2026
- v2.7.0Sep 30, 2026
- v2.6.3Sep 28, 2026
- v2.6.1Sep 27, 2026
- v2.5.2Sep 26, 2026
- v2.5.0Sep 23, 2026
- v2.4.1Sep 18, 2026
- v2.3.0Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts