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), writing or overwriting content and creating parent directories as needed. Pass files: [{ path, content }] — there is no single-path form. Silently overwrites existing files — read first if you need to preserve existing content. |
| 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; include 3-5 lines of surrounding context to ensure uniqueness. Set dryRun=true to preview diffs without writing. For glob-based bulk regex replacement across many files, use replace_text instead. |
| listB | List sorted directory entries and an ASCII tree. maxDepth=1 is top-level. maxEntries sets page size; continue with nextCursor. resourceUri is only for hard-cap overflow. |
| 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. 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. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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