Filesystem

Official
modelcontextprotocol

Scoped file access with configurable allow-lists.

Official reference server for local file access. Read, write, and list files only inside directories you pre-approve, so an agent cannot wander into $HOME.

63k118k94/100

What it does

  • Reads and writes files inside allow-listed roots, rejects anything else with a clear error
  • Lists directory contents with pagination and depth limits to avoid blowing the context window
  • Globs by pattern ("*.md", "**/*.test.ts") with configurable max matches
  • Moves and deletes files, with the same allow-list rules applied to both source and destination
  • Inspects metadata via stat without exposing full parent paths
  • Rejects symlinks whose real path escapes a configured root

Best for

Local coding agentsDocumentation generatorsScripted refactorsSandboxed file reads
About Filesystem

Filesystem is an official MCP server categorised under file system, official, filesystem, node. Official reference server for local file access. Read, write, and list files only inside directories you pre-approve, so an agent cannot wander into $HOME.

How to install

Pick your MCP client from the Install panel on this page to get a one-click install link (Cursor, VS Code) or a ready-to-paste configuration for Claude Desktop, Claude Code, Gemini, Codex, Windsurf, and other MCP-compatible clients. No local setup required for remote servers.

License

Filesystem is released under the MIT license. This is a permissive open-source license, so you can freely use, modify, and distribute it — subject to its terms.

No reviews yet

Be the first to leave a review after using this server in production.

README

The Filesystem server is one of the seven actively maintained reference servers in the modelcontextprotocol/servers monorepo. It exposes the surface most agents actually need — read, write, move, and search — while refusing any path that resolves outside the roots an operator pre-approved at launch. Distributed as the @modelcontextprotocol/server-filesystem package on npm. What it does: - Reads and writes files inside allow-listed roots, rejects anything else with a clear error - Lists directory contents with pagination and depth limits to avoid blowing the context window - Globs by pattern ("*.md", "**/*.test.ts") with configurable max matches - Moves and deletes files, with the same allow-list rules applied to both source and destination - Inspects metadata via stat without exposing full parent paths - Rejects symlinks whose real path escapes a configured root Example: Launch with "npx -y @modelcontextprotocol/server-filesystem /workspace /tmp/agent-scratch" and the agent can now read repository files and write scratch output — but a prompt asking for ~/.ssh or C:\Windows returns a path-outside-allow-list error, not contents. Setup: Pass one or more absolute paths as positional arguments. Each path becomes an allow-listed root. No environment variables, no config file, no network dependency. Transport: stdio only. Meant to run locally inside a single client process. Notes: The server normalises Windows paths and handles UNC shares correctly, but glob matching remains case-sensitive on every platform so repositories that rely on case-insensitive tooling should configure their patterns accordingly. Typical uses: local coding agents, documentation generators, and scripted refactors where a full shell tool is too broad a primitive.

Alternatives

Memory
ai / ml
free

Knowledge-graph memory for cross-session context.

officialmemoryknowledge graph
85/10063ktypescript
SQLite
database
free

Archived Python reference server for local SQLite.

officialsqlitesql
68/10063kpython
GitHub
version control
Verified

GitHub's own MCP server for issues, PRs, and code search.

officialgithubgit
92/10023kgo
Time
productivity
free

Time-zone math and conversions.

officialtimetimezone
91/10063kpython