Filesystem MCP Server Setup: Connect Folders & Files to Claude (2026)

Use the official Filesystem MCP server so Claude can read and write files in folders you allow. Covers NPX/Docker install, directory access control, and safety.

The Filesystem MCP server is an official reference server that lets Claude read and write files only within folders you allow on your computer. It is simple to set up and is the most common first MCP server for beginners. Here is the install, connection, and safe configuration.

Filesystem server — 4 stepsFilesystem server — 4 steps1. Config fileclaude_desktop_config2. Registernpx server-filesystem3. Allowed dirsset paths4. File tasksread · write

What it does

It provides tools for reading, writing, searching, and moving files within the directories you allow. The key point is that it only touches folders you allow — keeping the scope narrow is the basis of safe use.

Install — Claude Desktop (NPX)

You need Node.js installed. Register it in the config file claude_desktop_config.json as below. Replace the paths with the absolute paths of folders you actually want to allow. To allow more folders, keep adding paths to args.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}

After saving, restart Claude Desktop and the filesystem server appears in the tools list.

Run with Docker

You can also run it with Docker instead of NPX (the official docs have mount examples). To make a folder read-only, add ro to the mount option.

In Claude Code

Register it with claude mcp add — see Claude Code MCP setup for details.

Access control (important)

There are two ways to set allowed folders — (1) specify them as command-line arguments as above, or (2) use MCP Roots (the method the official docs recommend). Either way, do not include sensitive folders such as passwords or financial records.

Try it

Ask things like "read memo.txt on my Desktop" or "save a summary as summary.md in my reports folder," and Claude will ask to approve, then work within that folder.

Staying safe · troubleshooting

Since this is file access, keep the scope minimal (MCP connector security). If the server does not appear or errors out, see the troubleshooting guide.

For other servers see recommended MCP servers and where to find them; for the full map see the connector & MCP catalog, and to build your own see Build your own MCP server. The official source is the Filesystem server repository.

Written/current as of June 2026. Package names and options follow the official repository and may change between versions, so check the official docs as you configure. This is an unofficial guide.

Keep reading

Discuss this topic in the community

Be the first to post in 'Claude Coding'. This is where readers of this topic gather.