
Hashfile MCP
This is a filesystem MCP server built in Rust that solves the stale line number problem in AI file editing. Instead of "replace line 42," edits anchor to content hashes so operations survive file changes between read and write. You get nine tools: three hashline operations (read_text_file, edit_text_file, write_text_file) plus six standard filesystem tools like list_directory and directory_tree. The standout feature is AGENTS.md frontmatter support, which lets you mark paths as forbidden, read_only, or ignore using glob patterns. It automatically respects .gitignore files too. Reach for this when you need LLMs editing codebases where concurrent changes happen or when you want declarative access control over what the agent can touch.
- GitHub stars
- 3
- tools
- 9
- transport
- STDIO
- last updated
- Feb 17, 2026
Tools
9 toolsPublic tool metadata for what this MCP can expose to an agent.
read_text_fileReturns content with hash-tagged lines for reliable editing.
Returns content with hash-tagged lines for reliable editing.
No parameter schema in public metadata yet.
edit_text_fileApply hash-anchored operations.
Apply hash-anchored operations.
No parameter schema in public metadata yet.
write_text_fileWrite content and get back hashline-tagged verification.
Write content and get back hashline-tagged verification.
No parameter schema in public metadata yet.
list_directoryBrowse a directory with [FILE]/[DIR] prefixes.
Browse a directory with [FILE]/[DIR] prefixes.
No parameter schema in public metadata yet.
directory_treeCompact tree view of a directory.
Compact tree view of a directory.
No parameter schema in public metadata yet.
create_directoryRecursive directory creation.
Recursive directory creation.
No parameter schema in public metadata yet.
move_fileRename/move files and directories.
Rename/move files and directories.
No parameter schema in public metadata yet.
write_fileRaw UTF-8 writes (non-hashline).
Raw UTF-8 writes (non-hashline).
No parameter schema in public metadata yet.
read_multiple_filesBatch reads in one operation.
Batch reads in one operation.
No parameter schema in public metadata yet.
Sponsors
Readme
Hashfile MCP Server
Fine-Grained Control for AI File Operations — A Model Context Protocol (MCP) server that gives you surgical precision over file editing and ironclad control over file access.
Why Hashfile MCP?
🎯 Surgical File Editing
Unlike traditional line-number-based editing that breaks when files change, Hashfile uses content-anchored operations:
- Hash-Anchored Lines: Every line tagged with a content hash — edits target the right content, not just the right line number
- Fuzzy Matching: Automatically finds moved lines even after insertions/deletions
- Collision Detection: File-level verification prevents editing stale content
- Multi-Operation Edits: Apply multiple precise changes in a single atomic operation
Details
- Repository
- github.com/mrorigo/hashfile-mcp
- Website
- mrorigo.github.io/hashfile-mcp
- Package
https://github.com/mrorigo/hashfile-mcp/releases/download/v0.3.0/hashfile-mcp-aarch64-apple-darwin.tar.gz- Transport
- STDIO
- Registry
- MCP registry, active