Filesystem

v2.4.1
io.github.modelcontextprotocol/server-filesystem Checked 2 hours ago Published 4 days ago

Read, write, search and edit files, with access limited to allowed directories or client Roots

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add server-filesystem -- npx -y --package=@modelcontextprotocol/server-filesystem@2.4.1 mcp-server-filesystem '<allowed_directory>'
Add to claude_desktop_config.json
{
  "mcpServers": {
    "server-filesystem": {
      "args": [
        "-y",
        "--package=@modelcontextprotocol/server-filesystem@2.4.1",
        "mcp-server-filesystem",
        "<allowed_directory>"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "server-filesystem": {
      "args": [
        "-y",
        "--package=@modelcontextprotocol/server-filesystem@2.4.1",
        "mcp-server-filesystem",
        "<allowed_directory>"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "server-filesystem": {
      "args": [
        "-y",
        "--package=@modelcontextprotocol/server-filesystem@2.4.1",
        "mcp-server-filesystem",
        "<allowed_directory>"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.server-filesystem]
command = "npx"
args = ["-y", "--package=@modelcontextprotocol/server-filesystem@2.4.1", "mcp-server-filesystem", "<allowed_directory>"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: read_file, read_text_file, read_media_file, read_multiple_files, write_file, append_file, edit_file, create_directory, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json