Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

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

Tools

Functions exposed to the LLM to take actions

NameDescription
roots

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

ls

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.

find

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.

tree

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

read

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

read_many

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

stat

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

stat_many

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

grep

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

mkdir

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

write

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

edit

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.

mv

Move or rename a file or directory.

rm

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

calculate_hash

Calculate SHA-256 hash of a file or directory.

diff_files

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

apply_patch

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_replace

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