Filesystem MCP
by j0hanz
Let your AI read, write, and manage local files safely
filesystem Node.js Beginner Self-hostable No API key Verified
π
Updated: 2w ago
Description
Filesystem MCP is one of the foundational building blocks of the MCP ecosystem. It gives AI assistants the ability to read, write, create, move, and search files on your local machine through a controlled, permission-aware interface. Rather than relying on the AI to generate file content that you manually copy-paste into place, Filesystem MCP lets the model work directly with your project files.
The server operates within explicitly defined directory boundaries. When you configure it, you specify which directories the AI is allowed to access, and it cannot escape those boundaries. This sandbox approach means you get the productivity benefits of AI-driven file operations without the risk of unintended changes to system files or other projects. Every operation is scoped and auditable.
Beyond basic read and write, Filesystem MCP includes practical utilities that make it genuinely useful for day-to-day development. The `search_files` tool lets the AI find files by pattern matching across your project. The `edit_file` tool enables surgical modifications to existing files without rewriting them entirely. And `read_multiple_files` allows the AI to efficiently gather context from several files at once, which is essential for understanding how different parts of a codebase relate to each other.
β Best for
Any developer using MCP-compatible AI assistants who wants the model to interact with project files directly instead of just generating code snippets
βοΈ Skip if
You only work with cloud-based files or need database-level storage β look at specialized MCP servers for those use cases
π‘ Use cases
- Scaffolding new projects by letting the AI create directory structures and boilerplate files
- Refactoring operations that touch multiple files, like renaming a module and updating all imports
- Searching through project files to gather context before making code changes
π Pros
- β Sandboxed by design β the AI can only access directories you explicitly allow
- β Includes file search and multi-file read for efficient codebase exploration
- β Surgical file editing without needing to rewrite entire files
π Cons
- β Restricted to local filesystem β no support for remote or cloud storage
- β Large file operations may hit token limits depending on file sizes
π§ Exposed tools (10 tools)
| Tool | Category | Description |
|---|---|---|
| create_directory | management | Create a new directory, including any necessary parent directories |
| move_file | management | Move or rename a file or directory to a new location |
| delete_file | management | Delete a file or empty directory at the specified path |
| read_file | read | Read the full contents of a file at the specified path |
| list_directory | read | List all files and subdirectories within a given directory |
| get_file_info | read | Retrieve metadata about a file including size, modification date, and permissions |
| read_multiple_files | read | Read the contents of several files at once for efficient context gathering |
| search_files | search | Search for files matching a name pattern across the allowed directories |
| write_file | write | Create or overwrite a file with the provided content |
| edit_file | write | Apply targeted edits to an existing file using pattern-based replacements |
β‘ Installation
Prerequisites:
- β’ Node.js
claude mcp add filesystem -- npx @anthropic-ai/filesystem-mcp@latest /path/to/allowed/dirπ‘ Tips & tricks
Configure the allowed directories to be as specific as possible. Instead of granting access to your entire home directory, point it at individual project roots. This keeps the AI focused and reduces the chance of accidental modifications. When you need the AI to understand a complex codebase, start by asking it to use `search_files` and `read_multiple_files` to build context before making changes. The `edit_file` tool is particularly useful for small, targeted changes to large files where rewriting the whole file would be wasteful.
Quick info
- Author
- j0hanz
- License
- Runtime
- Node.js
- Transport
- stdio
- Category
- filesystem
- Difficulty
- Beginner
- Self-hostable
- β
- API key
- No API key needed
- Docker
- β
- Version
- 1.5.1
- Updated
- Feb 5, 2026
Client compatibility
- β Claude Code
- β Cursor
- β VS Code Copilot
- β Gemini CLI
- β Windsurf
- β Cline
- β JetBrains AI
- β Warp
Platforms
π macOS π§ Linux πͺ Windows