Add it to Claude Code
claude mcp add filesystem-mcp-e88b -- npx -y @j0hanz/filesystem-mcp@latestMake your agent remember this setup
filesystem-mcp-e88b's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- 18 filesystem tools including read, write, search, diff, patch, and hash
- Security-first design with path validation and sensitive file denylisting
- Dual transport support via stdio and Streamable HTTP with SSE
- Structured output schemas for reliable LLM parsing
- Self-documenting resources and built-in prompts for AI assistance
Tools 1
read, write, search, diff, patch, hashA suite of 18 filesystem tools for managing files with structured output schemas.Try it
Original README from j0hanz/filesystem-mcp
Filesystem MCP Server
A local filesystem MCP server that lets LLMs and AI agents read, write, search, diff, patch, and manage files safely and efficiently. Built for reliable, structured, and controlled filesystem interaction.
Overview
A secure, production-ready Model Context Protocol server that gives AI assistants controlled access to the local filesystem. All operations are sandboxed to explicitly allowed directories with path traversal prevention, sensitive file blocking, and optional Bearer token authentication.
Supports stdio (default) and Streamable HTTP transport with SSE support. HTTP sessions are implemented with isolated per-session server state.
Key Features
- 18 filesystem tools — read, write, search, diff, patch, hash, and bulk operations with structured output schemas
- Security-first — path validation, symlink escape prevention, sensitive file denylist, localhost-only CORS, optional API key auth
- Dual transport — stdio for local use, Streamable HTTP with SSE for networked/multi-session deployments
- Structured output — all tools return typed
outputSchema/structuredContentfor reliable LLM parsing - Self-documenting — 6 built-in resources (
internal://instructions,internal://tool-catalog, etc.) and 4 built-in prompts (get-help,compare-files,analyze-path,get-tool-help)
Requirements
- Node.js >= 24
Quick Start
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@j0hanz/filesystem-mcp@latest"]
}
}
}
Docker
docker run -i --rm -v /path/to/project:/workspace:ro ghcr.io/j0hanz/filesystem-mcp /workspace
Or using Docker Compose:
services:
filesystem-mcp:
build: .
stdin_open: true
volumes:
- ./:/projects/workspace:ro
command: ['/projects/workspace']
CLI Usage
filesystem-mcp [options] [allowedDirs...]
Arguments:
allowedDirs Directories the server can access
Options:
--allow-cwd Allow the current working directory as an additional root
--port <number> Enable HTTP transport on the given port
-v, --version Display server version
-h, --help Display help
Examples:
$ npx @j0hanz/filesystem-mcp@latest /path/to/project
$ npx @j0hanz/filesystem-mcp@latest --allow-cwd
$ npx @j0hanz/filesystem-mcp@latest --port 3000 /path/to/project
Client Configuration
<details> <summary><b>Install in VS Code</b></summary>Add to .vscode/mcp.json:
{
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@j0han