j0hanz avatar

Filesystem MCP

j0hanz/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 tools

Public 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_DIRS

Allowed directories; ':'-separated on Unix, ';'-separated on Windows. Alternative to positional arguments.

FS_READ_ONLY_DIRS

Read-only directories; ':'-separated on Unix, ';'-separated on Windows. Writes, moves, and deletes under them are refused.

Readme

Filesystem MCP logo

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.


View the full README on GitHub

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

More from j0hanz

Related Developer Tools MCP servers

View all
1nirholas avatarGitHub to MCP Converternirholas/github-to-mcpConvert any GitHub repo to MCP server - automatic tool generation API wrap28stars
2amol21p avatarInteractive Terminalamol21p/mcp-interactive-terminalMCP server for real interactive terminal sessions — REPLs, SSH, databases, Docker15stars
3hint-services avatarHint Services Obsidian Github Mcphint-services/obsidian-github-mcpConnect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…9stars
4dubuqingfeng avatarGitlab Mcp Serverdubuqingfeng/gitlab-mcp-serverGitLab MCP (Model Context Protocol) server for AI agents9stars
5wei avatarMymlh Mcp Serverwei/mymlh-mcp-serverOAuth-enabled MyMLH MCP server for accessing MyMLH data.9stars
6structured-world avatarAdvanced GitLab MCP serverstructured-world/gitlab-mcp66 tools, 242 typed actions, 27 registry groups8stars