FM
Filesystem MCP Server
Sandboxed read/write/search access to local directories for AI agents.
Last updated July 18, 2026
DevOpsLocal · stdioTypeScript88.6k
Overview
Part of the official Model Context Protocol reference servers collection. Gives an agent scoped file read/write/search access, restricted to allow-listed directories (set at startup or dynamically via MCP Roots).
Use cases
Let a coding agent read and edit files in a specific project folder.
Search a codebase by filename or content pattern.
Restrict access to a docs/ folder for a writing assistant.
Let an agent list and search files by name or content pattern with the search_files and directory_tree tools.
Make a targeted edit to a file with edit_file instead of rewriting the whole file.
Read several files in one call with read_multiple_files, so an agent gets project context faster.
Install
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}FAQ
No — all filesystem operations are restricted to the directories set at startup or via the MCP Roots protocol; the server errors if no directories are configured.