Hashfile Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Hashfile Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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:
secrets/**, **/*.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 --releaseThe 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:
42:a3|const x = 1;"anchor": "42:a3"#### read_text_file Returns content with hash-tagged lines for reliable editing:
1:a3|import { useState } from 'react';
2:7f|
3:2c|export function Counter() {
---
hashline_version: 1
total_lines: 3
file_hash: 8f3a9b#### edit_text_file Apply hash-anchored operations:
{
"path": "/path/to/file.ts",
"file_hash": "8f3a9b",
"operations": [
{
"op_type": "replace",
"anchor": "3:2c",
"content": "export function Counter({ initial = 0 }) {"
}
]
}Operation types: replace, insert_after, insert_before, delete
#### write_text_file Write content and get back hashline-tagged verification
#### list_directory
[DIR] src
[DIR] tests
[FILE] README.md
[FILE] Cargo.toml#### directory_tree
src/
├── agents.rs
├── config.rs
├── filesystem.rs
├── hashline.rs
├── main.rs
└── tools.rsSupports exclude_patterns for filtering (e.g., ["**/node_modules/**", "**/.git/**"])
#### create_directory, move_file, write_file, read_multiple_files Standard filesystem operations with AGENTS.md enforcement
| Constraint | Effect | Use Case |
|---|---|---|
forbidden | Block all access | Secrets, credentials, private keys |
read_only | Allow reads, block writes | Schemas, lock files, generated configs |
ignore | Hide from AI context | Dependencies, build artifacts, noise |
Hashfile MCP automatically respects .gitignore files in your project:
.gitignore files.gitignore patterns (basename, directory, path)Pattern conversion:
# .gitignore
*.log → **/*.log
node_modules/ → node_modules/**
build/output → build/outputPrecedence: AGENTS.md ignore patterns take precedence over .gitignore.
---
forbidden:
- "**/secrets/**"
- "**/*.key"
- "**/*.pem"
- ".env*"
read_only:
- "**/package-lock.json"
- "**/Cargo.lock"
- "db/schema.sql"
ignore:
- "**/node_modules/**"
- "**/target/**"
- "**/.next/**"
- "**/*.generated.*"
---Place AGENTS.md files at any level:
/project/AGENTS.md ← Global rules
/project/backend/AGENTS.md ← Backend-specific rules (overrides global)
/project/frontend/AGENTS.md ← Frontend-specific rulesThe nearest AGENTS.md in the directory hierarchy applies.
cargo testsrc/
├── main.rs # MCP server setup
├── tools.rs # Tool definitions (9 tools)
├── hashline.rs # Hash-anchored editing logic
├── filesystem.rs # Standard filesystem operations
├── agents.rs # AGENTS.md frontmatter parsing
├── config.rs # Configuration (future: tool enablement)
└── roots.rs # Root path management (future)rmcp, serde, serde_json, serde_yaml, globset, anyhow, fnvENABLE_FILESYSTEM_TOOLS=true)ENABLE_LIST_DIRECTORY=true, etc.)get_file_info, search_files, list_directory_with_sizesSee LICENSE file for details.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.