
How to add Filesystem (Reference) to Claude Desktop
Official MCP reference server for secure local filesystem read/write within allowed directories. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 15, 2026 ยท 74kโ ยท stdio ยท no auth ยท official
Claude Desktop config for Filesystem (Reference)
npx -y @modelcontextprotocol/server-filesystem /absolute/path/to/dir{
"mcpServers": {
"filesystem-reference": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/absolute/path/to/dir"
]
}
}
}Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the Filesystem (Reference) config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm Filesystem (Reference)'s tools appear under the ๐ tools menu.
Before you start
- Node.js 18+ (to run via `npx @modelcontextprotocol/server-filesystem`), OR Docker if using the container image
- No credentials or auth โ access is granted by listing allowed directories as args, or via the client's MCP Roots support
- One or more directory paths you intend to expose to the model
What Filesystem (Reference) can do in Claude Desktop
read_text_fileRead a file's contents as UTF-8 text (supports head/tail line limits).
read_media_fileRead an image or audio file and return it as base64.
read_multiple_filesRead several files at once in a single call.
write_fileCreate a new file or overwrite an existing one.
edit_fileMake selective line-based edits using pattern matching, returning a git-style diff.
create_directoryCreate a directory, including any missing parent directories.
list_directoryList directory contents with [FILE]/[DIR] type prefixes.
list_directory_with_sizesList directory contents including each entry's size.
Security
Only the directories passed as arguments are accessible, but any granted directory is fully readable and writable; scope it to a project folder rather than your home directory. Never grant root or system paths.
Filesystem (Reference) + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Filesystem (Reference) config there under the "mcpServers" key and restart the client.
Is Filesystem (Reference) safe to use with Claude Desktop?
Only the directories passed as arguments are accessible, but any granted directory is fully readable and writable; scope it to a project folder rather than your home directory. Never grant root or system paths.
How do I restrict which folders the model can touch?
Pass each allowed directory as a command-line argument when launching the server, or have your client supply them via MCP Roots. Any path outside that set is rejected.
Does it require an API key or login?
No. It runs locally over stdio with no authentication. Security comes entirely from the allowed-directory sandbox.
Can I make a directory read-only?
Yes, most easily with the Docker image by appending `,ro` to the bind mount (e.g. `/host/path,dst=/projects/foo,ro`).