mcp-server-filesystem
This server exposes Linux filesystem operations as MCP tools for LLM agents, confined to a configured root directory.
Read-only tools (default): list directory contents (
list_dir), read files as text or base64 binary (read_file), fetch metadata (stat), check existence (exists), and search files by glob pattern (glob_search).Mutating tools (only if
FS_READONLY=false): write/append text to files (write_file), create directories (mkdir), delete files/directories (delete), move/rename (move), and copy files/directories (copy).Safety boundaries: all paths are resolved against
FS_ROOT; attempts to escape via..or symlinks are rejected. Unset/emptyFS_READONLYdefaults to read-only (fail-closed).Use cases: let an LLM agent inspect a sandboxed directory, read project files, search code, and—when explicitly enabled—modify files within that sandbox.
Provides tools for interacting with the Linux filesystem, including listing directories, reading and writing files, checking metadata and existence, glob searching, and performing file operations such as copy, move, and delete when enabled.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-filesystem list files in /home/user/documents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-filesystem
MCP server exposing Linux filesystem operations as tools for LLM agents, built with FastMCP. Designed as a lightweight, low-dependency test server for the mcprack MCP proxy/catalog tool.
Configuration
No credentials are needed. All configuration is via environment variables, read once at startup:
Variable | Required | Description |
| no | Directory all paths are confined to (default: current working directory at startup) |
| no |
|
All paths given to tools are resolved against FS_ROOT and rejected if they
would escape it (via .. or a symlink). This is an application-level
boundary, not a hardened sandbox (no chroot/mount namespace).
Related MCP server: maic-server-fs-mcp
Tools
Read-only: list_dir, read_file, stat, exists, glob_search.
Mutating (require FS_READONLY=false): write_file, mkdir, delete,
move, copy.
Usage
Recommended — Debian package from VitexSoftware repository
sudo curl -fsSL http://repo.vitexsoftware.com/KEY.gpg -o /usr/share/keyrings/vitexsoftware-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/vitexsoftware-archive-keyring.gpg] http://repo.vitexsoftware.com trixie main backports" \
| sudo tee /etc/apt/sources.list.d/vitexsoftware.list
sudo apt update
sudo apt install mcp-server-filesystemThe backports component is required, not optional: python3-mcp (a
python3-fastmcp dependency) needs python3-jsonschema >= 4.20.0, which is
newer than the version Debian trixie ships in main — it's only available
in backports. Without it, apt install fails with an unmet-dependency
error on python3-jsonschema.
This installs python3-fastmcp and mcp-server-filesystem in a single step.
Alternative — pip
pip install -e .
export FS_ROOT=/path/to/sandbox
mcp-server-filesystemmcprack integration
Register this server in mcprack with:
Command:
mcp-server-filesystemEnv:
FS_ROOT=/path/to/sandbox,FS_READONLY=false(if writes are needed)
mcprack spawns it as a stdio subprocess and proxies it over HTTP per user.
Development
pytest
python tests/live_capability_scenario.py # temp sandbox, FS_READONLY=true
python tests/live_capability_scenario.py --allow-writes # also exercise mutationsThe live scenario creates a temporary FS_ROOT, exercises every read tool,
verifies path-escape rejection, and confirms mutating tools refuse under
read-only mode. No credentials required.
License
MIT — see LICENSE.
Available Tools
10 toolscopyCopyB
Copy a file, or a directory if recursive=True. Requires FS_READONLY=false.
Inputs: dst (required), src (required), recursive. Returns: object
deleteDeleteA
Delete a file, or a directory if recursive=True. Requires FS_READONLY=false.
Inputs: path (required), recursive. Returns: object
existsExistsB
Check whether a path exists.
Inputs: path (required). Returns: result
glob_searchGlob SearchA
Search for files matching a glob pattern (e.g. **/*.py) under path.
Inputs: pattern (required), path. Returns: result
list_dirList DirA
List the contents of a directory (name, is_dir, size, mtime).
Inputs: path. Returns: result
mkdirMkdirB
Create a directory. Requires FS_READONLY=false.
Inputs: path (required), parents, exist_ok. Returns: object
moveMoveB
Move/rename a file or directory. Requires FS_READONLY=false.
Inputs: dst (required), src (required). Returns: object
read_fileRead FileA
Read a file's contents.
Text files are decoded with encoding (errors replaced). Set
binary=True to get the raw bytes base64-encoded instead. Reads are
capped at max_bytes to avoid dumping huge files into context.
Inputs: path (required), binary, encoding, max_bytes. Returns: result
statStatC
Fetch filesystem metadata for a path.
Inputs: path (required). Returns: object
write_fileWrite FileB
Write text content to a file. Requires FS_READONLY=false.
Inputs: path (required), content (required), append, encoding. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool maps to a distinct filesystem operation: read, write, list, search, move, copy, delete, create directory, stat, and exists. There is no meaningful overlap that would cause an agent to select the wrong tool.
Tool names are lowercase and readable, but the convention is mixed: some use verb_noun (write_file, list_dir, glob_search) while others are bare verbs or familiar commands (move, copy, delete, stat, exists, mkdir). This is not chaotic, but it is not a consistently applied pattern.
Ten tools is well within the ideal range for a filesystem server and each tool covers a core operation without redundancy. The set is neither too thin nor overloaded.
The domain is fully covered: reading, writing, listing, searching, moving, copying, deleting, creating directories, checking existence, and fetching metadata. There are no obvious dead ends or missing core filesystem operations.
Maintenance
Related MCP Connectors
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
Browse and manage files in your Moxt AI workspace from any MCP client.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Fastio gives your team and AI agents a workspace for each project, bringing source files, comments and new work together. Connect a compatible MCP client to find files, answer questions from project material, and save results where the team can review and use them. \ Sign in through Fastio and choose the workspaces the connection can reach. Read Only connections expose read tools; Read & Write connections also allow changes. \ • **Files and folders:** browse, read, upload, and organize files, with version history and trash. • **Search:** find files by keyword; search file content and meaning when Deep Indexing is enabled and files have been processed. • **Metadata:** read, set, and search metadata fields, including extracted fields where available. • **Shares:** create and manage shares for sending or collecting files. • **Comments and members:** read and add comments, and manage workspace membership within your permissions. • **Activity:** search workspace events to see what changed. \ Hosted by Fastio, with no server installation required. \ • **Claude and most MCP clients:** https://mcp.fast.io/mcp/tools • **ChatGPT:** https://mcp.fast.io/mcp/operations • **ChatGPT and Codex:** Fastio plugin • **Claude Code, Cursor and similar coding agents:** https://mcp.fast.io/mcp/code • **Setup and client-specific capabilities:** https://mcp.fast.io/docs \ Paid plans. Monthly plans include a trial of up to 30 days. A card is required, and billing begins when the trial ends or trial credits run out, whichever comes first. No free plan.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA Filesystem MCP server that allows an LLM to read and list files from a specified directory on your local machine through the Model Context Protocol.2-
- AlicenseAqualityDmaintenanceProvides LLMs with local filesystem operations (read/write files, list directories) and command execution via MCP, enabling file management and task automation within AI clients.734 npmISC
- FlicenseAqualityDmaintenanceAn MCP server that exposes filesystem operations — listing directories, reading, writing, and searching files — as tools an LLM can discover and invoke at runtime.4-
- FlicenseNot gradedqualityCmaintenanceEnables LLM agents and MCP clients to read, list, write, search, watch, and batch-process files within configured allowed directories, while exposing discoverable file resources and structured error codes.-