
Filesystem MCP Server: Setup for Claude, Cursor and Other Apps
Lets Claude, Cursor and other assistants read, search, edit and move files in the folders you allow.
Filesystem is a reference server from the Model Context Protocol project. It lets your assistant list folders, read and search files, and create, edit and move them. It runs on your computer and needs no account or API key. You choose the folders when you set it up, and it can only work inside those. Because it can overwrite files, start with a folder you have backed up.
Good for
- Developers who want an assistant to read and edit a project folder
- Writers and researchers who keep notes and documents in plain files
- Anyone who wants to cap what an assistant can touch to a few folders
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install Filesystem (Reference) MCP
Claude Code
- 1
Copy this prompt.
Add the Filesystem (Reference) MCP server to Claude Code. Run this command: claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /Users/username/Desktop Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js 24 or later.
Read-only mode: Use the Docker setup and add ro to the end of a folder mount. The npx setup has no read-only switch.
Replace /Users/username/Desktop with the folder you want the assistant to use, and add more folders after it, one per path. The server can only touch the folders listed here. On Windows, run npx through cmd /c as the README shows. If you prefer Docker, the README mounts each folder under /projects and adds ro to make one read-only.
Built from the package data we hold. Not yet tested by us.
Tools
Reads a text file, or just its first or last lines
Returns the contents of one file as UTF-8 text. You can ask for only the first or last N lines of a large file.
Try: “Read the last 50 lines of logs/app.log.”
Files ·
read_text_fileReads several files in one go
Reads a list of files together. If one file cannot be read, the others still come back.
Try: “Read package.json, tsconfig.json and README.md and summarize how this project is set up.”
Files ·
read_multiple_filesFinds files and folders by name pattern
Searches a folder and everything inside it for names that match a pattern, and skips any patterns you exclude. It returns full paths and stops after 100,000 entries.
Try: “Find every file ending in .test.ts under src, ignoring node_modules.”
Files ·
search_filesLists what is in a folder
Shows the files and folders directly inside one folder, marked as file or directory.
Try: “What is in my Documents/taxes folder?”
Files ·
list_directoryLists a folder with file sizes, biggest first if you ask
Like a plain listing, but with each file's size and totals for files, folders and combined size. It can sort by name or by size.
Try: “Show me the biggest files in my Downloads folder.”
Files ·
list_directory_with_sizesMaps a whole folder tree at once
Returns every folder and file under a starting folder as a nested tree. You can exclude patterns, and it stops after 100,000 entries.
Try: “Show me the folder structure of this project, without node_modules.”
Files ·
directory_treeShows a file's size, dates, type and permissions
Returns size, created, modified and last-accessed times, type, permissions and how many hard links the file has.
Try: “When was report.docx last changed and how big is it?”
Files ·
get_file_infoReads an image or audio file so the assistant can look at it
Returns an image or audio file as content the assistant can view or hear. Any other file type comes back as an embedded binary resource.
Try: “Look at screenshots/error.png and tell me what the error says.”
Files ·
read_media_fileCreates a file or overwrites an existing one
Writes the given text to a path, replacing the file if it exists. An overwrite is not crash-safe, so a crash mid-write can leave a partly written file.
Try: “Create notes/meeting-2026-11-02.md with the summary we just wrote.”
Write ·
write_fileReplaces specific text inside a file and shows a diff
Applies a list of find-and-replace edits to a file, keeping its line endings and indentation. A preview mode shows the diff without changing the file.
Try: “In config.json, change the port from 3000 to 4000. Show me the preview first.”
Write ·
edit_fileCreates a folder, including missing parent folders
Makes a new folder and any parents it needs. It does nothing if the folder already exists.
Try: “Create a folder called archive/2026 in my Documents.”
Write ·
create_directoryMoves or renames files and folders
Moves or renames a file or folder, and fails if the destination already exists. Across drives it copies the file and then removes the original.
Try: “Rename draft.txt to final-report.txt.”
Write ·
move_fileUsed by the assistant behind the scenes
Shows which folders the server may use
Lists the folders you gave the server access to, so the assistant knows where it can work.
Try: “Which folders can you access?”
Files ·
list_allowed_directoriesOlder name for reading a text file
The deprecated version of the text-file reader. The server still registers it, and it reads a file the same way.
Try: “Read the contents of notes.txt.”
Files ·
read_file
Read from the source code
Permissions
medium risk · 4 things to watch
Medium risk
It can overwrite, edit and move any file inside the folders you allow, and the README warns that an overwrite can also change hard-linked copies outside them. Allow only folders you have backed up, and start with a small one.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can overwrite and edit your files
Writing a file replaces an existing one, and edits change files in place. Keep the allowed folders small and backed up, and ask for the preview before edits. github.com
Hard links can reach outside the allowed folders
Folder checks go by path. If a file inside an allowed folder is hard-linked elsewhere, editing it changes it everywhere, as with pnpm's node_modules. Check the link count in the file info. github.com
Docker can make a folder read-only
Mount a folder with the ro flag if you only want the assistant to read it. Mount each folder under /projects as the README shows. github.com
Big folders are cut off after 100,000 entries
Searching and tree listing visit at most 100,000 entries, so on very large folders results can be incomplete. Point it at a narrower folder. github.com
Security advisories
No published security advisories as of Nov 1, 2026.
Technical details
| Turning on read-only | In the Docker setup, mount a folder with the ro flag and the server treats it as read-only. The npx setup has no read-only switch. |
|---|---|
| Sign-in and keys | No credentials needed. |
| Scopes |
|
Questions
Does the Filesystem MCP server need an API key?
No. It runs on your computer with no account, sign-in or API key. You only pass the folders it may use.
Which folders can it access?
Only the ones you list when you set it up. Replace the example folder in the install box with your own, and add more folders by listing more paths.
Can it delete my files?
It has no delete tool. It can overwrite a file with new content, edit it in place, and move or rename it, so a mistake can still lose data. Keep a backup.
Can I make it read-only?
Yes, with Docker. Mount the folder with the ro flag as in the README. The npx setup has no read-only switch.
What does it need to run?
Node.js 24 or later for the npx setup, or Docker for the image. On Windows the README wraps the command with cmd /c.
How do I set it up in Claude Desktop?
Use the Claude Desktop tab in the install box above, replace the example folder with yours, then restart the app.
Why can't it see a file I know exists?
The file is probably outside the allowed folders. Ask the assistant which folders it can access, then add the folder to the setup.
Information
updated Nov 3, 2026
- Publisher
- Community
- Package
@modelcontextprotocol/server-filesystem- Registry
- npm
- Transport
- stdio
- Auth
- None
- License
- MIT
- Last commit
- Oct 29, 2026
- Listed in
- Docker MCP Catalog
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 2Hide
- Filesystem MCP Server README · github.com
- Filesystem server source · github.com