Skip to content
AgentQuadrant

Last verified

F

Filesystem MCP Server

Editor's Pick

Give Claude read/write access to local directories via the Model Context Protocol

Developer Tools

Install

npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir

Tools exposed

  • read_file
  • write_file
  • list_directory
  • create_directory
  • move_file
  • delete_file
  • get_file_info
  • search_files
"Filesystem is the hello-world of MCP — if you can mount a directory, you understand the protocol."

Filesystem MCP Server

The Filesystem MCP Server is an official reference implementation from Anthropic that exposes local file system operations to MCP-compatible AI clients. It accepts a list of allowed root directories at startup and provides eight tools — read, write, list, create, move, delete, get-info, and search — scoped strictly to those roots.

How does it work?

The server runs as a child process over stdio transport. Your MCP client (e.g., Claude Desktop) spawns it via npx and exchanges JSON-RPC messages to invoke file tools. Each tool call is validated against the configured root paths before any disk operation occurs. Because it is a developer tools integration, no network access is required — everything stays local.

A typical claude_desktop_config.json entry looks like:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
    }
  }
}

When to use it

Use the Filesystem MCP server when you want Claude to read source files, write generated output, or navigate directory trees without copy-pasting content into the chat. It pairs well with the GitHub MCP server when you want both local and remote repository access in the same session. For database-backed projects, combine it with a data layer server such as the Postgres MCP server.

Frequently asked questions

Which directories can the Filesystem MCP server access?

Only directories you explicitly pass as command-line arguments when starting the server. The server enforces path confinement and will reject any request to read or write outside those roots, giving you a clear security boundary without additional configuration.

Does the Filesystem MCP server work on Windows?

Yes. The npm package resolves paths using Node.js built-ins, so it runs on Windows, macOS, and Linux. On Windows, pass directories using either forward slashes or escaped backslashes in the Claude Desktop config JSON.

Can I run multiple Filesystem MCP servers for different directories?

Yes. Define separate server entries in your MCP client config, each pointing to a different root directory. Claude will see them as distinct servers and can address each independently, letting you isolate work and personal files cleanly.

Recently verified