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.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add filesystem-mcp -- npx -y @j0hanz/filesystem-mcp{
"mcpServers": {
"filesystem-mcp": {
"command": "npx",
"args": ["-y", "@j0hanz/filesystem-mcp"]
}
}
}MCP Servers overview
# Filesystem MCP Server
[](https://github.com/j0hanz/filesystem-mcp/blob/main/LICENSE) [](https://www.npmjs.com/package/@j0hanz/filesystem-mcp) [](https://github.com/j0hanz/filesystem-mcp/actions) [](https://github.com/j0hanz/filesystem-mcp/stargazers)
[](https://vscode.dev/redirect/mcp/install?name=filesystem&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-mcp%40latest%22%5D%7D) [](https://insiders.vscode.dev/redirect/mcp/install?name=filesystem&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-mcp%40latest%22%5D%7D&quality=insiders) [](https://vs-open.link/mcp-install?%7B%22filesystem-mcp%22%3A%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-mcp%40latest%22%5D%7D%7D) [](cursor://anysphere.cursor-deeplink/mcp/install?name=filesystem&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmlsZXN5c3RlbS1tY3BAbGF0ZXN0Il19)
## Overview
Filesystem-MCP is a [Model Context Protocol](https://modelcontextprotocol.io) server that lets AI assistants read and write files within explicitly allowed directories. Sensitive file patterns (`.env`, `*.pem`, `*id_rsa*`) are blocked by default. It exposes filesystem tools, resources, and prompts over stdio or Streamable HTTP transport.
| Aspect | Details |
| :----------- | :--------------------------------------------- |
| **Status** | Active (see npm badge for the current version) |
| **Language** | TypeScript (strict) |
| **Runtime** | Node.js >= 24 |
| **Package** | npm |
| **License** | MIT |
## Features
| Feature | Description |
| :--------------------- | :--------------------------------------------------------------------------------------------------------- |
| **Path guarding** | Every path is validated against allowed roots; `.env`, `*.pem`, `*id_rsa*` and similar patterns are denied |
| **Filesystem tools** | Navigate, inspect, read, and write across all major file operations |
| **Batch operations** | Most tools accept `path`, `paths[]`, or `files[]` for parallel execution |
| **Dual transport** | stdio by default; `--port` enables Streamable HTTP |
| **File subscriptions** | Resource subscriptions push change notifications when watched files update |
| **Regex safety** | RE2 in all search tools: linear-time matching, so no pattern can ReDoS the server |
## Built with
[](https://nodejs.org) [](https://www.typescriptlang.org) [](https://www.docker.com)
| Layer | Technology |
| :-------- | :--------------------------------------------------------------------- |
| Protocol | MCP SDK v2 (`@modelcontextprotocol/server`) |
| Runtime | Node.js >= 24 · TypeScript 6 · ESM |
| Transport | stdio (default) · Streamable HTTP (`--port`) |
| Regex | RE2 (`re2-wasm`) — linear time, no lookahead/lookbehind/backreferences |
| Container | Docker alpine · multi-stage build · non-root user |
## Table of Contents
- [Quick start](#quick-start)
- [Usage](#usage)
- [Project structure](#project-structure)
- [Configuration](#configuration)
- [Scripts](#scripts)
- [Security](#security)
- [Contributing](#contributing)
- [License](#license)
## Quick start
> [!NOTE]
> Requires Node.js ≥ 24.
### Prerequisites
| Requirement | Version / Notes |
| :---------- | :--------------------------- |
| Node.js | ≥ 24 |
| npm | Bundled with Node.js |
| Docker | Optional — for container use |
### Install via npx
```bash
npx -y @j0hanz/filesystem-mcp /path/to/allowed/dir
```
Or install globally:
```bash
npm install -g @j0hanz/filesystem-mcp
filesystem-mcp /path/to/allowed/dir
```
### Install via Docker
```bash
docker run -i --rm \
-v /path/to/project:/workspace:ro \
ghcr.io/j0hanz/filesystem-mcp:latest \
--read-only /workspace
```
### Configure in VS Code
Add to `.vscode/mcp.json`:
```json
{
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@j0hanz/filesystem-mcp@latest", "/path/to/project"]
}
}
}
```
Or install via CLI:
```sh
code --add-mcp '{"name":"filesystem","command":"npx","args":["-y","@j0hanz/filesystem-mcp@latest","/path/to/project"]}'
```
### Configure in Visual Studio
Add to `.vs\mcp.json` in your solution directory, or `%USERPROFILE%\.mcp.json` for a global configuration:
```json
{
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@j0hanz/filesystem-mcp@latest", "/path/to/project"]
}
}
}
```
### Configure in Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@j0hanz/filesystem-mcp@latest", "/path/to/project"]
}
}
}
```
### Install in Cursor
Add to `.cursor/mcp.json` in your project root (project-scoped), or `~/.cursor/mcp.json` for a global configuration:
```json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@j0hanz/filesystem-mcp@latest", "/path/to/project"]
}
}
}
```
### Docker configuration
VS Code (`.vscode/mcp.json`) and Visual Studio (`.vs\mcp.json`):
```json
{
"servers": {
"filesystem": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/project:/workspace",
"ghcr.io/j0hanz/filesystem-mcp:latest",
"/workspace"
]
}
}
}
```
Claude Desktop (`claude_desktop_config.json`) and Cursor (`mcp.json`):
```json
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/project:/workspace",
"ghcr.io/j0hanz/filesystem-mcp:latest",
"/workspace"
]
}
}
}
```
> [!NOTE]
> For least privilege, use both controls: `:ro` makes the container mount
> read-only at the operating-system boundary, while the server's `--read-only`
> flag removes mutating tools (`create`, `edit`, `move`, `delete`, `patch`,
> `replace_text`) from `tools/list`.
## Usage
### Tools
All tools are scoped to the configured roots. Call `list_roots` first to discover what is allowed.
#### Navigate
| Tool | Description |
| :----------- | :------------------------------------------------------------------------------------- |
| `list_roots` | List allowed workspace roots. Call this first — all other tools scope to these. |
| `list` | List directory contents. Returns entries (dirs-first, alphabetical) and an ASCII tree. |
| `find_files` | Find files by glob pattern (e.g. `**/*.ts`). Returns matching files with metadata. |
#### Inspect
| Tool | Description |
| :------------ | :---------------------------------------------------------------------------------------- |
| `stat` | Get file/directory metadata: size, modified time, permissions, MIME type, token estimate. |
| `search_text` | Search file contents for text (grep-like). Returns matching lines with context. |
| `diff` | Compare two files and return a unified diff with added/removed line counts. |
#### Read
| Tool | Description |
| :----- | :----------------------------------------------------------------------------------- |
| `read` | Read a text file. Supports head/tail and line ranges. Accepts `paths[]` for batches. |
#### Write
| Tool | Description |
| :------------- | :------------------------------------------------------------------------------------------------ |
| `create` | Create one or more files, overwriting existing content and creating parent directories as needed. |
| `edit` | Apply sequential literal string What people ask about filesystem-mcp
What is j0hanz/filesystem-mcp?
+
j0hanz/filesystem-mcp is mcp servers for the Claude AI ecosystem. 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. It has 13 GitHub stars and its last recorded update is dated 2026-08-27.
How do I install filesystem-mcp?
+
You can install filesystem-mcp by cloning the repository (https://github.com/j0hanz/filesystem-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is j0hanz/filesystem-mcp safe to use?
+
Our security agent has analyzed j0hanz/filesystem-mcp and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains j0hanz/filesystem-mcp?
+
j0hanz/filesystem-mcp is maintained by j0hanz. The last recorded GitHub activity is dated 2026-08-27, with 2 open issues.
Are there alternatives to filesystem-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy filesystem-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/j0hanz-filesystem-mcp)<a href="https://claudewave.com/repo/j0hanz-filesystem-mcp"><img src="https://claudewave.com/api/badge/j0hanz-filesystem-mcp" alt="Featured on ClaudeWave: j0hanz/filesystem-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!