Skip to content
MCP server

Filesystem MCP

Local MCP server for reading, searching, editing and patching files in chosen folders

Runs locallyStatus and history
Install
Pricing
Free
Platforms
macOS, Windows, Linux
Runs
Locally
Version
2.23.0
Listing updated
today

Similar MCP servers

About Filesystem MCP

Filesystem MCP is a free MCP server for files and documents. It runs locally on your machine and is started by your AI client.

Safety is the main design idea. The assistant can only touch the folders you list, secret files such as .env files, private keys and cloud credentials are blocked, and it asks before deleting a non-empty folder or overwriting a file. Those questions need a client that can show them; otherwise the server refuses the action. A --read-only flag strips every tool that writes, and a per-folder read-only option guards chosen directories.

The README compares it with the official reference filesystem server: it adds in-file search through search_text (literal or RE2 regex), a unified-diff patch tool, diff between two files, replace_text across a folder or glob, file watching, and an undo that skips files you edited afterwards. Edits are exact-match, and a dryRun option shows the diff first.

It runs on your machine with no telemetry and no network calls, over stdio or Streamable HTTP, and needs Node.js 24 or later. Install through npx, Docker or a Claude Desktop extension.

Install

Run in a terminal

claude mcp add filesystem-mcp -- npx -y @j0hanz/filesystem-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "filesystem-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/filesystem-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "filesystem-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/filesystem-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "filesystem-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/filesystem-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "filesystem-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/filesystem-mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "filesystem-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/filesystem-mcp"
      ]
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • FS_ALLOWED_DIRSAllowed directories; ':'-separated on Unix, ';'-separated on Windows. Alternative to positional arguments.
  • FS_READ_ONLY_DIRSRead-only directories; ':'-separated on Unix, ';'-separated on Windows. Writes, moves, and deletes under them are refused.
  • FS_ALLOWED_DIRSAllowed directories inside the container, ':'-separated. Alternative to positional arguments.
  • FS_READ_ONLY_DIRSRead-only directories inside the container, ':'-separated. Writes, moves, and deletes under them are refused.

Tools this server provides (9)

Taken from the project documentation; the running server may differ.

search_text
Searches inside files with literal text or RE2 regex.
create
Creates a file and asks before overwriting one.
move
Moves files and asks before overwriting.
delete
Deletes files and asks before removing a non-empty folder.
undo
Reverts recent changes, skipping files edited since.
edit
Applies exact-match replacements.
patch
Applies a unified diff.
replace_text
Replaces text across a folder or glob.
diff
Compares two files.

What it does

Folder allow-list
Only directories you configure are reachable; everything else is off limits.
Secret blocking
Blocks .env files, private keys and cloud credentials by default.
Search inside files
search_text matches literal text or RE2 regex and skips gitignored paths.
Previewable edits
edit, patch and replace_text can show a diff with dryRun before writing.
Undo
Reverts recent changes but leaves files you edited afterwards alone.
Read-only modes
A global flag or per-folder guard removes or refuses write tools.

Good for

  • Find every TODO in a repository and group them by file
  • Rename a function across all TypeScript files after reviewing the diff
  • Compare two config files
  • Read the tail of a large log file and explain an error
  • Move old screenshots into an archive folder

Pricing

Free

Free to install from npm or as a Docker image

Filesystem MCP FAQ

Does it send data over the network?

No. The README says it makes no network calls and has no telemetry.

What Node.js version is needed?

Node.js 24 or later.

Can it overwrite files without asking?

Not by default. create and move ask first, though overwrite: true on create replaces a file without a prompt.

How many tools does it expose?

The README says 14.

Is Filesystem MCP free?

Yes. Filesystem MCP is free to use.

How do I add Filesystem MCP to Claude Code?

Run this command in your terminal: claude mcp add filesystem-mcp -- npx -y @j0hanz/filesystem-mcp

What are the best alternatives to Filesystem MCP?

The closest alternatives to Filesystem MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers