Filesystem MCP server
MIT
Secure file operations with configurable access controls — read, write, search and move files in directories you explicitly allow.
At a glance
Filesystem is the official MCP reference server in the Dev Tools & Git category. It runs locally over stdio via `npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/directory`, and declares no required credentials. It exposes 13 tools, including read_text_file, read_media_file and read_multiple_files. It scores A (93/100) on the MCP Skills Hub health score as of Oct 27, 2026.
One-click install
Opens your editor and pre-fills the config. Your editor will ask before adding it.
How to install Filesystem in your AI client
Setup for Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline and VS Code — copy-paste ready.
How to install Filesystem in Claude CodeAnthropic's agentic CLI
Add the server
bashclaude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/directoryVerify it's connected
bashclaude mcp listSharing it with your team?
Add `--scope project` to write it to .mcp.json in the repository root, which you can commit (with the secrets left as environment variables).
Use it in a session
Ask Claude to use the tools this server exposes (e.g. read_text_file, read_media_file, read_multiple_files). It discovers them automatically.
How to install Filesystem in Claude DesktopDesktop app (MCP config)
Open your MCP config
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json
Add this server
json{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory" ] } } }Restart Claude Desktop
The tools appear under the 🔌 menu once the app reloads.
How to install Filesystem in CursorAI-first code editor
Create / edit .cursor/mcp.json in your project
json{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory" ] } } }Enable it
Cursor Settings → MCP → toggle the server on. Tools become available to the Composer/Agent.
How to install Filesystem in Codex CLIOpenAI coding agent
Add to ~/.codex/config.toml
toml[mcp_servers.filesystem] command = "npx" args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory"]Run Codex
Codex loads MCP servers from config.toml on startup and exposes their tools to the agent.
How to install Filesystem in WindsurfCodeium's agentic IDE
Edit ~/.codeium/windsurf/mcp_config.json
json{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory" ] } } }Reload
Windsurf → Cascade → refresh MCP servers. Cascade can now call the tools.
How to install Filesystem in ClineVS Code autonomous agent
Open Cline → MCP Servers → Configure
Adds to cline_mcp_settings.json.
Add the server
json{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory" ] } } }
How to install Filesystem in VS CodeCopilot / MCP support
Create .vscode/mcp.json
json{ "servers": { "filesystem": { "type": "stdio", "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory" ] } } }Start it
VS Code shows a ▶ Start action above the server entry. Agent mode (Copilot Chat) can then use the tools.
What tools does Filesystem expose? (13)
Taken from the project's README — the server itself was not queried, so check its docs for the exact schemas.
- read_text_fileRead complete contents of a file as text
- read_media_fileRead a file and return it as a base64-encoded content block with its MIME type
- read_multiple_filesRead multiple files simultaneously
- write_fileCreate new file or overwrite existing (exercise caution with this)
- edit_fileMake selective edits using advanced pattern matching and formatting
- create_directoryCreate new directory or ensure it exists
- list_directoryList directory contents with [FILE] or [DIR] prefixes
- list_directory_with_sizesList directory contents with [FILE] or [DIR] prefixes, including file sizes
- move_fileMove or rename files and directories
- search_filesRecursively search for files/directories that match or do not match patterns
- directory_treeGet recursive JSON tree structure of directory contents
- get_file_infoGet detailed file/directory metadata
- list_allowed_directoriesList all directories the server is allowed to access
What the code can do
Read from the published package source — never executed. Parsed 8 of 8 source files.
This server can read and write files and read system information.
How it was published
- Published by a verified CI identity (github trusted publishing) rather than a personal token.
- Has a provenance attestation tying this artifact to the commit it was built from.
- 6 npm maintainers · last published by GitHub Actions.
Maintainer of this package and think something here is wrong? Tell us and we'll correct it.
Before you install
Signals gathered from the source repo and package registry — not a safety verdict.
What it can reach
- Runs code on your machine — Executes as a local process with your user's permissions, including filesystem access.
- Downloads at launch — The package is fetched from its registry each run unless you pin a version.
- Last commit today — Actively maintained.
- 92k GitHub stars — Community adoption signal.
- 737k weekly downloads — Regularly installed by other developers.
Client compatibility
Health score
A · 93Maintenance, adoption, transparency and packaging — not a safety audit. How this is calculated
- Maintenance30%100%
Last commit 0 days ago.
- Adoption20%100%
91630 stars, 737150 weekly downloads.
- Transparency20%100%
4/4: ✓ public source repo, ✓ declared license, ✓ documentation, ✓ discoverable tool list.
- Provenance15%100%
Official reference implementation, maintained by the MCP steering group.
- Packaging15%50%
No pinned version — installs resolve to whatever is latest at launch.
Documentation
Full READMEFilesystem MCP Server
Node.js server implementing Model Context Protocol (MCP) for filesystem operations.
Published on npm as `@modelcontextprotocol/server-filesystem`.
Features
- Read/write files
- Create/list/delete directories
- Move files/directories
- Search files
- Get file metadata
- Directory access control from command-line arguments, with Roots as a deprecated, 2025-era convenience
- Serves both protocol eras on stdio: 2026-07-28 clients (
server/discover, no handshake) and 2025-era clients (initialize)
Directory Access Control
The server may touch only its allowed directories. Pass them on the command line. A 2025-era client that supports Roots can also replace them at runtime, but Roots is deprecated as of protocol version 2026-07-28 and a 2026-07-28 connection cannot use it.
Method 1: Command-line Arguments (Recommended)
Specify Allowed directories when starting the server:
mcp-server-filesystem /path/to/dir1 /path/to/dir2This is the only method that works on every protocol version, so it is the one to use.
Method 2: MCP Roots (Deprecated, 2025-era clients only)
A client that connects with a 2025-era protocol version (the initialize handshake) and supports Roots can dynamically update the Allowed directories.
Roots notified by Client to Server, completely replace any server-side Allowed directories when provided.
Excerpt — the full document is on GitHub.
Alternatives to Filesystem
- ai-contextA · 85Local-first MCP server: version-correct library docs, code map, and offline drift for your repo.
- Server4AgentB · 68Servers your AI assistant builds on. It writes the code, runs it and ships each app to a live URL.
- mcp-filesystemB · 61Advanced filesystem operations with strict security boundaries for AI agents
- Paparats MCP: Self-Hosted Semantic Code SearchA · 84Self-hosted semantic code search MCP for Claude Code & Cursor. Multi-repo, AST-aware, stays local.
Maintain Filesystem? Add a badge to your README
Shows its health grade, and links readers to install steps for every client.
[](https://mcp-skills-hub.vercel.app/mcps/official-filesystem)Catalog data refreshed . Something wrong? Report it.