MCP Filesystem Server Config

MCP Config

MCP (Model Context Protocol) servers extend Claude's capabilities by giving it access to external tools and data sources. The filesystem server is the most common starting point — it lets Claude read and write files on your machine, scoped to specific directories you choose.

The config

Add this to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Projects",
        "/Users/yourname/Documents/notes"
      ]
    }
  }
}

Each path in the args array is a directory Claude can access. It cannot read or write outside these directories.

What it enables

With the filesystem server running, Claude can:

  • Read files you reference in conversation without you pasting them
  • Write files directly (drafts, configs, scripts)
  • List directory contents to understand project structure
  • Search across files in the allowed directories

Security: scope carefully

Every path you add is a directory Claude can read and modify. Principles:

  • Add project directories, not your home directory. /Users/yourname/Projects is fine. /Users/yourname gives access to SSH keys, credentials, browser data.
  • Don't add directories with secrets. Keep .env files, credential stores, and private keys outside the allowed paths.
  • Start narrow, widen later. Begin with one project directory. Add more as you find the need.

Adding more servers

MCP servers are composable. Add multiple servers for different capabilities:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourname/Projects"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Troubleshooting

"Server not found" or nothing happens — Restart Claude Desktop after editing the config file. MCP servers are loaded at startup.

"Permission denied" — The paths in args must exist and be readable by your user. Check with ls -la /path/you/added.

Server crashes silently — Check the MCP server logs. On macOS: ~/Library/Logs/Claude/mcp*.log

Tips

  • You don't need MCP for Claude Code (the CLI) — it already has filesystem access built in. MCP filesystem is for Claude Desktop (the chat app).
  • If you're using Claude Code, look at Git Guardrails instead for controlling what Claude can do with your files.