
How to add MCP Filesystem Server to Claude Desktop
Secure local filesystem access for MCP clients — read, write, search, and manage files within allowed directories. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 · 654★ · stdio · no auth
Claude Desktop config for MCP Filesystem Server
go install github.com/mark3labs/mcp-filesystem-server@latest{
"mcpServers": {
"mcp-filesystem-server": {
"command": "mcp-filesystem-server",
"args": [
"/path/to/allowed/directory",
"/another/allowed/directory"
]
}
}
}Setup steps
- 1Open Claude Desktop → Settings → Developer → Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the MCP Filesystem Server 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 MCP Filesystem Server's tools appear under the 🔌 tools menu.
Before you start
- Go (for `go install`) or Docker (to run the container image)
- One or more local directories to expose, passed as command arguments
What MCP Filesystem Server can do in Claude Desktop
read_fileRead the complete contents of a file from the file system. Parameters: path (required).
read_multiple_filesRead the contents of multiple files in a single operation. Parameters: paths (required, list of file paths).
write_fileCreate a new file or overwrite an existing file with new content. Parameters: path (required), content (required).
copy_fileCopy files and directories. Parameters: source (required), destination (required).
move_fileMove or rename files and directories. Parameters: source (required), destination (required).
delete_fileDelete a file or directory from the file system. Parameters: path (required), recursive (optional, default false).
modify_fileUpdate a file by finding and replacing text using string matching or regex. Parameters: path (required), find (required), replace (required), all_occurrences (optional, default true), regex (optional, default false).
list_directoryGet a detailed listing of all files and directories in a specified path. Parameters: path (required).
Security
Access is restricted to the directories passed as command arguments. The server performs path validation to prevent directory-traversal attacks and resolves symlinks with security checks. Use the list_allowed_directories tool to see which directories are accessible. When using Docker, mount a host volume only if you intend changes inside the container to reflect on the host filesystem.
MCP Filesystem Server + 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 MCP Filesystem Server config there under the "mcpServers" key and restart the client.
Is MCP Filesystem Server safe to use with Claude Desktop?
Access is restricted to the directories passed as command arguments. The server performs path validation to prevent directory-traversal attacks and resolves symlinks with security checks. Use the list_allowed_directories tool to see which directories are accessible. When using Docker, mount a host volume only if you intend changes inside the container to reflect on the host filesystem.
How is filesystem access restricted?
The server only accesses the directories you pass as command arguments at startup. It validates paths to prevent directory-traversal attacks and resolves symlinks with security checks. The list_allowed_directories tool returns the directories currently accessible.
What transport does it use?
It runs as a standalone stdio server, launched via the `mcp-filesystem-server` command (or `docker run`) with allowed directories as arguments.
Can I use it inside a Go program instead of as a standalone server?
Yes. Import github.com/mark3labs/mcp-filesystem-server/filesystemserver, create a server with NewFilesystemServer(allowedDirs), and call Serve().