mcp-fstools
Click on "Install 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., "@mcp-fstoolsread ./src/app.js lines 1-50"
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.
mcp-fstools
Minimal MCP server that exposes opencode-style file tools
(read / edit / write) over stdio. Designed for models that handle a
small, structured schema better than a free-form patch grammar.
Why this exists
Alternatives tried:
codex-rsapply_patchshell command — the model has to compose a custom multi-line patch grammar (*** Begin Patch/*** Update File:/-old/+new/*** End Patch) inside a shell argument. Smaller models stumble on this format.mcp-workspace(Python, stdio) — exposes the same opencode shape but enforces two extra boundaries the host already covers: a--project-dirfilter and a.gitignorefilter that blocks reading common ignored files (target/,.env, etc.).
This server keeps the opencode tool shape and drops the extra boundaries, so models get a familiar three-field schema and can reach every file the OS sandbox allows.
Related MCP server: Filesystem MCP
Tools
Name | Args | Notes |
|
| Line-numbered output; defaults 100 lines / 10,000 chars, up to 2,000 lines / 100,000 chars; records file hash for must-read-first. |
|
| Exact match; must be unique; must-read-first enforced. |
|
| Atomic full-file write; creates parent dirs. |
Read limits
read is bounded so one call can't flood the model's context. By default
it returns at most 100 content lines and 10,000 content characters
(plus a short paging hint). The agent can request more by passing limit
(up to 2,000 lines) and max_chars (up to 100,000 chars); when only
limit is given, max_chars defaults to 100 per line, capped at 100,000
chars. A read that hits either limit or needs more lines ends with a hint
like call read(offset=N) to continue; the model pages through large
files with offset.
edit mirrors opencode's contract:
You must call
readon the same file first in the session.oldStringmust appear exactly once in the current file content.The file must not have changed since the last
reador since the last successfuledit/writeon that file (hash mismatch → fail).
The hash check runs before the oldString check, so a stale edit
against a changed file reports "file changed" rather than the
misleading "oldString not found".
JSON-RPC arg names
Tool calls accept either casing — pick whichever feels natural. The
schema tools/list reports uses camelCase (MCP convention), but the
server also accepts snake_case at call time, so all of these are
equivalent for edit:
filePath/file_patholdString/old_stringnewString/new_string
If a Pydantic error names a field as missing, check both spellings before assuming truncation — that's the diagnostic FastMCP surfaces when an unknown key is dropped.
Sandbox
None at the application layer. The host (e.g. Codex) provides the
OS-level sandbox (Seatbelt/landlock) which already wraps the spawned
subprocess. This server intentionally does not enforce a
--project-dir boundary or a .gitignore filter.
Install
# First install
uv tool install .
# After source changes — use --reinstall (not --force)
uv tool install --reinstall .Both commands write outside the default Codex sandbox scope
(~/.local/share/uv/tools/, ~/.cache/uv/), so run with
sandbox_permissions: "require_escalated". See AGENTS.md for the
why behind --reinstall.
Entry point: mcp-fstools (stdio MCP server).
Wire into Codex
In ~/.codex/config.toml:
[mcp_servers.mcp_fstools]
command = "mcp-fstools"
default_tools_approval_mode = "approve"Restart Codex after the install. To verify, run a read and an edit
in a fresh session — both should succeed without a permission prompt.
Available Tools
3 toolseditA
Replace old_string with new_string in file_path.
Requirements (matches opencode):
You must call
readon this file in the same session first.old_stringmust appear exactly once in the current file content. Provide more surrounding context if it isn't unique.The file must not have changed since the last
read.
Returns a unified diff of the change.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | ||
| newString | Yes | ||
| oldString | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses all behavioral traits: requirements to read first, uniqueness constraint, no changes since read, and return type (unified diff). This is thorough and transparent.
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 description is concise with a clear structure: a single sentence explaining the action, followed by bullet-pointed requirements and a return statement. Every sentence adds value.
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 file editing tool with 3 parameters, no annotations, but an output schema, the description covers prerequisites, behavior, and return value. It is fairly complete, though it could elaborate on edge cases.
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 0%, but the description does not add much meaning beyond the parameter names used in context. It explains usage but not parameter semantics like types or formats.
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 clearly states the verb 'Replace' and the resource 'string in file_path', and mentions it returns a unified diff. It distinguishes from sibling tools 'read' and 'write' which have different operations.
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?
The description specifies prerequisites: must have read the file, old_string must appear exactly once, and file must not have changed. It provides clear conditions for use, though it does not explicitly contrast with sibling tools like 'write'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
readA
Read a file, optionally from offset (1-based) for limit lines.
Returns line-numbered content like cat -n. Records the file's
content hash so a subsequent edit can enforce must-read-first.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description fully discloses behavior: returns line-numbered content, records file hash for subsequent edit enforcement, and supports optional offset/limit. No contradictions.
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 sentences, each adding value. First sentence states the main action. No redundant information. Well-structured and front-loaded.
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?
The description covers all necessary aspects: action, optional parameters, return format (line-numbered), and side effect (hash recording). Suitable for a low-complexity read tool.
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 0%, so description must add meaning. It explains offset as 1-based and limit as number of lines. Path parameter is not described, but the context is sufficient for a read tool.
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 clearly states the action ('Read a file'), the resource, and optional features (offset, limit). It distinguishes itself from sibling tools (edit, write) by its purpose.
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?
The description implies when to use (reading files) and provides context about hash recording for edit enforcement. However, it does not explicitly state when not to use or mention alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
writeA
Write content to file_path, overwriting any existing content.
Parent directories are created if missing. The file's new content
hash is recorded so a follow-up edit will require a fresh read.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| filePath | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses key behaviors: overwriting content, creating parent directories if missing, and recording a content hash that affects edit. These are important for the agent to understand side effects. Missing details like idempotency or failure handling, but overall sufficient.
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 description is very concise: three sentences. The first sentence states the core action, the second adds directory creation behavior, and the third explains the hash recording. Every sentence adds value without redundancy or fluff.
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 simple write tool, the description covers primary behavior and important side effects. It does not mention return values, but an output schema exists (context confirms) which likely covers that. Overall, it provides enough information for the agent to use the tool 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?
The description adds basic meaning by using parameter names in context: 'Write `content` to `file_path`'. It also explains that parent directories are created for filePath. However, with 0% schema coverage, more detail on constraints (e.g., path format, content encoding) would be beneficial. The description provides minimal yet adequate semantics.
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 clearly states the action: 'Write `content` to `file_path`, overwriting any existing content.' It specifies the verb (write), resource (file), and that it overwrites. It also distinguishes from sibling tools by noting that the content hash is recorded, requiring a fresh read for a follow-up edit.
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?
The description provides context about when to use this tool by mentioning the interaction with edit: 'a follow-up `edit` will require a fresh `read`.' This implies write is for creating or fully overwriting files. However, it does not explicitly state when to prefer write over edit or when not to use it, which would be clearer.
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. Dates show when Glama detected each change.
3 tool updates
v0.1.0- First observed
edit - First observed
read - First observed
write
TDQS
Each tool has a clear, distinct purpose: read retrieves content, edit modifies parts, write overwrites entirely. No overlap in functionality.
All tool names are single-word verbs, simple and consistent. No mixing of conventions.
Three tools is minimal but appropriate for a focused file editing server. Each tool earns its place, though more tools could be added for listing or deletion.
The tool set lacks fundamental file operations like delete, rename, list, or search. For a general file system server, this is a significant gap.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
Manage portable AI agent playbooks, Agent Skills, MCP configurations, personas, and memory.
Securely search and manage workspace context files for AI agents and teams.
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.1675ISC
- AlicenseNot gradedqualityAmaintenanceEnables reading, creating, and editing files on the local filesystem through operations like view, create, string replacement, and line insertion.1823MIT
- AlicenseNot gradedqualityFmaintenanceProvides hashline-based file editing using line-addressed edits and content hashes for integrity verification. It enables LLMs to perform precise file modifications while ensuring edits are rejected if the file content has changed since the last read.118MIT
- FlicenseNot gradedqualityCmaintenanceProvides reliable file editing through hash-anchored operations.6-
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/devrandom/mcp-fstools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server