Skip to main content
Glama
j0hanz

filesystem-mcp

by j0hanz

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    }
  }
}
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}
extensions
{}
completions
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
rootsA

List allowed workspace roots. Call first — all other tools are scoped to these directories.

lsA

List immediate directory contents (non-recursive): name, path, type, size, modified date. Omit path for workspace root. includeIgnored=true for node_modules etc. For recursive search, use find.

findA

Find files by glob pattern (e.g. **/*.ts). Returns matching files with metadata. For content search, use grep. For bulk edits, pass the same glob to search_and_replace.

treeA

Render a directory tree (bounded recursion). Returns ASCII tree + structured JSON. maxDepth=0 returns only the root node.

readA

Read text file contents. Use head to preview first N lines of large files. For multiple files, use read_many.

read_manyA

Read multiple text files in one request with contents and metadata. For a single file, use read.

statA

Get file/directory metadata: size, modified, permissions, mime, tokenEstimate. Use tokenEstimate (size÷4) to pre-screen token cost before reading.

stat_manyA

Get metadata for multiple files/directories in one request. Use tokenEstimate (size÷4) to pre-screen token cost before reading.

grepA

Search file contents for text (grep-like). Returns matching lines. Scope with filePattern (e.g. **/*.ts) to reduce noise. includeHidden=true for dotfiles.

mkdirA

Create a new directory at the specified path (recursive).

writeA

Write content to a file, OVERWRITING ALL existing content. Creates the file and parent directories if needed.

editA

Apply sequential literal string replacements to a file (first occurrence per edit). oldText must match exactly — include 3–5 lines of context for unique targeting. Use dryRun:true to preview.

mvB

Move or rename a file or directory.

rmA

Permanently delete a file or directory. This action is irreversible.

calculate_hashA

Calculate SHA-256 hash of a file or directory.

diff_filesA

Generate a unified diff between two files. Output feeds directly into apply_patch. isIdentical=true means files match — no patch needed.

apply_patchA

Apply a unified diff patch to one or more files. Single-file: throws on failure. Multi-file: best-effort per file with results[]. Workflow: diff_filesapply_patch(dryRun:true)apply_patch. On failure, regenerate the patch from current file content.

search_and_replaceA

Bulk search-and-replace across files matching a glob. Replaces ALL occurrences per file (unlike edit: first only). Always dryRun:true first — returns a unified diff. Literal matching by default; isRegex:true enables RE2 with capture groups ($1, $2).

Prompts

Interactive templates invoked by user choice

NameDescription
get-helpReturn filesystem-mcp usage instructions.
compare-filesGenerate a workflow for comparing two files using diff_files.
analyze-pathGenerate a workflow for analyzing a file or directory using stat, read, and tree.
get-tool-helpReturn a prompt with the authoritative contract for a specific filesystem-mcp tool.

Resources

Contextual data attached and managed by the client

NameDescription
filesystem-mcp-instructionsComprehensive rules and guidelines for filesystem-mcp usage.
filesystem-mcp-catalogTool selection guide and data flow map.
filesystem-mcp-workflowsStandard operating procedures for exploration, search, edit, and patch.
filesystem-mcp-metricsLive per-tool call/error/avgDurationMs metrics snapshot.
rootsList allowed workspace roots. Call first — all other tools are scoped to these directories.
lsList immediate directory contents (non-recursive): name, path, type, size, modified date. Omit path for workspace root. `includeIgnored=true` for node_modules etc. For recursive search, use `find`.
findFind files by glob pattern (e.g. `**/*.ts`). Returns matching files with metadata. For content search, use `grep`. For bulk edits, pass the same glob to `search_and_replace`.
treeRender a directory tree (bounded recursion). Returns ASCII tree + structured JSON. `maxDepth=0` returns only the root node.
readRead text file contents. Use `head` to preview first N lines of large files. For multiple files, use `read_many`.
read_manyRead multiple text files in one request with contents and metadata. For a single file, use `read`.
statGet file/directory metadata: size, modified, permissions, mime, tokenEstimate. Use `tokenEstimate` (size÷4) to pre-screen token cost before reading.
stat_manyGet metadata for multiple files/directories in one request. Use `tokenEstimate` (size÷4) to pre-screen token cost before reading.
grepSearch file contents for text (grep-like). Returns matching lines. Scope with `filePattern` (e.g. `**/*.ts`) to reduce noise. `includeHidden=true` for dotfiles.
mkdirCreate a new directory at the specified path (recursive).
writeWrite content to a file, OVERWRITING ALL existing content. Creates the file and parent directories if needed.
editApply sequential literal string replacements to a file (first occurrence per edit). `oldText` must match exactly — include 3–5 lines of context for unique targeting. Use `dryRun:true` to preview.
mvMove or rename a file or directory.
rmPermanently delete a file or directory. This action is irreversible.
calculate_hashCalculate SHA-256 hash of a file or directory.
diff_filesGenerate a unified diff between two files. Output feeds directly into `apply_patch`. `isIdentical=true` means files match — no patch needed.
apply_patchApply a unified diff patch to one or more files. Single-file: throws on failure. Multi-file: best-effort per file with `results[]`. Workflow: `diff_files` → `apply_patch(dryRun:true)` → `apply_patch`. On failure, regenerate the patch from current file content.
search_and_replaceBulk search-and-replace across files matching a glob. Replaces ALL occurrences per file (unlike `edit`: first only). Always `dryRun:true` first — returns a unified diff. Literal matching by default; `isRegex:true` enables RE2 with capture groups ($1, $2).

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/j0hanz/filesystem-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server