
Filesystem MCP
A production-ready filesystem server that gives Claude controlled access to local files through 18 specialized tools covering reads, writes, searches, diffs, patches, and bulk operations. Ships with path traversal prevention, symlink escape protection, and a sensitive file denylist. Runs over stdio by default or exposes a Node Streamable HTTP transport for networked sessions. All tools return structured output schemas for reliable parsing. Includes six self-documenting resources and four built-in prompts for common workflows like file comparison and path analysis. Supports optional Bearer token auth and sandboxes all operations to explicitly allowed directories. Ideal when you need granular, security-conscious file access beyond basic read/write.
- GitHub stars
- 32
- tools
- 14
- transport
- STDIO
- env vars
- 2
- last updated
- Nov 11, 2026
Tools
14 toolsPublic tool metadata for what this MCP can expose to an agent.
list_rootsShows the folders the server may use.
Shows the folders the server may use.
No parameter schema in public metadata yet.
listLists a folder as a tree, like `ls` or `tree`.
Lists a folder as a tree, like `ls` or `tree`.
No parameter schema in public metadata yet.
find_filesFinds files by name or glob, such as `**/*.test.ts`.
Finds files by name or glob, such as `**/*.test.ts`.
No parameter schema in public metadata yet.
search_textSearches inside files for text or a regex, like `grep`, with optional context lines.
Searches inside files for text or a regex, like `grep`, with optional context lines.
No parameter schema in public metadata yet.
statGets size, dates, type, permissions, and a token estimate without reading the file.
Gets size, dates, type, permissions, and a token estimate without reading the file.
No parameter schema in public metadata yet.
readReads text files whole or by lines, head, or tail. Images and audio come back as media; others with `binary`.
Reads text files whole or by lines, head, or tail. Images and audio come back as media; others with `binary`.
No parameter schema in public metadata yet.
diffCompares two files and returns a unified diff.
Compares two files and returns a unified diff.
No parameter schema in public metadata yet.
createWrites new files, appends, or makes empty folders. Asks before replacing a file; `overwrite: true` replaces it without asking.
Writes new files, appends, or makes empty folders. Asks before replacing a file; `overwrite: true` replaces it without asking.
No parameter schema in public metadata yet.
editReplaces exact text in files. All edits to a file apply, or none do. `dryRun` shows the diff first.
Replaces exact text in files. All edits to a file apply, or none do. `dryRun` shows the diff first.
No parameter schema in public metadata yet.
patchApplies a unified diff to a file. All hunks apply, or none do. `dryRun` shows the diff first.
Applies a unified diff to a file. All hunks apply, or none do. `dryRun` shows the diff first.
No parameter schema in public metadata yet.
replace_textFinds and replaces text or a regex across many files. `dryRun` shows what would change.
Finds and replaces text or a regex across many files. `dryRun` shows what would change.
No parameter schema in public metadata yet.
moveMoves, renames, or copies files and folders. Asks before overwriting; a copy with `overwrite: true` replaces without asking.
Moves, renames, or copies files and folders. Asks before overwriting; a copy with `overwrite: true` replaces without asking.
No parameter schema in public metadata yet.
deleteDeletes files and folders. Asks before deleting a non-empty folder.
Deletes files and folders. Asks before deleting a non-empty folder.
No parameter schema in public metadata yet.
undoReverts recent changes by undo id or the last N calls, for 30 minutes while the server runs. Skips files changed since.
Reverts recent changes by undo id or the last N calls, for 30 minutes while the server runs. Skips files changed since.
No parameter schema in public metadata yet.
Sponsors
Configuration
FS_ALLOWED_DIRSAllowed directories; ':'-separated on Unix, ';'-separated on Windows. Alternative to positional arguments.
FS_READ_ONLY_DIRSRead-only directories; ':'-separated on Unix, ';'-separated on Windows. Writes, moves, and deletes under them are refused.
Readme
Filesystem MCP
Let your AI assistant work with your files, safely.
Read, search, edit, and patch files in the folders you choose.
Secret files stay hidden, and risky changes wait for your OK.
Details
- Repository
- github.com/j0hanz/filesystem-mcp
- Website
- github.com/j0hanz/filesystem-mcp
- Category
- Developer Tools
- Package
@j0hanz/filesystem-mcp- Transport
- STDIO
- Registry
- MCP registry, active