Filesystem

Filesystem

Official

Read and write local files with configurable access controls.

Score 96(?)Anthropic (modelcontextprotocol)MIT84kVerified Top MCPs for Filesystem & Storage

Quick answer

What it does

Provides read/write access to local files and directories within configurable path boundaries. Supports listing, reading, writing, and moving files.

Best for

  • Reading and editing local code
  • Generating files from AI output
  • Navigating project structures
  • Config file management

Not for

  • Remote file systems
  • Cloud storage access

Setup recipe

Pick your client, then follow the three steps.

  1. 1

    Install

    claude_desktop_config.json
    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/path/to/allowed/dir"
          ]
        }
      }
    }

    Paste under mcpServers. Fully quit and reopen Claude after editing.

    CLI or .mcp.json
    claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir

    Run from your repo. Commit .mcp.json to share with your team.

    .cursor/mcp.json
    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/path/to/allowed/dir"
          ]
        }
      }
    }

    Global path: ~/.cursor/mcp.json. Reload window after editing.

    .vscode/mcp.json
    {
      "servers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/path/to/allowed/dir"
          ]
        }
      }
    }

    VS Code uses the "servers" key (not "mcpServers").

    ~/.codeium/windsurf/mcp_config.json
    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/path/to/allowed/dir"
          ]
        }
      }
    }

    Open via Cascade → hammer icon → Configure.

    cline_mcp_settings.json
    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/path/to/allowed/dir"
          ]
        }
      }
    }

    Open via the Cline sidebar → MCP Servers → Edit.

    ~/.continue/config.json
    {
      "experimental": {
        "modelContextProtocolServers": [
          {
            "transport": {
              "type": "stdio",
              "command": "npx",
              "args": [
                "-y",
                "@modelcontextprotocol/server-filesystem",
                "/path/to/allowed/dir"
              ]
            }
          }
        ]
      }
    }

    Continue uses modelContextProtocolServers with a transport block.

    ~/.codex/config.toml
    # ~/.codex/config.toml
    [mcp_servers.filesystem]
    command = "npx"
    args = [
      "-y",
      "@modelcontextprotocol/server-filesystem",
      "/path/to/allowed/dir",
    ]

    Codex uses TOML. Each server is a [mcp_servers.<name>] subtable.

    ~/.config/zed/settings.json
    {
      "context_servers": {
        "filesystem": {
          "command": {
            "path": "npx",
            "args": [
              "-y",
              "@modelcontextprotocol/server-filesystem",
              "/path/to/allowed/dir"
            ]
          }
        }
      }
    }

    Zed calls them "context_servers". Settings live-reload on save.

    ChatGPT → Apps directory

    Filesystem doesn't ship a hosted HTTPS endpoint today. ChatGPT supports remote MCP servers only — to use this server in ChatGPT you'll need to deploy it to a public HTTPS URL first (e.g. via Cloudflare Workers or Vercel) or wait for an official remote build.

  2. 2

    Set required secrets

    No credentials required — this MCP runs over stdio without authentication.

  3. 3

    Try a minimum working prompt

    Prove the install works by grouping TODOs in your repo

    List every TODO comment under ~/code/project-a (recursively) and group them by file, showing the matching line for each.

    Tested with: Claude Desktop, Cursor, VS Code.

Tools & permissions

ToolDescriptionArgsSide effects
read_fileRead the full contents of a file within an allowed directory.path: stringRead
read_multiple_filesRead several files in one call.paths: string[]Read
write_fileCreate or overwrite a file.path: string, content: stringWrite
edit_fileApply a search-and-replace edit to an existing file.path: string, edits: object[]Write
create_directoryCreate a new directory (and parents) within an allowed root.path: stringWrite
list_directoryList the entries of a directory.path: stringRead
directory_treeReturn a recursive tree of a directory.path: stringRead
move_fileMove or rename a file.source: string, destination: stringWrite
search_filesRecursively search for files by pattern.path: string, pattern: stringRead
get_file_infoReturn size, timestamps, and type for a file.path: stringRead
list_allowed_directoriesReturn the directory roots the server was started with.Read

Security & scope

Access scope
Read + write
Sandbox
Runs as a child process over stdio. Access is restricted to the directory roots passed on the command line; path traversal via `..` or symlinks outside those roots is rejected at the path-normalization layer before any filesystem call is made.
Gotchas
  • Without at least one allowed-directory argument, the server refuses to start — there is no implicit current-working-directory default.
  • Read and write are bundled; for read-only access you must mount the directory read-only at the OS level or run the server in a sandbox.

Agent prompt pack

— copy into Claude, Cursor, or ChatGPT.
Paste into Claude, Cursor, or ChatGPT. Edit the [brackets] before sending.
Recommend the best MCP servers for [task: e.g. filesystem & storage work] in [client: Claude].

Constraints:
- Prefer tools that are [official | open-source | read-only] — pick what matters for my use case.
- Exclude MCPs that require [e.g. a paid plan, OAuth-only flows, remote-only transport].
- Return at most 3 picks, ranked.

For each pick include:
1. One-sentence rationale.
2. The ready-to-paste install snippet for my client.
3. Any required secrets I need to create before installing.

Cross-check the top-mcps.com listing: https://top-mcps.com/top-mcps-for-filesystem-storage
Compare Filesystem against a real alternative. Swap the second MCP in [brackets] if you want a different match.
Compare Filesystem MCP vs [GitHub MCP] for the following job: [describe the job, e.g. "let an agent create GitHub issues on bug triage"].

Judge them on:
- Setup time and complexity (what a new user hits first).
- Auth model (none / API key / OAuth 2.1) and credential risk.
- Transport (stdio / Streamable HTTP / SSE) and where the server runs.
- Required secrets and the blast radius if they leak.
- Operational risk in an unattended agent loop.
- Which one is "good enough" for a weekend prototype vs. production.

End with one sentence: which should I pick for my scenario, which is: [my scenario].

References:
- https://top-mcps.com/mcp/filesystem
- top-mcps.com listing for GitHub
Asks the agent to install and verify. Works inside Claude Code, Cursor Agent, Codex CLI.
Install the Filesystem MCP server for my [client: Claude] at the default config path for that client.

Use the exact install snippet published at https://top-mcps.com/mcp/filesystem (fetch https://top-mcps.com/mcp/filesystem.json for the canonical server.json if you can read URLs).

Before finishing:
1. Create the required secrets (no secrets) and put them in the appropriate env block — do not hard-code them.
2. Restart or reload the client so it picks up the new server.
3. Verify the server is connected (green / running state) and at least one tool is listed.
4. If anything fails, read the client's MCP logs and report the exact error — do not silently retry.

Confirm when done and list the tools the server now exposes.

Frequently asked questions

What changed

2 updates tracked.
  1. Refreshed install snippets and fact sheet; verified for 2026.

  2. Initial directory listing.

More Filesystem & Storage MCPs

Other tools in the same category worth evaluating.

Official

Read, write, and search across Notion pages, databases, and blocks.

notion, docs, databases, knowledge
5 minLow
Cloudflare
Official

Manage Workers, R2 buckets, DNS, and edge policies on Cloudflare.

cloudflare, edge, workers, dns
10 minMedium
Obsidian

Read and write notes in your local Obsidian vault.

obsidian, notes, markdown, pkm
3 minLow

Compared with Filesystem

Side-by-side breakdowns for the choices people most often weigh against this MCP.

Exploring Top MCPs for Filesystem & Storage? See all Filesystem & Storage MCPs →