Filesystem logo

Filesystem

Provides guarded file and directory access over MCP, including reading, editing, searching, moving, and metadata inspection.

  • Ownership verifiedThe owner proved control of this listing via a GitHub README, site badge, or DNS TXT record.
  • Runs, needs keysIt installed and started in our sandbox, then stopped for configuration such as an API key.
  • Health: ActiveRecent health check succeeded.Last checked 10/28/2026, 3:15:30 AM
  • File Systems
  • 91kstars
  • No ratings User RatingsBe the first to rate and review this MCP server!
  • UpdatedOct 27, 2026

Install Filesystem

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Filesystem MCP server exposes local file and directory operations through MCP over stdio. It restricts every operation to directories supplied at startup, with deprecated Roots-based updates available for compatible 2025-era clients. Tools cover text and media reads, writes, selective edits, directory management, search, tree inspection, movement, and metadata. Use it when an agent needs controlled access to files on the machine running the server.

Use cases

  • Read source files within approved project directories
  • Preview and apply targeted code edits
  • Search repositories with include and exclude patterns
  • Inspect directory sizes and recursive structure
  • Move or organize files under a controlled path

Key features

  • Allowed-directory access control
  • Text, media, and multi-file reads
  • Pattern-based file editing with dry runs
  • Directory creation, listing, and tree inspection
  • Recursive search and file metadata
  • File and directory moves

Tools17

What Filesystem lets your agent do. Expand a tool for its parameters.

Self-reported~28 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

32/32 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · @modelcontextprotocol/server-filesystem (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars91kStargazers on the source repository.
npm downloads1.3MPackage downloads in the last 30 days.
Last commitTodayMost recent push to the default branch.
Tools exposed17Callable tools this server registers over MCP.
Directory activity11 viewsConfig copies, upvotes, and views on AllMCPs.

How Filesystem works

What Filesystem does

Filesystem connects an MCP client to local files and directories through a Node.js process. It supports reading text, returning binary or media content, writing files, applying targeted edits, creating and listing directories, moving files, searching with glob-style patterns, inspecting directory trees, and retrieving file metadata.

Every operation is checked against an allowed-directory list. This boundary applies to reads as well as changes, so the server cannot operate outside the directories made available to it. At least one allowed directory is required for useful operation.

How it works

The recommended access-control method passes directories as command-line arguments when the server starts:

bash
mcp-server-filesystem /path/to/dir1 /path/to/dir2

The server communicates over stdio and supports both the 2026-07-28 protocol flow and 2025-era clients that use the initialize handshake. For the newer flow, the command-line directories are the complete allow-list. A server started without directories therefore rejects tool calls because no paths are permitted.

A 2025-era client with Roots support can provide or replace the allowed directories at runtime. The server waits for initial Roots data and for subsequent updates before checking affected tool calls, preventing operations from running against a directory that has just been withdrawn. Roots are deprecated for the 2026-07-28 protocol. Clients without Roots support continue using the command-line directories; if neither command-line directories nor usable Roots are available, initialization fails.

Setup and configuration

The package is published as @modelcontextprotocol/server-filesystem. Start its executable with one or more directories that the agent may access. Supplying multiple paths creates a shared allow-list for the connection. The list_allowed_directories tool reports the directories currently in force.

Command-line paths are the portable configuration because they work across protocol versions. With a 2025-era Roots-capable client, client-provided Roots replace all server-side command-line directories once they are loaded. An update containing no valid Roots revokes access until a valid root is exposed again, provided Roots had previously been applied.

Tools and capabilities

  • Read complete UTF-8 text files, or request only the first or last lines.
  • Read multiple files in one operation; failed individual reads do not stop the whole request.
  • Return images and audio as typed base64 content, with other binary data represented as embedded resources.
  • Create or overwrite files and create directories, including missing parent directories.
  • Apply multiple line- or multi-line edits with whitespace normalization, indentation preservation, line-ending preservation, and Git-style diffs.
  • Preview edits with dryRun before changing a file.
  • List directory contents, optionally including sizes, totals, and sorting by name or size.
  • Move or rename files and directories, with an error when the destination already exists.
  • Search recursively with include and exclude glob patterns, build a JSON directory tree, and retrieve size, timestamps, and file-type metadata.

Limitations and notes

Text reads always interpret content as UTF-8 regardless of the file extension. read_text_file accepts either head or tail, but not both. File overwrites happen in place, preserving the inode, creation time, hard links, and permissions; they are not crash-atomic, so an interrupted write can leave partial content. Read-only files are refused rather than replaced. edit_file is designed for selective changes, and using its dry-run mode first is recommended.

Operations remain confined to the active allowed directories. A connection with an empty allow-list cannot perform filesystem work.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Filesystem

Filesystem is an MCP server that connects AI clients to approved local directories. Its main tools read text and media, write files, apply selective edits, create and list directories, search paths, move files, inspect directory trees, and retrieve metadata while enforcing the configured access boundaries.

Install the published `@modelcontextprotocol/server-filesystem` npm package and start its executable with one or more allowed directory paths. For example, run `mcp-server-filesystem /path/to/dir1 /path/to/dir2`; command-line paths work across the supported protocol versions.

Pass the permitted directories as command-line arguments when starting the server. All filesystem operations are checked against that allow-list. A 2025-era client with Roots support can later replace the list, but command-line configuration is the recommended method and is required for the 2026-07-28 flow.

Yes. Set `dryRun` to true in `edit_file` to receive match details and a Git-style diff without changing the file. The tool supports multiple edits, line and multi-line matching, indentation preservation, whitespace normalization, and preservation of LF or CRLF line endings.

Yes. `read_media_file` streams a file and returns base64 content with its MIME type. Images and audio use typed image or audio content blocks, while other binary files are returned as embedded MCP resources. Text files can instead be read as UTF-8 with `read_text_file`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFilesystem AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/filesystem?style=directory)](https://allmcps.com/mcp/filesystem)
HTML Embed
<a href="https://allmcps.com/mcp/filesystem"><img src="https://allmcps.com/api/badge/filesystem?style=directory" alt="Filesystem on AllMCPs" /></a>