Model Context Protocol
Filesystem MCP Server
Secure file system access with configurable directory permissions for reading, writing, and managing local files.
Last reviewed Mar 2, 2026
Install
claude mcp add filesystem --transport stdio -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dirAvailable tools
| Tool | Description |
|---|---|
| read_file | Read the contents of a file at a given path |
| write_file | Write content to a file, creating it if needed |
| list_directory | List files and subdirectories in a directory |
| create_directory | Create a new directory at the specified path |
| move_file | Move or rename a file or directory |
| search_files | Search for files matching a pattern recursively |
| get_file_info | Get metadata about a file including size and timestamps |
What it does
The Filesystem MCP Server provides your AI coding assistant with secure, sandboxed access to your local file system. It enforces strict directory boundaries -- the server only allows operations within the directories you explicitly specify at launch, preventing unauthorized access to sensitive files elsewhere on your machine.
This is a foundational MCP server that many developers install first. It enables AI assistants to read project files for context, write generated code, organize directories, and search through file trees -- all within the safety of a configurable sandbox.
Use cases
- Give your AI assistant read/write access to a specific project directory for code generation
- Search through project files to find implementations, configs, or patterns
- Organize files by creating directories, moving files, and cleaning up project structure
- Read configuration files, package manifests, and documentation to inform AI responses
- Write generated code, tests, or documentation directly to your project
Getting started
- Decide which directory (or directories) you want to expose to the MCP server. Use absolute paths for reliability.
- Replace
/path/to/allowed/dirin the install command with your actual directory path. You can specify multiple directories by adding additional path arguments. - The server enforces that all file operations stay within the specified directories. Symlinks that point outside the allowed directories are blocked.
- No API keys or authentication are needed -- security is handled entirely through the directory path restrictions you configure at launch.
Compatibility
Related MCP servers
AWS MCP Server
Interact with AWS services including S3, Lambda, CloudWatch, and ECS from your AI coding assistant.
Context7 MCP Server
Fetch up-to-date library documentation and code examples directly into your AI coding assistant.
Docker MCP Server
Manage Docker containers, images, and builds directly from your AI coding assistant.