Problem it solves
By default, Claude Code operates within your current project directory. That boundary makes sense for most sessions — but sometimes you need to cross it. You want to reference a config file in your home directory, read a shared schema file from a sibling repo, or pull in a template from a central location outside the project tree.
Filesystem MCP grants Claude read access to directories you specify explicitly. It’s a narrow, controlled expansion of what Claude can see — you decide the scope, and nothing outside those directories is accessible.
How to install
Replace /path/to/dir with the actual directory you want Claude to access:
claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dirYou can specify multiple directories by passing them as additional arguments:
claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem /Users/you/shared-configs /Users/you/templatesRestart Claude Code and run /mcp to confirm the server is active. This is an official Anthropic reference implementation from the modelcontextprotocol/servers repository.
How to use
Once installed, Claude can read files in the allowed directories as naturally as it reads your project files:
- “Read the database schema from ~/shared-configs/db-schema.sql”
- “Check the ESLint config in the parent directory”
- “Pull in the API spec from /Users/you/specs/openapi.yaml”
- “Look at the shared CLAUDE.md in ~/team-standards/ for conventions”
Claude will not access anything outside the directories you specified at install time.
Pro tips
Keep paths narrow. The security value of this MCP comes from scope control. Grant access to a specific subdirectory, not your entire home directory. The more specific the path, the smaller the blast radius if something goes wrong.
Use for shared team configs. If your team keeps shared CLAUDE.md templates, ESLint configs, or API specs in a central location outside individual repos, Filesystem MCP is the right way to give Claude access to those without copying them into every project.
Document what you granted. Add a comment to your project’s CLAUDE.md noting which external directories are accessible via Filesystem MCP. Future you (and teammates) will appreciate knowing why Claude can see files outside the project.
When NOT to use
If all the files you need are already inside your project directory, don’t install this — Claude already has full access to those. Also skip it if you only need to read web content (use Fetch MCP) or GitHub files (use GitHub MCP). Filesystem MCP is specifically for local files outside the project root, and it’s only worth the overhead if that’s a real, recurring need in your workflow.