Skip to main content
Glama
mcp-server-filesystem

mcp-server-filesystem

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

FS_ROOT

no

Directory all paths are confined to (default: current working directory at startup)

FS_READONLY

no

true (default) blocks mutating tools; set to false to allow writes/deletes/moves. Empty/unset values are treated as read-only (fail-closed).

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

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-filesystem

The 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-filesystem

mcprack integration

Register this server in mcprack with:

  • Command: mcp-server-filesystem

  • Env: 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 mutations

The 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 tools
copyCopyB

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

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

    A3.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    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.

    Naming Consistency3/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A 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
      -
    • A
      license
      A
      quality
      D
      maintenance
      Provides LLMs with local filesystem operations (read/write files, list directories) and command execution via MCP, enabling file management and task automation within AI clients.
      7
      15 npm
      ISC
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      -