MCP server · Reference servers
Filesystem MCP server
Lets an assistant read, write, edit, move and search files, but only inside the folders you allow.
- Maintainer
- Model Context Protocol project (official)
- Licence
- Apache-2.0 AND MIT
- Runs
- Locally (npx)
- Sign-in
- None
- Last activity
- 2026-10-11
Overview
What it does
The Filesystem server is one of the reference servers kept by the MCP steering group. It runs on your machine with Node.js and gives an assistant a set of file tools that are locked to a list of allowed folders. You pass those folders on the command line, or your client can supply them through MCP Roots, which replace the command-line list and can change while the server runs.
Pick it when you want an assistant to work with local files without giving it a shell. It reads text and media files, makes line-based edits with a dry-run preview and a diff, lists and searches folders, and reports file metadata. Each tool carries read-only and destructive hints, so a client can ask before it writes. A Docker image is also offered: mount folders under /projects and add ro to make a mount read-only. The project calls its servers reference implementations, so review them before production use.
Tools
What the assistant can do
- Read text files whole or by head and tail lines, and read several files at once
- Read images, audio and other files as base64 with their MIME type
- Write files and make line-based edits with a dry-run diff preview
- Create, list and move folders and files, with a size-sorted listing
- Search recursively with glob patterns and get a JSON folder tree
- Report file metadata and list the folders the server may access
Install
Install Filesystem MCP server in your app
You need:
- Node.js with npx
- An MCP client; on Windows the README launches npx through cmd /c
Run in your project. --scope local keeps the servers private to you in this project; use user for every project.
claude mcp add --scope local filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/folder
claude mcp add --scope local filesystem -- cmd /c npx -y '@modelcontextprotocol/server-filesystem' /path/to/allowed/folder
Project root. Commit it to share the servers with your team; each person sets the variables in their own shell.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/folder"
]
}
}
}
- On native Windows (not WSL), the reference servers’ READMEs start npx through `cmd /c`: if a server won’t start, use "command": "cmd" with "args": ["/c", "npx", …].
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config). Restart Claude after saving.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/folder"
]
}
}
}
In your project, or ~/.cursor/mcp.json for every project.
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/folder"
]
}
}
}
In your workspace. VS Code asks for each secret the first time a server starts and stores it securely.
{
"servers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/folder"
]
}
}
}
macOS/Linux: ~/.config/devin/mcp_config.json · Windows: %APPDATA%\devin\mcp_config.json. Read by the default Devin Local agent and by the legacy Cascade agent.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/folder"
]
}
}
}
Want it alongside other servers? Open Filesystem MCP Server in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.
Before you install
- It can create, overwrite, edit and move files anywhere inside the allowed folders; write_file replaces a file without a backup.
- Access is limited to the allowed folders, and Roots from the client replace the command-line list, so check what your client exposes.
- With Docker, mount folders with the ro flag to make them read-only to the server.
- A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.
Why it’s listed
Why we list it
The standard way to give an assistant scoped local file access, kept by the MCP project and released alongside the protocol SDKs.
Related
More MCP servers
- Git MCP ServerLets an assistant check status, read diffs and logs, stage, commit and switch branches in a local Git repository.
- Fetch MCP ServerLets an assistant fetch a web page and read it as Markdown, in chunks, with private addresses blocked by default.
- Knowledge Graph Memory ServerGives an assistant a persistent local knowledge graph of entities, relations and facts that it can add to and search.
- Sequential Thinking MCP ServerGives an assistant a tool for step-by-step reasoning that it can revise or branch as it works through a problem.
- Time MCP ServerLets an assistant get the current time in any IANA time zone and convert a time between zones.
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?