filesystem-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": true,
"listChanged": true
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| createA | Create one or more files (max 100), creating parent directories as needed. Pass files: [{ path, content }] — there is no single-path form. An existing file prompts the user to confirm the overwrite, so the call returns without writing anything until that confirmation comes back; set overwrite: true on an entry to replace it without the prompt. Set append: true on an entry to add to the end of an existing file (created if missing) instead of overwriting. |
| deleteA | Permanently delete one or more files, directories, or symlinks (max 1000 per call). This action is irreversible. Pass paths: [...] — there is no single-path form. Non-empty directories require recursive=true and additionally prompt the user to confirm each one, so the call returns without deleting anything until that confirmation comes back; a client that cannot prompt gets an error naming the alternative. Workspace root directories cannot be deleted. |
| diffA | Compare two files and return a unified diff with line counts. Pass the two paths as a and b. Use after an edit dry-run to compare against another file, or to inspect changes between two paths. |
| editA | Apply sequential literal string replacements to one or more files (max 5 files per call). Modes: single-file { path, edits } or per-file { files: [{ path, edits }] }. oldText must match file content exactly and only once; include 3-5 lines of surrounding context, or the edit fails listing the lines it matched. Set dryRun=true to preview diffs without writing. For glob-based bulk regex replacement across many files, use replace_text instead. |
| listA | List sorted directory entries and an ASCII tree. maxDepth=1 is top-level. maxEntries sets page size; continue with nextCursor. An incomplete first page also carries resourceUri for the whole list. |
| moveA | Move, rename, or copy files and directories to explicit destination paths (max 100 operations per call). Pass moves: [{ source, destination }] — there is no single-pair form. Parent directories are created automatically. Set copy=true to copy instead of move (sources are kept). An existing destination prompts the user to confirm the overwrite, so the call returns without moving anything until that confirmation comes back; copy=true with overwrite=true skips the prompt, move has no such bypass. Self-moves are silently skipped. |
| patchA | Apply a single-file unified diff to one file and write the result. Pass { path, diff }. Use after inspecting a diff tool dry-run: pass the diff blob directly instead of re-expressing it as line edits. Rejects multi-file diffs and diffs whose hunk context does not match the file. Set dryRun=true to preview the result without writing. |
| readA | Read one or more text files and return content. Partial reads: head (first N lines), tail (last N lines), startLine/endLine (line range). Batch mode: pass paths[] instead of path; line params are shared across all files. head, tail, and startLine/endLine are mutually exclusive — use exactly one. |
| replace_textA | Bulk search-and-replace across files matching a glob pattern. Replaces ALL occurrences per file (unlike edit, which replaces only the first match). Set returnDiff=true to preview changes as a unified diff before or after writing. Literal matching by default; set isRegex=true to enable RE2 regex with capture groups ($1, $2). |
| list_rootsA | List the allowed workspace root directories. Call this first to discover what paths are accessible; all other tools are scoped to these roots. Allowed directories are configured via CLI arguments, the FS_ALLOWED_DIRS environment variable, or --allow-cwd. |
| search_textA | Search file contents by text or regex (grep-style). Returns matching lines with file path, 1-indexed line number and 0-indexed column offset. Set context=N to also return N lines either side of each match (grep -C). Scope to specific file types with pattern (e.g. **/*.ts). Set includeHidden=true to include dotfiles. Use find_files to search by filename instead. |
| find_filesA | Find files matching a glob pattern. Returns matched paths with optional metadata. Pagination cursors reference a query-bound snapshot that expires after 60 seconds. For content search use search_text; for bulk regex replacements use replace_text with the same glob. |
| statA | Get metadata for one or more files or directories: size, type, permissions, MIME type, timestamps, and tokenEstimate. Use tokenEstimate to pre-screen read cost before calling read. Single path: pass path. Batch mode: pass paths[]. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| get-help | Navigation guide for filesystem-mcp tools and constraints. Use list_roots to inspect configured or accepted roots, then list/find_files -> stat -> read. Never guess paths. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| filesystem-mcp-instructions | Navigation guide for filesystem-mcp tools and constraints. Use list_roots to inspect configured or accepted roots, then list/find_files -> stat -> read. Never guess paths. |
TDQS
Scored across 13 tools
Each tool targets a distinct file system operation — listing, reading, writing, editing, moving, diffing, searching, etc. Even overlapping operations like edit vs replace_text are clearly differentiated by scope (literal sequential vs bulk regex) and search_text vs find_files by content vs filename. No ambiguity remains.
Most tools follow a clear verb or verb_noun pattern (create, delete, read, list_roots, search_text). The only deviation is the mix of single-word verbs (list, diff, stat) and compound verbs (replace_text, find_files), but all use snake_case consistently, making the set predictable.
13 tools is well-scoped for a filesystem server. Each tool has a distinct purpose and none feel redundant. The count covers the breadth of file operations without excessive granularity or missing essentials.
The tool surface covers the full file lifecycle: create, read, edit, patch, move (with copy), delete, plus metadata (stat), listing (list/find), search, and root discovery. Operations are logically paired (e.g., diff and patch enable safe application of changes), and bulk variants exist for efficiency. No obvious gaps that would break agent workflows.