Filesystem MCP is the reference server for letting an agent read, write, search, and edit files inside a sandboxed directory tree. It’s what gives Claude Code its ability to actually modify a repo on disk — without it, the model can only suggest diffs and let you copy-paste.

What it produces: standard file ops (read_file, write_file, edit_file, list_directory, search_files), all confined to one or more allow-listed root paths. Atomic edits via match-and-replace, glob patterns for search, and a structured diff format that’s diff-friendly for code review.

Best for: any agentic coding workflow — Claude Code uses this internally. Also useful when running custom MCP-compatible clients (Cline, Cursor) and you need filesystem access scoped to one project.

Skip if: you’re already using Claude Code — it ships with a built-in filesystem layer that’s a superset of this server. You only need to install Filesystem MCP separately for a different MCP client.

Setup gotchas: the allowed-directories arg is non-negotiable. npx -y @modelcontextprotocol/server-filesystem /Users/you/project scopes the agent to that one tree. Pass / and you’ve given an LLM root-of-disk write access — don’t.

Real-world workflow: if you’re wiring a custom agent (LangGraph, your own framework) and want it to operate on a code repo, this server saves you from writing your own file-op tools. Drop it in, point it at the repo, the agent gets safe filesystem access in 5 minutes.

Compatible alternatives: Claude Code’s native file tools (built-in, no install), Git MCP for version-control-aware operations.

Always scope it to a single project root. Never ever to /.