Filesystem MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Filesystem MCPview my notes.txt with line numbers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
filesystem-mcp
MCP server for filesystem operations - read, create, and edit files.
Use Cases
Save email attachments: "Download all PDFs from my accountant's emails this month" → searches Gmail for matching emails, extracts attachments, and saves them to a local folder.
Update config files: "Change the API endpoint from staging to production in my config" → finds the config file, replaces the URL, and shows you the diff.
Generate reports: "Create a summary of today's calendar events" → reads your calendar, formats a markdown report, and saves it to your notes folder.
Code refactoring: "Rename the function getData to fetchUserData in src/api.ts" → reads the file, makes the precise replacement, and confirms the change.
Backup before changes: "Save a copy of my .zshrc before I modify it" → reads the current file and writes a timestamped backup.
Related MCP server: Files MCP Server
Setup
Follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).
Tools
Tool | Description |
| Read file contents or list directory (with line numbers) |
| Create or overwrite a file |
| Replace an exact string in a file |
| Insert text at a specific line |
Contributing
Pull requests are welcomed on GitHub! To get started:
Install Git and Node.js
Clone the repository
Install dependencies with
npm installRun
npm run testto run testsBuild with
npm run build
Releases
Versions follow the semantic versioning spec.
To release:
Use
npm version <major | minor | patch>to bump the versionRun
git push --follow-tagsto push with tagsWait for GitHub Actions to publish to the NPM registry.
Available Tools
4 toolscreateCreateADestructive
Create or overwrite a file with the specified content.
Creates parent directories if they don't exist
Overwrites existing files without warning
Use absolute paths
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path where file will be created | |
| content | Yes | Content to write to the file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description still adds genuinely useful behavior: parent directories are auto-created, and existing files are overwritten without warning. It omits details like atomicity or encoding, but that is a minor gap against annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action, then three tight bullets that each carry real information. The only structural quibble is that 'Use absolute paths' is a parameter constraint placed among behavioral bullets, slightly misgrouped.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with no output schema, the description covers the key agent-relevant facts: side effects, path requirement, and overwrite semantics. Return/error behavior is not described, but no output schema exists to carry it, so this is a small residual gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the schema already documents both 'path' (absolute path) and 'content'. The description's 'Use absolute paths' merely reinforces the schema's own wording rather than adding new meaning, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Create or overwrite a file with the specified content'), which is far more informative than the bare name/title 'Create'. It does not explicitly differentiate from the sibling editing tools (str_replace, insert), so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Create or overwrite' implies the write case, and 'Use absolute paths' gives a concrete usage constraint. However, it never says when to prefer this over str_replace or insert for modifying existing files, so the alternative-selection guidance is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insertInsertADestructive
Insert text at a specific line in a file.
insert_line = 0: Insert at the beginning
insert_line = N: Insert after line N
insert_line = -1: Insert at the end
insert_text should typically end with a newline
Use absolute paths
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file | |
| insert_line | Yes | Line number to insert after (0 = beginning, -1 = end) | |
| insert_text | Yes | Text to insert (should end with newline) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety profile is covered. The description adds operational conventions (newline termination, absolute paths) but says nothing about in-place mutation consequences, whether the file must already exist, or how out-of-range line values are handled — context that matters for a destructive write.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in the first sentence and the remaining lines are tight bullets that each carry distinct information. No sentence is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-parameter mutation tool with annotations covering safety and no output schema, the description covers positioning, path form, and text formatting adequately. Minor gaps remain around failure modes (non-existent file, out-of-range line) and what the tool returns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all three parameters are already documented, including the 0/-1 line mapping and the newline note. The description largely restates the schema's parameter descriptions rather than adding format, boundary, or error semantics beyond them, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb+resource ('Insert text at a specific line in a file') and the line-index semantics make it operationally distinct from 'create' (new file) and 'str_replace' (in-place substitution). It does not explicitly name any sibling, so an agent must infer the boundary rather than being told it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied through the insert_line mapping (0=beginning, N=after line N, -1=end) and the absolute-path convention, which tells the agent how to position an insertion. However, there is no statement of when to choose this tool over str_replace or create, and no prerequisite or exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
str_replaceString ReplaceADestructive
Replace an exact string in a file.
old_str must match exactly and be unique in the file
If old_str appears 0 times or more than once, the operation fails
If new_str is omitted, old_str is deleted
Use absolute paths
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file | |
| new_str | No | Replacement string (omit to delete) | |
| old_str | Yes | Exact string to find (must be unique) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already flag destructiveHint=true and readOnlyHint=false, so the mutation warning is covered. The description goes beyond that by disclosing the failure mode (ambiguous or absent match aborts the operation) and the deletion semantics of an omitted new_str - real behavioral detail an agent needs before calling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four tight bullets, front-loaded with the core action, zero filler. Every line carries actionable constraint information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description should ideally say what a successful call returns or how the change is reported, and that gap remains. Otherwise the preconditions, failure modes, and path requirement make it complete enough for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents path, old_str (unique match) and new_str (omit to delete). The description largely restates that information rather than adding syntax, format, or encoding details, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource ("Replace an exact string in a file") and adds behavioral specifics. It distinguishes itself from `view` and `create`, but never explicitly differentiates from the `insert` sibling, which an agent could plausibly confuse with string replacement.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states operational preconditions clearly (exact unique match required, failure on 0 or >1 occurrences, omit new_str to delete, use absolute paths), which is genuinely useful. However, it gives no guidance on when to choose this tool over `insert`, and no exclusions or alternatives are named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
viewViewARead-only
View file contents or list directory.
For files:
Returns content with line numbers (format: " N\t")
Use view_range to read specific lines [start, end] (1-indexed, inclusive)
Large files are truncated at 16000 characters
For directories:
Lists contents with type indicator (/ for directories)
Shows 2 levels deep by default
Ignores hidden files and node_modules
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file or directory | |
| view_range | No | Line range [start, end] for text files (1-indexed, inclusive) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the readOnlyHint annotation by disclosing the exact truncation limit (16000 characters), the line-number output format, the default directory depth (2 levels), and the ignore rules (hidden files, node_modules). These are precisely the behaviors an agent must know before calling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the one-line purpose, then splits the two modes into short, scannable bullet groups. Every bullet carries operational detail (format, range semantics, truncation, depth, ignores) with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description carries the return-format burden and does so for both modes, including line-number formatting, directory type indicators, depth, and truncation. An agent has everything needed to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters are already documented with the same 1-indexed inclusive semantics. The description restates view_range's behavior and adds the line-number output format, which is useful but not much beyond the schema baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (view file contents or list a directory) with the two modes spelled out. The sibling set is entirely mutating (create, str_replace, insert), so this read-only tool is trivially distinguishable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear branch conditions: file vs directory, and explicitly says to use view_range for reading specific lines. It does not name an alternative tool or state exclusions, but the read-vs-write split against its siblings is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.3.0- First observed
create - First observed
insert - First observed
str_replace - First observed
view
TDQS
Scored across 4 tools
Each tool has a distinct primary operation: view reads or lists, create writes whole files, str_replace edits exact strings, and insert adds text at a line. str_replace and insert both modify existing files, but their descriptions clearly distinguish their use cases.
Three tools use simple lowercase verbs (view, create, insert) while one uses a compound snake_case name (str_replace). The set is readable and mostly consistent, with only that minor deviation from a uniform verb pattern.
Four tools form a lean but reasonable core for basic file read/write/edit operations. However, the set omits common filesystem actions like delete, move, or search, making it slightly under-scoped for the domain.
Core create/read/update coverage exists through view, create, str_replace, and insert. There is no delete, rename/move, copy, or search operation, leaving notable gaps for standard filesystem workflows.
Maintenance
Related MCP Connectors
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables comprehensive file operations including reading, writing, searching, and editing files with advanced features like regex-based replacements, line-specific modifications, and directory-wide search capabilities. Provides 8 robust tools for safe file manipulation with content verification and detailed error handling.825 npm2MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to safely explore directories, read files, search content by pattern or filename, and edit files with checksum verification and dry-run preview within sandboxed filesystem access.106 npm76ISC
- FlicenseNot gradedqualityDmaintenanceProvides sandboxed access to local filesystem operations including directory and file management, content search with glob and regex patterns, and binary file support with configurable safety limits.-
- AlicenseAqualityDmaintenanceEnables AI clients to manage and manipulate text files in a secured local directory through tools like list, read, write, delete, create directory, and move.7MIT