File System MCP Server
Read, write, list, and modify files and directories directly within your local filesystem.
Data last scanned yesterday · Reviewed 2 months ago
Overview
The File System MCP Server provides a standard interface for AI assistants to interact with your local files. It supports comprehensive file management operations including reading and writing text files, listing directory contents, moving resources, and retrieving file metadata. The server implements a robust directory access control system, restricting all operations to paths explicitly defined either through command-line arguments during startup or dynamically via the MCP Roots protocol. This mechanism ensures that AI agents are confined to specific, authorized project folders.
Our verdict
With a security score of 76/100, this server is classified at a medium risk level. The primary security consideration is that every installation grants full write access to the specified directories, as no read-only mode is available. While it benefits from being maintained by the official Model Context Protocol organization and shows high activity, users must exercise caution when defining allowed directory paths. It is well-suited for developers who need deep integration with local project files, provided they maintain strict access control configuration.
- Maintained directly by the official Model Context Protocol organization
- Supports dynamic directory access via the Roots protocol
- Minimal supply-chain risk with only four direct dependencies
- High development velocity with daily repository activity
- No read-only mode available, enabling full write access by default
- License is currently set to NOASSERTION
- Authentication mechanisms have not been reviewed
Setup
{
"mcpServers": {
"filesystem": {
"args": [
"-y",
"@modelcontextprotocol/server-filesystem"
],
"command": "npx"
}
}
}Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.
- No read-only mode — running this grants full read/write access.
- No built-in authentication — anyone with access to this config can invoke every tool it exposes.
Tools
| Tool | Description | Risk |
|---|---|---|
| read_text_file | Read complete contents of a file as text | low |
| read_media_file | Read a file and return it as a base64-encoded content block with its MIME type | low |
| read_multiple_files | Read multiple files simultaneously | low |
| write_file | Create new file or overwrite existing (exercise caution with this) | high |
| edit_file | Make selective edits using advanced pattern matching and formatting | high |
| create_directory | Create new directory or ensure it exists | medium |
| list_directory | List directory contents with [FILE] or [DIR] prefixes | low |
| list_directory_with_sizes | List directory contents with [FILE] or [DIR] prefixes, including file sizes | low |
| move_file | Move or rename files and directories | high |
| search_files | Recursively search for files/directories that match or do not match patterns | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf | ||||
| ChatGPT |
Frequently asked questions
›What happens if I don't provide any directories at startup?
If you start the server without command-line arguments and your MCP client does not support the roots protocol, the server will throw an error and fail to initialize.
›How do I update the allowed directories after the server has started?
If your client supports the MCP roots protocol, you can use the roots/list_changed notification to dynamically update allowed directories without restarting the server.
›Does read_text_file support binary files?
No, read_text_file always treats files as UTF-8 text. Use read_media_file instead to handle binary files as base64-encoded content.
›Can I preview changes before using edit_file?
Yes, you should set the dryRun parameter to true to preview changes and receive a detailed diff without modifying any files.
›How can I check which directories the server is currently allowed to access?
You can use the list_allowed_directories tool to see the current list of authorized directories.
›Can I read both the start and end of a file at the same time using read_text_file?
No, you cannot specify both head and tail parameters simultaneously when using the read_text_file tool.
Alternatives
Pair it with a skill
File System MCP Server changes what Claude can reach. These skills change how well it uses that access.
Badge
Maintain this server? Add the live badge to your README.