MCP server Official

Filesystem MCP Server

Reference MCP server for reading, writing, searching and moving files inside directories you explicitly allow.

Author
Model Context Protocol
Works with
Any MCP client
License
MIT
Documented
Oct 2, 2026

What Filesystem MCP Server is

Node.js server implementing MCP for filesystem operations, published on npm as @modelcontextprotocol/server-filesystem. Access is limited to allowed directories given as command-line arguments or via MCP Roots.

What it does

How Filesystem MCP Server plugs in: which agents run it and what it addsRUNS INYour agentAny MCP clientone host documentedMCP SERVER · OFFICIALFilesystem MCP ServerConnect the agent to tools, data…4 install steps1 permission notelicense: MITWHAT IT ADDSWhat it doesRead text files (with head/tail o…Read multiple files at onceWrite and overwrite filesCreate, list and delete directori…agent → extension → new capability · from the official repository or docs
Where Filesystem MCP Server runs and what it adds, from its documentation
  • Read text files (with head/tail options) and media files
  • Read multiple files at once
  • Write and overwrite files
  • Create, list and delete directories and move files or directories
  • Search files and get file metadata
  • Update allowed directories at runtime through MCP Roots

When to use it

Good fit

  • Letting an agent work on a few specific project folders
  • Clients that support Roots and need runtime directory changes

Not for

  • Anything needing access outside the allowed directories
  • Production use without your own review: The root README says these are reference implementations meant as educational examples, not production-ready solutions.

How to install Filesystem MCP Server

You need: Node.js (npx); At least one allowed directory via arguments or Roots, otherwise it errors on start

  1. Make sure Node.js and npx are available
  2. Add the server to your MCP client config with the npx command
  3. Pass at least one allowed directory as an argument, or use a client that supports Roots
  4. Restart the client and call list_allowed_directories to confirm
Configuration example (from the official docs)
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/dir1",
        "/path/to/dir2"
      ]
    }
  }
}

Permissions and security

What it can access

  • Read and write files and directories inside allowed directories only

Security notes from the maintainers

  • write_file overwrites existing files; README says to exercise caution
  • The root README says these are reference implementations meant as educational examples, not production-ready solutions.

Review the source before granting an agent access to credentials or production systems. We document what the maintainers state; we do not audit code.

Limitations

  • Server errors on startup if no args are given and the client does not support Roots
  • Roots from the client completely replace command-line directories

Frequently asked questions

What does the Filesystem MCP server need to start?

At least one allowed directory, passed as an argument or supplied by the client through Roots. source

Can the Filesystem MCP server access files outside the allowed directories?

No. The README says all operations are restricted to allowed directories. source

What is the npm package for the Filesystem MCP server?

@modelcontextprotocol/server-filesystem. source

Related guides

Sources and gaps

Not stated by the maintainers: Hosts other than generic MCP clients are not individually named as supported for Claude Code/Cursor/Windsurf/Codex in this README; last_release date not visible in the checked README.

More extensions to look at