CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
j0hanz avatar

Filesystem MCP

j0hanz/filesystem-mcp
8STDIOregistry active
Summary

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.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →

Filesystem MCP Server

License npm version Build GitHub stars

Install in VS Code Install in VS Code Insiders Install in Visual Studio Install in Cursor

Overview

Filesystem-MCP is a Model Context Protocol 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.

AspectDetails
StatusActive (see npm badge for the current version)
LanguageTypeScript (strict)
RuntimeNode.js >= 24
Packagenpm
LicenseMIT

Features

FeatureDescription
Path guardingEvery path is validated against allowed roots; .env, *.pem, *id_rsa* and similar patterns are denied
Filesystem toolsNavigate, inspect, read, and write across all major file operations
Batch operationsMost tools accept path, paths[], or files[] for parallel execution
Dual transportstdio by default; --port enables Streamable HTTP
File subscriptionsResource subscriptions push change notifications when watched files update
Regex safetyRE2 in all search tools: linear-time matching, so no pattern can ReDoS the server

Built with

Node.js TypeScript Docker

LayerTechnology
ProtocolMCP SDK v2 (@modelcontextprotocol/server)
RuntimeNode.js >= 24 · TypeScript 6 · ESM
Transportstdio (default) · Streamable HTTP (--port)
RegexRE2 (re2-wasm) — linear time, no lookahead/lookbehind/backreferences
ContainerDocker alpine · multi-stage build · non-root user

Table of Contents

  • Quick start
  • Usage
  • Project structure
  • Configuration
  • Scripts
  • Security
  • Contributing
  • License

Quick start

[!NOTE] Requires Node.js ≥ 24.

Prerequisites

RequirementVersion / Notes
Node.js≥ 24
npmBundled with Node.js
DockerOptional — for container use

Install via npx

npx -y @j0hanz/filesystem-mcp /path/to/allowed/dir

Or install globally:

npm install -g @j0hanz/filesystem-mcp
filesystem-mcp /path/to/allowed/dir

Install via Docker

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:

{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@j0hanz/filesystem-mcp@latest", "/path/to/project"]
    }
  }
}

Or install via CLI:

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:

{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@j0hanz/filesystem-mcp@latest", "/path/to/project"]
    }
  }
}

Configure in Claude Desktop

Add to your claude_desktop_config.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:

{
  "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):

{
  "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):

{
  "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
ToolDescription
list_rootsList allowed workspace roots. Call this first — all other tools scope to these.
listList directory contents. Returns entries (dirs-first, alphabetical) and an ASCII tree.
find_filesFind files by glob pattern (e.g. **/*.ts). Returns matching files with metadata.
Inspect
ToolDescription
statGet file/directory metadata: size, modified time, permissions, MIME type, token estimate.
search_textSearch file contents for text (grep-like). Returns matching lines with context.
diffCompare two files and return a unified diff with added/removed line counts.
Read
ToolDescription
readRead a text file. Supports head/tail and line ranges. Accepts paths[] for batches.
Write
ToolDescription
createCreate one or more files, overwriting existing content and creating parent directories as needed.
editApply sequential literal string replacements to one or more files (max 5 per call).
moveMove, rename, or copy (copy: true) one or more files/directories to explicit destinations.
deletePermanently delete one or more files or directories. This action is irreversible.
replace_textBulk search-and-replace across files matching a glob pattern.
patchApply a single-file unified diff and write the result.

Resources

URIDescription
internal://instructionsServer navigation guide — tools overview, constraints, and error recovery.
filesystem-mcp://file/{+path}Read a workspace file. Subscribe to receive push notifications on change.
filesystem-mcp://result/{id}Ephemeral cached tool output. Expires after ~60 seconds, eviction, or server restart.

Prompts

PromptDescription
get-helpReturn usage instructions, optionally filtered to a specific section.

Project structure

filesystem-mcp/
├── __tests__/        Test suites
├── scripts/          Build and task utilities
├── src/
│   ├── core/         Path guarding, filesystem abstraction, concurrency, observability
│   ├── tools/        Tool definitions and registration
│   ├── index.ts      Process entrypoint and transport selection
│   ├── server.ts     Server factory and registrar composition
│   ├── transport/    stdio and Streamable HTTP transport setup
│   ├── prompts.ts    Prompt definitions and registration
│   └── resources.ts  Resource definitions and registration
└── Dockerfile        Multi-stage alpine build, non-root user

Runtime composition flows from src/index.ts to src/transport.ts, then to src/server.ts, the registrars, and finally src/core/. Each registrar owns the narrow dependency contract it consumes.

PathPurpose
src/core/path.tsPathGuard — validates every path against allowed roots
src/core/fs.tsGuardedFileSystem — guarded filesystem facade
src/tools/define.tsTool registration and execution framework
src/tools/batch.tsBatch helpers (runOverPaths, normalizeBatchItems)
src/server.tsBuilds shared dependencies and invokes the three registrars
src/transport.tsOwns stdio and Streamable HTTP setup around the server factory

Configuration

The server starts with allowed directories from explicit startup configuration:

  1. Positional directories passed to filesystem-mcp.
  2. Environment variable FS_ALLOWED_DIRS (separated by : on POSIX or ; on Windows).
  3. Current working directory when --allow-cwd is enabled.

Legacy MCP connections may additionally seed roots through the deprecated roots/list flow. Modern 2026-07-28 connections do not automatically send workspace roots. They can add access after startup by calling a tool with a concrete path and approving the elicitation-backed grant. list_roots reports the roots already configured or accepted; it cannot discover an unknown workspace by itself.

Recommended global recipes

VS Code / Cursor / Claude Code (primary recipe)

Configure the project directory explicitly:

Add to your global or project-scoped configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@j0hanz/filesystem-mcp@latest", "/path/to/project"]
    }
  }
}
Claude Desktop (fallback recipe via environment variable)

Claude Desktop and similar clients don't support the MCP Roots protocol. Use the FS_ALLOWED_DIRS environment variable to configure allowed folders.

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@j0hanz/filesystem-mcp@latest"],
      "env": {
        "FS_ALLOWED_DIRS": "/path/to/project1:/path/to/project2"
      }
    }
  }
}

(On Windows, separate directories with a semicolon ; instead of a colon :).

Advanced / per-project positional arguments

You can also restrict access to specific directories by passing positional arguments directly:

# Start with explicit positional paths
filesystem-mcp /path/to/project1 /path/to/project2

Configuration reference

CLI flags
FlagDefaultPurpose
[dirs...]—One or more allowed root directories (positional)
--allow-cwdfalseAlso allow the current working directory as a root
--walk-cwdfalseWalk up from CWD to find a project root; implies --allow-cwd
--allow-missing-rootsfalseStart even if configured allowed directories do not exist
--port <n>—Enable Streamable HTTP transport on the given port (env: FS_PORT)
--http-host <host>—HTTP server bind address (env: FS_HTTP_HOST)
--api-key <key>—Require this API key on HTTP requests (env: FS_API_KEY)
--read-onlyfalseDisable write tools: create, edit, delete, move, patch, replace_text
--safefalseAlias for --read-only
--deny <pattern>—Block paths matching this pattern; repeatable
--allow-sensitivefalseAllow access to sensitive system paths (env: FS_ALLOW_SENSITIVE)
--root-boundary <path>—Require all allowed roots to fall under this path (env: FS_ROOT_BOUNDARY)
--max-file-size <bytes>—Maximum file size for reads in bytes (env: FS_MAX_FILE_SIZE)
--log-level <level>infoRFC 5424 log level, debug through emergency (env: FS_LOG_LEVEL)
--print-configfalsePrint the active configuration and exit (use --json for machine-readable output)
--jsonfalseOutput --print-config as JSON
Environment variables

All boolean variables accept true or 1 to enable and false, 0, or unset to disable; any other value logs a warning and reads as disabled. Flags take precedence when both are set.

VariablePurpose
FS_ALLOWED_DIRSColon-separated (POSIX) or semicolon-separated (Windows) list of directories to allow.
FS_ROOT_BOUNDARYPath prefix all allowed roots must fall under (mirrors --root-boundary).
FS_ALLOW_CWD_WALKWalk up from CWD to find a project root (mirrors --walk-cwd).
FS_ALLOW_MISSING_ROOTSStart even if configured directories do not exist (mirrors --allow-missing-roots).
FS_ALLOW_SENSITIVEAllow access to sensitive system paths (mirrors --allow-sensitive).
FS_DENYLISTComma-separated list of paths or patterns to block (mirrors --deny).
FS_MAX_FILE_SIZEMaximum file size for reads in bytes (mirrors --max-file-size).
FS_LOG_LEVELRFC 5424 log level: debug, info, notice, warn/warning, error, critical, alert, or emergency (mirrors --log-level).
FS_PORTStart the Streamable HTTP transport on this port; unset = stdio (mirrors --port).
FS_HTTP_HOSTHTTP server bind address (mirrors --http-host).
FS_API_KEYAPI key required on HTTP requests (mirrors --api-key).
FS_TRUST_PROXYExpress trust proxy setting: hop count or expression. Unset = do not trust X-Forwarded-*.
FS_ALLOWED_HOSTSComma-separated Host header values to accept (HTTP transport).
FS_ALLOWED_ORIGINSComma-separated origin hostnames for CORS.
FS_ALLOW_UNRESTRICTED_HOSTSBind a wildcard host with no Host validation (accepts the risk).
FS_PUBLIC_URLResource identifier URL for RFC 9728 discovery.
FS_RATE_LIMIT_RPMPer-client-IP requests/minute (default 120 with API-key authentication, 6,000 for keyless loopback; range 1–100000).
FS_MAX_REQUEST_BYTESMax HTTP request body bytes (default 4194304, 1024–268435456).
FS_KEEPALIVE_TIMEOUT_MSHTTP keep-alive timeout in ms; set above any fronting proxy's idle timeout (default 5000, 1000–600000).
FS_MAX_WATCHERSMax concurrent file watchers (default 256, 1–4096).
FS_MAX_INLINE_MATCHESMax inline content matches per search (default 50, 1–10000).
FS_MAX_READ_MANY_BYTESMax total bytes across a batched read (default 524288, 10240–104857600).
FS_SEARCH_TIMEOUT_MSSearch timeout in ms (default 5000, 100–60000).
NO_COLORAny value disables ANSI color output.
FS_REQUEST_STATE_KEYHMAC key sealing input_required requestState across retry rounds. Optional for stdio and single-instance HTTP (random per boot if unset); mandatory and shared across every fleet instance (UTF-8, >=32 bytes).
Multi-instance HTTP deployments

Each instance delivers subscriptions/listen change events (resources/updated, tools/list_changed, etc.) on an in-process bus by default. Behind a load balancer with more than one instance, a listener on instance A will not see an event published on instance B. Explicit fleet mode therefore refuses to boot without a shared event bus.

To fan events out across instances, implement the SDK's ServerEventBus interface (two methods: publish/subscribe) over whatever pub/sub you already run, then pass it to filesystem-mcp's programmatic HTTP entry:

import type { ServerEvent, ServerEventBus } from '@modelcontextprotocol/server';

import { startHttpServer } from '@j0hanz/filesystem-mcp/transport';
import Redis from 'ioredis';

// any pub/sub client works the same way

class RedisServerEventBus implements ServerEventBus {
  private readonly listeners = new Set<(event: ServerEvent) => void>();
  private readonly pub = new Redis(process.env['REDIS_URL']);
  private readonly sub = new Redis(process.env['REDIS_URL']);

  constructor() {
    void this.sub.subscribe('fs-mcp-events');
    this.sub.on('message', (_channel, message) => {
      const event = JSON.parse(message) as ServerEvent;
      for (const listener of this.listeners) listener(event);
    });
  }

  publish(event: ServerEvent): void {
    void this.pub.publish('fs-mcp-events', JSON.stringify(event));
  }

  subscribe(listener: (event: ServerEvent) => void): () => void {
    this.listeners.add(listener);
    return () => this.listeners.delete(listener);
  }
}

const eventBus = new RedisServerEventBus();
const apiKey = process.env['FS_API_KEY'];
if (!apiKey) throw new Error('FS_API_KEY is required for a multi-instance HTTP deployment');

await startHttpServer(
  3000,
  { cliAllowedDirs: ['/workspace'] },
  { apiKey, eventBus, deploymentMode: 'fleet' },
);

This project ships no bus adapter and no pub/sub dependency. A single in-process instance (the common case) needs nothing extra and is the CLI's default. Load-balanced deployments must use the programmatic API with deploymentMode: 'fleet'.

Examples

# Allow current working directory
filesystem-mcp --allow-cwd

# HTTP transport on port 3000
filesystem-mcp --port 3000

Scripts

ModeCommandDescription
Full checknode scripts/tasks.mjsRun build, type check, lint, format, knip, and tests
Auto-fix + checknode scripts/tasks.mjs fixAuto-fix formatting/linting and run the full check
Static onlynode scripts/tasks.mjs --quickRun static analysis without tests
Tests onlynode scripts/tasks.mjs testRun tests; accepts native node --test options

Security

[!IMPORTANT] Report vulnerabilities privately via GitHub Security Advisories. Do not open public issues for security reports.

TopicDetail
Path traversalEvery path is resolved and validated against allowed roots before any operation
Sensitive files.env, *.pem, *id_rsa*, and similar patterns are denied by default
Regex safetyRE2 cannot backtrack, so a hostile pattern cannot hang the server (ReDoS)
ContainerRuns as non-root mcp user; bind mounts control what is exposed

Contributing

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feat/your-feature.
  3. Commit your changes with a clear message.
  4. Run node scripts/tasks.mjs to confirm tests, types, lint, formatting, and knip all pass.
  5. Open a pull request.

Contributors

License

Released under the MIT License. See LICENSE for details.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Categories
Developer Tools
Registryactive
Package@j0hanz/filesystem-mcp
TransportSTDIO
UpdatedApr 11, 2026
View on GitHub

More from j0hanz

  • Filesystem Context8
  • Cortex MCP — Multi-Level Reasoning Server1
  • Fetch URL MCP Server
  • Code Assistant
  • Code Lens
  • Code Review Analyst
  • Memory MCP Server
  • Superfetch

Related Developer Tools MCP Servers

View all →
mkpvishnu avatar
Terminal Mcp

mkpvishnu/terminal-mcp

MCP server for interactive terminal sessions — SSH, REPLs, database CLIs, TUI apps
7
paarths-collab avatar
GitHub PR Review Context

paarths-collab/github-pr-context-mcp

AI code review grounded in your repo history. Supports Test Gen and Security Audits.
7
ratamaha-git avatar
N8n Mcp

ratamaha-git/n8n-mcp

MCP server for n8n: generate, lint, explain failed executions, drive live n8n via REST.
7
snyk avatar
Snyk API & Web MCP Server

snyk/saw-mcp

MCP server for Snyk API & Web — DAST scanning, findings management, and vulnerability triage
7
saidsef avatar
Saidsef Mcp Github Pr Issue Analyser

ai.smithery/saidsef-mcp-github-pr-issue-analyser

A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
6
domdomegg avatar
Shell Exec

domdomegg/shell-exec-mcp

Execute bash commands with background job support.
5