Filesystem MCP
@sebastianbachmaier
mcp server to modify files savely in a root directory where user should not be able to escapce from
Overview
What is Filesystem MCP?
It is a simple filesystem MCP that allows an agent to create, read, update, and delete files within a specified root folder. It is intended for use with Claude (or other MCP clients) and requires Node.js >12.
How to use Filesystem MCP?
Install Node.js >12, then add the server to the Claude MCP configuration file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json) with the command node and args pointing to the built index.js and an absolute root folder path. Then start Claude and ask it to code a game – it will use the MCP to create, read, update, and delete files in the specified root folder.
Key features of Filesystem MCP
- Create, read, update, and delete files in a designated root folder.
- Root folder is set as an argument to the node command.
- Prevents modification of files outside root (not guaranteed).
- Requires Node.js version greater than 12.
- Integrated via Claude Desktop MCP configuration.
Use cases of Filesystem MCP
- Allow Claude to create and modify project files in a safe sandbox.
- Generate code files (e.g., games) by asking Claude to use the MCP.
- Manage file-based assets within a controlled directory.
- Perform file editing tasks without exposing the entire filesystem.
FAQ from Filesystem MCP
What does Filesystem MCP do?
It allows an agent to create, read, update, and delete files within a specified root folder.
How is the root folder specified?
The root folder is specified as an argument to the node call, e.g., the second argument in the args array of the MCP configuration.
Is Filesystem MCP guaranteed to restrict file access?
No. The README states that it should not be able to modify files outside the root folder, but this is not guaranteed.
What are the runtime requirements?
You need Node.js version greater than 12 to run this MCP.
How do I install Filesystem MCP for Claude?
Modify your Claude MCP configuration file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json) and add the server entry with the path to the built index.js and the absolute root folder.