fs-mcp-rs — Claude Code MCP server: what it does, how to install
Restricts MCP client file access strictly to chosen folders. Built in Rust, it connects via STDIO or HTTP and offers configurable terminal execution.
claude mcp add fs-mcp-rs -- npx -y fs-mcp-rsWhat fs-mcp-rs does
fs-mcp-rs exposes core filesystem utilities to assistants under explicit folder boundaries. You must designate allowed root folders in a TOML configuration or via command flags. The server rejects any path outside those boundaries. Symlinks remain blocked by default.
It ships as a standalone executable written in Rust. The package provides regex text searching that respects .gitignore, concurrency caps, and atomic file saving with BLAKE3 checksums. Running it requires no heavy runtime setup.
An optional terminal section lets models run console tasks. Enabling run_command executes processes under your active user account, bypassing the filesystem sandbox entirely. Without a specified configuration file or direct paths, the server refuses to boot.
What it helps with
- confine assistant file operations to selected project roots
- search codebase content with regex while honoring
.gitignorerules - lock down writes by enabling strict read-only mode
- run terminal commands with strict timeouts and bounded output
Example prompts for the agent
- Search for obsolete API route handlers inside the permitted project directory
- Read the project configuration file without resolving external symlinks
- Update the package metadata file inside the allowed folder
How to install fs-mcp-rs
Platform CLI
claude mcp add fs-mcp-rs -- npx -y fs-mcp-rsPlatform CLI
codex mcp add fs-mcp-rs -- npx -y fs-mcp-rsConfig file
{
"mcpServers": {
"fs-mcp-rs": {
"command": "npx",
"args": [
"-y",
"fs-mcp-rs"
]
}
}
}Config file
{
"servers": {
"fs-mcp-rs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"fs-mcp-rs"
]
}
}
}Platform CLI
gemini mcp add fs-mcp-rs npx -y fs-mcp-rsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fs-mcp-rs
How to install fs-mcp-rs in Claude Code?
Run claude mcp add fs-mcp-rs -- npx -y fs-mcp-rs. The npx runner fetches the prebuilt binary matching your operating system automatically.
What does fs-mcp-rs do?
It provides guarded filesystem actions like reading, writing, and searching files inside explicit allow-lists without implicit root paths.
Does the terminal runner respect filesystem root boundaries?
No. When terminal execution is toggled on, shell processes run under standard user privileges and ignore configured directory limits.