Skip to content
MCP Shelf

Filesystem MCP Server

Read, write, edit and search files, only inside the folders you name.

View on GitHub
  • Not yet tested by us
  • ★ 92.2K GitHub stars
  • Last commit 24 Nov 2026

What is Filesystem MCP Server?

Filesystem MCP Server is the Model Context Protocol project's reference server for reading, writing, editing and searching files, limited to the folders you allow when it starts.

Tools
16
Runs on
Your computer
Licence
Apache-2.0 and MIT
GitHub stars
92.2K

Good for

  • Letting Claude Desktop work with documents or code in one project folder
  • Bulk renaming, tidying or summarising files in a folder
  • Giving an assistant read-only access to reference material

You'll need

  • Node.js 24 or newer (or Docker)
  • The paths of the folders you want it to reach
Works withClaude CodeCursorClaude DesktopVS CodeCodexWindsurfEach has a ready-made config on the Install tab, built from the README.

Not yet tested by usWritten from the project's own documentation. We have not run this config ourselves yet.

Try asking Filesystem MCP Server

Once it is installed, ask your assistant things like:

  • List the largest files in my Downloads folder.
  • Find every Markdown file under my notes folder that mentions "invoice".
  • In config.json, change the port to 8080 and show me the diff before saving.

MCP Shelf take

We started Filesystem on our own test machine on 24 Nov 2026 and it answered with 16 tools. 10 of the 16 only read; the other 6 can change things. Every tool comes with a useful description, all of them say whether they change things, and the tool list costs about 1,800 tokens of context before you ask a thing. It is the most-starred of the 27 servers in its category on our shelf (92.2K stars).
MCP Shelf tests: numbers from our own runs, not the README · tested on 24 Nov 2026

What can Filesystem MCP Server read and change?

It can read

  • Any file or folder inside the allowed directories
  • File details such as size, dates and permissions

It can change

  • Creates, overwrites and edits files in the allowed directories
  • Creates folders and moves or renames files and folders

Safer setup: Start it with --read-only to allow reading only, or protect particular folders with --read-only-dir. With Docker, mount a folder with the ro flag to make it read-only at the system level as well.

Filesystem MCP Server in more detail

Filesystem is the reference file server from the Model Context Protocol project, and often the first server people add to Claude Desktop. You list the folders it may use when it starts, and inside those it can read text and media files, list and search directories, show a folder tree, write new files and make targeted edits with a diff you can preview first.

Anything outside the allowed folders is refused, symlinks included. For extra safety, --read-only starts it with only the tools that read and list, and --read-only-dir protects chosen folders while the others stay writable.

Made by
Model Context Protocol project (modelcontextprotocol/servers)
Latest version
2.4.0 (18 Nov 2026)
Last commit
24 Nov 2026
Setup checked
24 Nov 2026
Page updated
24 Nov 2026

What's in the pod

What tools does Filesystem MCP Server have?

We found 16 tools when we started it on 24 Nov 2026. 10 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.

How we tested it: Started version 2.4.0 with npx and one real folder in place of the example paths, which do not exist on our test machine. With --read-only it listed only the ten tools that read and list.

Changes things6 tools · Can create, edit, send or delete.

ToolWhat it is for
append_fileAdds text to the end of a file, creating it if needed.
copy_fileCopies a file to a new path. It never overwrites, so a repeat fails without changing anything.
create_directoryCreates a folder, with any missing parent folders.
edit_fileReplaces exact pieces of text in a file and returns a diff. dryRun previews the change without saving it.
move_fileMoves or renames a file or folder. It fails rather than overwrite something already there.
write_fileCreates a file or overwrites one completely.

Only reads10 tools · Looks things up and changes nothing.

ToolWhat it is for
directory_treeReturns a folder's tree as JSON, with patterns to leave out and an optional depth.
get_file_infoShows a file's size, dates, type and permissions.
list_allowed_directoriesLists the folders the server may use.
list_directoryLists what is directly inside a folder, marked as files or folders.
list_directory_with_sizesLists a folder with each entry's size, sortable by name or size.
read_fileThe older name for read_text_file, kept so existing prompts still work.
read_media_fileReads an image or audio file and returns it as an image or audio block the model can see.
read_multiple_filesReads several files in one call; a file that fails does not stop the rest.
read_text_fileReads a file as text, optionally only its first or last lines.
search_filesFinds files and folders whose path matches a glob pattern, such as **/*.md.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

How clearly it describes its tools to your assistant

Tools with a description
16 of 16
Say if they change things
16 of 16
Context it takes, at least
~1,800 tokens

Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

From the tool list it sent us. The token figure counts names, descriptions and input names; the full schemas your client loads add more.

How do I install Filesystem MCP Server?

Quick install

Pick your app and paste this in. It follows the README's own install steps below.

Where it goes: Your terminal, in the project folder

Claude Code
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /Users/username/Desktop /path/to/other/allowed/dir

Claude Code already reads and edits files in your project, so this server matters most in Claude Desktop and other chat apps. To add it anyway: claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem followed by your folders.

Codex, Windsurf, ChatGPT and more →

Install steps from the Filesystem MCP Server README

The project's own instructions, copied from its README on GitHub on 24 Nov 2026 under its Apache-2.0 and MIT licence. They are the source of truth; the ready-made configs further down are built from them. The full README is on GitHub.

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

Note: you can provide sandboxed directories to the server by mounting them to /projects. Adding the ro flag will make the directory readonly by the server.

Docker

Note: all directories must be mounted to /projects by default.

Note: the image runs as the unprivileged node user (UID 1000), not root. On a Linux host, where a bind mount keeps the host's file ownership, the server can write only where UID 1000 may, and files it creates are owned by UID 1000. If your own UID differs, add "--user", "<uid>:<gid>" (your id -u and id -g) before mcp/filesystem so it reads and writes as you. Docker Desktop on macOS and Windows maps ownership to your user and needs neither.

{
  "mcpServers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--mount",
        "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop",
        "--mount",
        "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro",
        "--mount",
        "type=bind,src=/path/to/file.txt,dst=/projects/path/to/file.txt",
        "mcp/filesystem",
        "/projects"
      ]
    }
  }
}
NPX
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}

On Windows, use cmd /c to launch npx:

{
  "mcpServers": {
    "filesystem": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}
Docker

Note: all directories must be mounted to /projects by default.

Note: the image runs as the unprivileged node user (UID 1000), not root. On a Linux host, where a bind mount keeps the host's file ownership, the server can write only where UID 1000 may, and files it creates are owned by UID 1000. If your own UID differs, add "--user", "<uid>:<gid>" (your id -u and id -g) before mcp/filesystem so it reads and writes as you. Docker Desktop on macOS and Windows maps ownership to your user and needs neither.

{
  "mcpServers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--mount",
        "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop",
        "--mount",
        "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro",
        "--mount",
        "type=bind,src=/path/to/file.txt,dst=/projects/path/to/file.txt",
        "mcp/filesystem",
        "/projects"
      ]
    }
  }
}
NPX
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}

On Windows, use cmd /c to launch npx:

{
  "mcpServers": {
    "filesystem": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}
Usage with VS Code

For quick installation, click the installation buttons below...

For manual installation, you can configure the MCP server using one of these methods:

Method 1: User Configuration (Recommended) Add the configuration to your user-level MCP configuration file. Open the Command Palette (Ctrl + Shift + P) and run MCP: Open User Configuration. This will open your user mcp.json file where you can add the server configuration.

Method 2: Workspace Configuration Alternatively, you can add the configuration to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

For more details about MCP configuration in VS Code, see the official VS Code MCP documentation.

You can provide sandboxed directories to the server by mounting them to /projects. Adding the ro flag will make the directory readonly by the server.

Docker

Note: all directories must be mounted to /projects by default.

{
  "servers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--mount",
        "type=bind,src=${workspaceFolder},dst=/projects/workspace",
        "mcp/filesystem",
        "/projects"
      ]
    }
  }
}
NPX
{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "${workspaceFolder}"
      ]
    }
  }
}

On Windows, use:

{
  "servers": {
    "filesystem": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "${workspaceFolder}"
      ]
    }
  }
}

What you need first

  • Node.js 24 or newer (or Docker)
  • The paths of the folders you want it to reach

Add Filesystem MCP Server to your app

Pick your app for a ready-to-paste snippet and where it goes, built from the steps above.

Where it goes: Your terminal, in the project folder

Claude Code
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /Users/username/Desktop /path/to/other/allowed/dir

Claude Code already reads and edits files in your project, so this server matters most in Claude Desktop and other chat apps. To add it anyway: claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem followed by your folders.

Replace the two paths with your own folders, and add --read-only to args to allow reading only. On Windows, start it with "command": "cmd" and put "/c", "npx" first in args.

Checked against the project's own install docs on 24 Nov 2026: github.com/modelcontextprotocol/servers/tree/main/src/filesystem, www.npmjs.com/package/@modelcontextprotocol/server-filesystem.

Did this work for you?

Projects change their install steps often. If Filesystem MCP Server did not install, or something here no longer matches the project, tell us and we will check it against the README and fix the page.

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop, VS Code, Codex and ChatGPT. If it will not start, test it in MCP Inspector and look up the error in Fixing MCP server errors.

Filesystem MCP Server not working? Common fixes

It exits with "None of the specified directories are accessible"
The example paths in the config do not exist on your machine. Replace /Users/username/Desktop and /path/to/other/allowed/dir with real folders.
Access denied for a file you expected it to reach
Only the folders you listed, and their subfolders, are allowed. Ask the model to run list_allowed_directories, then add the missing folder to args and restart the client.
npx fails on Windows
Launch it through cmd: set the command to cmd and start args with /c and npx, followed by the usual arguments.
Files written from Docker belong to another user on Linux
The image runs as UID 1000. Add --user with your own id -u and id -g before mcp/filesystem in the docker args.

How do I configure Filesystem MCP Server?

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
Allowed directories (args)Config · requiredThe folders the server may use, listed after the package name. Everything outside them is refused, symlinks included./Users/username/Desktop /path/to/other/allowed/dir
--read-onlyCommand line flagRegisters only the tools that read and list, so nothing can be written anywhere.
--read-only-dirCommand line flagMakes one folder read-only while the other allowed folders stay writable. Repeat it for more folders.
--confine-rootsCommand line flagFor older clients that send Roots: keeps their folders inside the ones on the command line instead of replacing them.
--transport streamable-httpCommand line flagServes it over HTTP on 127.0.0.1:3001/mcp rather than stdio. HOST and PORT move that address.

Filesystem MCP Server FAQ

Is the Filesystem MCP Server official?

Yes. It is a reference server from the Model Context Protocol project, in the modelcontextprotocol/servers repository, published on npm as @modelcontextprotocol/server-filesystem and on Docker Hub as mcp/filesystem.

How do I give Claude Desktop access to my files?

Add the filesystem server to claude_desktop_config.json with npx, the package name and the folders you want to share, then restart Claude Desktop. Claude can then read and edit files in those folders only.

Can the Filesystem MCP Server delete files?

It has no delete tool. It can overwrite a file with write_file and move files with move_file, which is why --read-only or --read-only-dir is worth using for folders that matter.

How do I make the Filesystem server read-only?

Add --read-only to the args. The server then registers only the tools that read and list, and every write tool is missing. To protect just some folders, use --read-only-dir with each folder instead.

Why does it say a directory is not accessible?

It checks every folder when it starts and skips the ones that do not exist. Replace the example paths in the config with real folders on your machine, and use absolute paths.

What Node.js version does it need?

Node.js 24 or later when you run it with npx. Docker works without Node, using the mcp/filesystem image with your folders mounted under /projects.

How do I add the Filesystem MCP Server to Cursor?

Add an entry named filesystem to ~/.cursor/mcp.json with the command npx and the args -y, @modelcontextprotocol/server-filesystem and then each folder it may use.

Can I use the Filesystem MCP Server in VS Code?

Yes, with GitHub Copilot in Agent mode. In .vscode/mcp.json, add a server named filesystem running npx -y @modelcontextprotocol/server-filesystem with ${workspaceFolder} as the folder.

Does the Filesystem MCP Server work with Codex?

Yes, though Codex can already work on files in its own workspace. To add it, run codex mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem followed by the folders to share.

Two peas, one chat

Chat with AI about Filesystem

Opens a chat primed with Filesystem’s README and setup docs from this page, or add it in Cursor to use its tools.

The Cursor button opens Cursor and asks before it adds the server. Fill in any keys it needs in Cursor’s MCP settings.

Peas in a pod

What are the alternatives to Filesystem MCP Server?

How Filesystem MCP Server lines up against its neighbours on the shelf. See every developer tools server.

  • Filesystem MCP ServerThis pea

    Read, write, edit and search files, only inside the folders you name.

    Tools
    16
    Runs on
    Your computer
    Licence
    Apache-2.0 and MIT
    Stars
    92.2K
  • Desktop Commander

    A terminal, file search and surgical file edits for your assistant.

    Tools
    25
    Runs on
    Your computer
    Licence
    MIT
    Stars
    10.2K
  • Serena

    IDE-style "find symbol" and "edit symbol" for an agent, backed by language servers.

    Tools
    3 (REPL)
    Runs on
    Your computer
    Licence
    GPL-3.0
    Stars
    30.8K
  • GitHub

    GitHub's own server for repos, issues, pull requests and Actions.

    Tools
    46
    Runs on
    Hosted or your computer
    Licence
    MIT
    Stars
    34K
  • Git MCP Server

    Status, diffs, history, commits and branches in a local Git repository.

    Tools
    14
    Runs on
    Your computer
    Licence
    MIT
    Stars
    92.2K
  • jCodeMunch

    Indexes your code so an agent can fetch one function instead of reading whole files.

    Tools
    6
    Runs on
    Your computer
    Licence
    LicenseRef-jCodeMunch-Dual-Use-1
    Stars
    2.8K
Full docs on GitHubmodelcontextprotocol/servers

Something wrong on this page? Tell us.

For bots & AI agents

Machine-readable versions of Filesystem MCP Server and MCP Shelf. Fetch these instead of parsing this page.

This listing (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs