Available Tools
read_file
"Read the contents of ~/projects/shared/config.yaml"write_file
"Save this JSON data to ~/projects/data/output.json"list_directory
"Show all files in ~/projects/backend/src/"search_files
"Find all .env files under ~/projects/"
"Search for files containing 'DATABASE_URL'"create_directory
"Create a new directory ~/projects/backups/2026-04-07"move_file
"Rename old-config.yaml to config.yaml.bak"get_file_info
"Show the size and modification date of package.json"Security Model
Scoped Root
The agent can ONLY access files under the specified root:
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]- Access
/Users/you/projects/app/src/— allowed - Access
/Users/you/.ssh/— blocked - Access
/etc/passwd— blocked
Multiple Roots
Allow access to multiple directories:
"args": ["-y", "@modelcontextprotocol/server-filesystem",
"/Users/you/projects", "/Users/you/documents"]Read-Only Mode
For safety, restrict to read-only:
"args": ["-y", "@modelcontextprotocol/server-filesystem", "--read-only", "/path"]Key Stats
- 4,000+ GitHub stars
- Official MCP server
- Sandboxed root directory
- Read, write, search, move
- Read-only mode available
FAQ
Q: What is Filesystem MCP? A: The official MCP server for local file access, giving AI agents scoped read/write access to files within a specified root directory.
Q: Is it safe? A: Yes, the agent cannot access files outside the specified root directory. Use read-only mode for extra safety.
Q: How is this different from Claude Code's built-in file access? A: Claude Code accesses the current project directory. Filesystem MCP lets you grant access to additional directories outside the project.