Read, search, compare and patch files within allowed directories using j0hanz’s filesystem MCP server, with an optional read-only mode.
This filesystem MCP server gives an assistant file operations inside explicitly allowed directories. The project documents content search, file comparisons, patching and ordinary read and write operations. It is a distinct implementation from the Model Context Protocol reference filesystem server.
Choose a project folder and ask the assistant to find a specific setting or compare two files. Check the returned paths and excerpts before expanding the task. A focused starting directory makes it easier to tell whether the search found the right file.
The package is @j0hanz/filesystem-mcp and requires Node.js 24 or later. The maintainer documents stdio and an optional Streamable HTTP mode. Its read-only flag removes mutating tools; sensitive filename patterns are also denied by default. These are documented controls, rather than evidence that every possible file is safe to expose.
When enabling edits, inspect the resulting diff and run the checks appropriate to the project. Keep a requested search separate from permission to change a file. Batch operations can simplify a multi-file task, but the intended paths and final content still need to be clear.
Explore file and storage MCP servers for cloud-drive alternatives.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@j0hanz/filesystem-mcp@2.7.3",
"--read-only",
"/path/to/project"
]
}
}
}Replace /path/to/project with the directory to expose. The version matches the registry snapshot; check the maintainer before upgrading.
Node.js 24 or later for the npm package. Configure the directories the server is allowed to access.
| Variable | Description | Required |
|---|---|---|
| FS_ALLOWED_DIRS | Allowed directories; ':'-separated on Unix, ';'-separated on Windows. Alternative to positional arguments. | Optional |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Search and read your Drive — Docs, Sheets and files become context your assistant can actually use.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Build a programmable telecommunications stack for connecting telephony services with the Internet via a cloud-based utility.
Chat with your second brain — search, read and write vault notes through the Local REST API.
Manage Proxmox hypervisors through a Model Context Protocol server, providing a clean interface for nodes, VMs, and containers.