Filesystem MCP Server
@modelcontextprotocolOfficial MCP reference server for reading, writing, editing, moving and searching files inside directories you allow.
Local-only file server confined to the directories you allow, with symlink checks and no network code; it can overwrite and move files inside them.
Install Filesystem MCP Server in Google Antigravity
Antigravity reads MCP servers from ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (one project) (official docs).
Install the "Filesystem MCP Server" MCP server for Google Antigravity. Follow the steps at https://www.antigravityskills.org/install/filesystem-mcp-server.md (source: https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem). Before running anything, show me what you will download and whether it includes scripts, and wait for my OK. Ask me for any keys or paths it needs. When done, check that it is listed under Installed MCP Servers.
The agent reads the install file, shows you what it will download and waits for your OK.
Option 2: install it yourself
- 1. Make sure Node.js is installed
node --version
The server runs through npx, which comes with Node.js. Docker also works (see the README).
- 2. Open the Antigravity MCP config
Global: ~/.gemini/config/mcp_config.json. This project only: .agents/mcp_config.json. In Antigravity 2.0 you can also use Settings > Customizations > Add MCP.
- 3. Add the server under mcpServers
{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/project" ] } } }Same command and args the README documents for Claude Desktop, with your own folder in place of /path/to/your/project. List only the folders the agent really needs; add more paths as extra args.
- 4. Check that it loaded
Open Settings > Customizations > Installed MCP Servers; filesystem should be listed and switched on. Then ask the agent to call list_allowed_directories.
MCP servers are not skills: they do not go in .agents/skills/. The Filesystem server's README does not mention Antigravity; this config uses its documented stdio command in Antigravity's mcpServers format.
Using Claude Code, Cursor or Codex? See other assistants below.
What is Filesystem MCP Server?
How to use Filesystem MCP Server?
Key features of Filesystem MCP Server
- ✓14 tools: read_file (deprecated), read_text_file, read_media_file, read_multiple_files, write_file, edit_file, create_directory, list_directory, list_directory_with_sizes, directory_tree, move_file, search_files, get_file_info, list_allowed_directories (we counted in server.ts)
- ✓edit_file accepts several edits at once, keeps CRLF or LF line endings, and has a dryRun mode that returns a git-style diff without writing (README says)
- ✓Access limited to allowed directories, from arguments or MCP Roots; a roots update with no valid root revokes access until the client sends one again (README says)
- ✓Symlinks are resolved with realpath and rejected when they point outside the allowed directories; overwrites refuse symlinks via an O_NOFOLLOW open on POSIX (we read lib.ts)
- ✓Every tool sets openWorldHint false, and the source imports no network or child-process modules (we counted the imports)
- ✓Docker option: mount folders under /projects and add ro to a mount to make it read-only (README says)
When to use Filesystem MCP Server
- 1Let an agent summarise or search a folder of notes without giving it your whole disk
- 2Edit config or source files with a previewed diff before applying
- 3Give a read-only view of a project by mounting it with ro in Docker
- 4Move or rename batches of files inside one working folder
Installation & Setup Guide
MCP Server IntegrationFollow these steps (taken from the project's own docs) to configure Filesystem MCP Server in your development environment.
{"mcpServers": {"filesystem": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop", "/path/to/other/allowed/dir"]}}}Add to claude_desktop_config.json. On Windows the README uses "command": "cmd" with "/c", "npx" at the start of args.
{"mcpServers": {"filesystem": {"command": "docker", "args": ["run", "-i", "--rm", "--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop", "mcp/filesystem", "/projects"]}}}Mount directories under /projects; add ,ro to a mount to make it read-only.
{"servers": {"filesystem": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}"]}}}Add to your user mcp.json (MCP: Open User Configuration) or .vscode/mcp.json.
claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/your/project
The server's README does not cover Claude Code. This uses the general claude mcp add syntax from the Claude Code docs (code.claude.com/docs/en/mcp) with the README's command.
{"mcpServers": {"filesystem": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/project"]}}}Not covered by the server's README. Cursor's docs (cursor.com/docs/context/mcp) read .cursor/mcp.json (project) or ~/.cursor/mcp.json (global) with this mcpServers shape.
Usage Example & Verification
1. (our example) Use list_allowed_directories, then list the files in my project folder and show the first 20 lines of README.md. 2. (our example) In config.yaml change the port from 3000 to 8080. Do a dryRun first and show me the diff before applying it. 3. (our example) Search my project for files matching *.test.ts, excluding node_modules, and give me the full paths.
Open Settings > Customizations > Installed MCP Servers in Antigravity 2.0 and confirm filesystem is listed and on, then ask the agent to call list_allowed_directories; it should print exactly the folders you passed.
Security Review
Static reviewLocal-only file server confined to the directories you allow, with symlink checks and no network code; it can overwrite and move files inside them.
Full review: scope, findings, risks
We re-read src/filesystem at commit bbb701e, which is newer than our previous review (5abed86): the server now lives in server.ts as a createServer() factory and 1.0.0 changed overwrites to in-place writes. The 7 TypeScript sources import only Node built-ins (fs, path, os, url, stream, string_decoder), diff, minimatch, zod and the MCP SDK; a grep found no fetch, http, net, child_process, spawn, exec, eval or process.env. Path checks live in lib.ts: allowed directories are realpath-resolved at startup, each request path is resolved and rejected if outside, and a symlink whose target is outside is refused (Access denied - symlink target outside allowed directories). writeFileContent creates new files with the exclusive wx flag and falls back to overwriteInPlace, which lstat-checks the file, opens it with O_NOFOLLOW (POSIX) and verifies the same device and inode before truncating. moveFile lstat-checks the destination and refuses to overwrite. The 14 tools all set openWorldHint false; 4 are not read-only and 3 are marked destructive. The Dockerfile builds on node:22.12-alpine and installs with npm ci --ignore-scripts. License: the README says MIT; the repository LICENSE says the project is moving to Apache-2.0 for new contributions.
Operational Notes & Known Limitations
Known Limitations
- •Only works inside allowed directories. With no directory arguments and a client that does not support Roots, it logs the reason and exits with status 1 (README)
- •Needs Node.js (npx) or Docker. The package has 5 runtime dependencies that npx downloads on first run
- •write_file overwrites an existing file in place and, since 1.0.0, that is not crash-atomic: a crash mid-write can leave a partly written file (README). Older write-ups, including our previous review of commit 5abed86, described temp-file renames; that changed
- •move_file fails if the destination exists; read_text_file always treats files as UTF-8 text
- •The README feature list says 'Create/list/delete directories' but there is no delete tool among the 14 (we counted); deleting files is not possible through this server
- •We found no file-size cap in server.ts or lib.ts, so a very large read is limited only by the client
- •Antigravity: the README documents Claude Desktop and VS Code only and does not mention Antigravity. The Antigravity config below is our adaptation of the documented command
- •Difference from the sqlite-mcp-server page on this site: that server is archived and unmaintained, while this one is still under active development (its git history shows roots fixes committed on 2026-10-10)
Frequently Asked Questions
Is the Filesystem MCP Server safe?
It is local-only: the source imports no network or child-process modules, reads no API keys, and refuses paths outside the allowed directories, including symlinks that point outside. But write_file, edit_file and move_file can overwrite or move anything inside those folders, so grant only what you need or use a Docker mount with ro.
How do I install the Filesystem MCP Server in Antigravity?
Add the npx command from the README to Antigravity's mcp_config.json (global ~/.gemini/config/mcp_config.json, or .agents/mcp_config.json for one project) with your folders as extra args, then check Installed MCP Servers. The README itself does not mention Antigravity.
How do I limit which folders it can reach?
Pass them as arguments, or use a client that supports MCP Roots; roots from the client replace the argument list. list_allowed_directories shows the current set.
Can it delete files?
Not directly: among its 14 tools there is no delete tool (we counted), although move_file and write_file can still overwrite data, and the README feature list wording about deleting directories is misleading.
Does it need internet or an API key?
No key. npx downloads the package once; after that the server only touches the local filesystem and every tool sets openWorldHint false.
Supported Platforms
Keep exploring this topic
Browse the full Antigravity skills directory for more source-linked skills with install steps and static safety reviews.
Related Skills
SQLite MCP Server
@modelcontextprotocol
Archived MCP reference server for running SQL against a SQLite file, inspecting tables and collecting insights in a memo.
mcporter
@openclaw
OpenClaw's one-file mcporter skill: lets an AI agent list, configure, authenticate and call MCP servers from the shell through the mcporter CLI.
DeepWiki
Cognition (Devin)
DeepWiki MCP server from Cognition (Devin): a free hosted endpoint with three tools to read and ask questions about public GitHub repositories' generated documentation. No install, no API key.
Popular Skills
View All →Agent Manager
@sickn33
Manage multiple local CLI agents via tmux sessions.
Systematic Debugging
@sickn33
Debug systematically, not randomly. Find and fix bugs methodically.
Browser Automation (Playwright)
@sickn33
Expert browser automation for cleaning scraping and reliable testing.