Hash-anchored file editing with surgical precision over file editing and ironclad control of access
MCPpedia last refreshed this data
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"hashfile": {
"command": "/path/to/hashfile-mcp/target/release/hashfile-mcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
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.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Manage Supabase projects — databases, auth, storage, and edge functions
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
MCP Security Weekly
Get CVE alerts and security updates for Hashfile MCP Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
Unlike traditional line-number-based editing that breaks when files change, Hashfile uses content-anchored operations:
Take complete control over what AI agents can touch with AGENTS.md frontmatter:
forbidden: Block access to secrets, credentials, sensitive dataread_only: Allow reading schemas, configs, lock files — prevent modificationsignore: Hide generated code, dependencies, build artifacts from AI contextsecrets/**, **/*.env)📖 Full AGENTS.md Documentation | 📋 Proposal Spec
All standard MCP filesystem tools included:
list_directory — Browse with [FILE]/[DIR] prefixesdirectory_tree — Compact tree view (10x more token-efficient than JSON)create_directory — Recursive directory creationmove_file — Rename/move files and directorieswrite_file — Raw UTF-8 writes (non-hashline)read_multiple_files — Batch reads in one operation| Feature | Benefit |
|---|---|
| Hash-Anchored Editing | Edits survive file changes — no more "line 42 doesn't match" errors |
| Content Verification | 6-character file hashing prevents race conditions |
| AGENTS.md Support | Declarative access control — protect secrets, lock schemas, hide noise |
| Fuzzy Line Matching | Finds the right line even after insertions/deletions |
| 9 MCP Tools | 3 hashline tools + 6 standard filesystem tools |
| Zero Dependencies | Pure Rust, compiles to a single binary |
cargo build --release
The binary will be at target/release/hashfile-mcp.
Add to Claude Desktop or your MCP client config:
{
"mcpServers": {
"hashfile": {
"command": "/path/to/hashfile-mcp/target/release/hashfile-mcp"
}
}
}
Create AGENTS.md in your project root:
---
forbidden:
- "secrets/**"
- "**/*.env"
- ".git/**"
read_only:
- "package-lock.json"
- "Cargo.lock"
- "schema.sql"
ignore:
- "node_modules/**"
- "target/**"
- "**/*.generated.ts"
---
# Project Instructions
Your custom instructions for AI agents here...
The AI can now:
.env filesnode_modules or build artifactsTraditional line-number editing fails when files change:
Agent: "Replace line 42"
Reality: Someone inserted 3 lines at the top
Result: Wrong line replaced! 💥
Content-anchored editing with hash verification: