Data as of

MCP Filesystem Server for Claude Code: Setup & Config

MCP Filesystem Server gives Claude Code file and directory operations within explicitly allowed paths.

MCP Filesystem Server Claude Code configuration

  1. Choose Claude Code configuration scope

    For MCP Filesystem Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add MCP Filesystem Server to Claude Code

    Use the mcp-filesystem-server entry below in mcpServers. Keep MCP Filesystem Server's documented stdio connection fields and your other Claude Code entries.

  3. Check MCP Filesystem Server in Claude Code

    MCP Filesystem Server: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "mcp-filesystem-server": {
      "type": "stdio",
      "command": "mcp-filesystem-server",
      "args": [
        "/path/to/allowed/directory",
        "/another/allowed/directory"
      ],
      "env": {}
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'mcp-filesystem-server' '{"type":"stdio","command":"mcp-filesystem-server","args":["/path/to/allowed/directory","/another/allowed/directory"],"env":{}}'

MCP Filesystem in Claude Code: stdio checks

  • If MCP Filesystem Server fails to start, check mcp-filesystem-server, the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • MCP Filesystem Server uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
Tools
read_file, read_multiple_files, write_file

MCP Filesystem Server — details. Claude Code guide

Frequently asked questions

Register MCP Filesystem Server with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.

Claude Code's mcp-filesystem-server example uses stdio.

MCP Filesystem Server's Claude Code configuration invokes mcp-filesystem-server.

MCP Filesystem Server's stored list contains 14 tools, including read_file, read_multiple_files, write_file. Compare those names with Claude Code's connected tool list; the stored list is not a live check.