Skip to content
MCP server
Registry

Hashfile MCP Server

Hash-anchored file editing with surgical precision over file editing and ironclad control of access

Hashfile MCP scores 44 (Fair), with no SPDX license recorded and written in Rust. It installs as a local process. It declares 6 tools. Filed under Uncategorized. GitHub shows 5 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by mrorigoNo licenseRust5 stars
Trust score
44Fair
Trust score 44 of 100, Fair

Fair trust

44 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • No license recorded.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 44 comes from

22 + 5 + 3 + 0 + 4 + 10 = 44. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance5 / 20

How recently the repository saw a commit or release.

Maintenance: 5 of 20 points.
Popularity3 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 3 of 20 points.
License0 / 10

A clear, OSI-style open-source license.

License: 0 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "mrorigo-hashfile-mcp": {      "command": "npx",      "args": [        "-y",        "https://github.com/mrorigo/hashfile-mcp/releases/download/v0.3.0/hashfile-mcp-aarch64-apple-darwin.tar.gz"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools6Tool docs quality grade F

All capabilities

About

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

πŸ”’ Ironclad Access Control

Take complete control over what AI agents can touch with AGENTS.md frontmatter:

  • forbidden: Block access to secrets, credentials, sensitive data
  • read_only: Allow reading schemas, configs, lock files β€” prevent modifications
  • ignore: Hide generated code, dependencies, build artifacts from AI context
  • Hierarchical Discovery: Place AGENTS.md anywhere in your tree β€” nearest file wins
  • Glob Patterns: Fine-tune access with wildcards (secrets/**, **/*.env)

πŸ“– Full AGENTS.md Documentation | πŸ“‹ Proposal Spec

πŸ› οΈ Drop-In Filesystem Compatibility

All standard MCP filesystem tools included:

  • list_directory β€” Browse with [FILE]/[DIR] prefixes
  • directory_tree β€” Compact tree view (10x more token-efficient than JSON)
  • create_directory β€” Recursive directory creation
  • move_file β€” Rename/move files and directories
  • write_file β€” Raw UTF-8 writes (non-hashline)
  • read_multiple_files β€” Batch reads in one operation

Features at a Glance

FeatureBenefit
Hash-Anchored EditingEdits survive file changes β€” no more "line 42 doesn't match" errors
Content Verification6-character file hashing prevents race conditions
AGENTS.md SupportDeclarative access control β€” protect secrets, lock schemas, hide noise
Fuzzy Line MatchingFinds the right line even after insertions/deletions
9 MCP Tools3 hashline tools + 6 standard filesystem tools
Zero DependenciesPure Rust, compiles to a single binary

Installation

cargo build --release

The binary will be at target/release/hashfile-mcp.

Quick Start

1. Configure Your MCP Client

Add to Claude Desktop or your MCP client config:

{
  "mcpServers": {
    "hashfile": {
      "command": "/path/to/hashfile-mcp/target/release/hashfile-mcp"
    }
  }
}

2. (Optional) Add Access Control

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...

3. Start Editing

The AI can now:

  • βœ… Read and edit source files with hash-anchored precision
  • βœ… Browse directories and create new files
  • ❌ Cannot touch your secrets or .env files
  • ❌ Cannot modify lock files or schemas
  • πŸ™ˆ Won't see node_modules or build artifacts

How Hashline Works

The Problem

Traditional line-number editing fails when files change:

Agent: "Replace line 42"
Reality: Someone inserted 3 lines at the top
Result: Wrong line replaced! πŸ’₯

The Solution

Content-anchored editing with hash verification:

  1. Read: Each line gets a hash tag β†’ 42:a3|const x = 1;
  2. Edit: Operations reference content, not just position β†’ "anchor": "42:a3"
  3. Apply: Server finds the line by hash, even if it moved to line 45
  4. Verify: File hash must match β€” detects if content changed since read

Reliability Features

  • File-Level Verification: 6-character hash prevents editing stale content
  • Line-Level Anchoring: 2-character hash identifies specific lines
  • Fuzzy Matching: Searches for unique hash match if line number changed
  • Conflict Detection: Clear errors if content diverged

Core Tools

Hashline Tools (Precision Editing)

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

Filesystem Tools (Standard Operations)

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.rs

Supports 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

AGENTS.md Access Control

Constraint Types

ConstraintEffectUse Case
forbiddenBlock all accessSecrets, credentials, private keys
read_onlyAllow reads, block writesSchemas, lock files, generated configs
ignoreHide from AI contextDependencies, build artifacts, noise

Automatic .gitignore Support

Hashfile MCP automatically respects .gitignore files in your project:

  • Hierarchical: Walks up from target file to find all .gitignore files
  • Standard syntax: Supports standard .gitignore patterns (basename, directory, path)
  • Combined with AGENTS.md: Patterns from both sources are merged
  • Zero config: Works out of the box with existing projects

Pattern conversion:

# .gitignore
*.log              β†’ **/*.log
node_modules/      β†’ node_modules/**
build/output       β†’ build/output

Precedence: AGENTS.md ignore patterns take precedence over .gitignore.

Example: Protect a Monorepo

---
forbidden:
  - "**/secrets/**"
  - "**/*.key"
  - "**/*.pem"
  - ".env*"

read_only:
  - "**/package-lock.json"
  - "**/Cargo.lock"
  - "db/schema.sql"

ignore:
  - "**/node_modules/**"
  - "**/target/**"
  - "**/.next/**"
  - "**/*.generated.*"
---

Hierarchical Control

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 rules

The nearest AGENTS.md in the directory hierarchy applies.

Development

Run Tests

cargo test

Project Structure

src/
β”œβ”€β”€ 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)

Technical Details

  • Language: Rust (edition 2021)
  • MCP SDK: rmcp 0.15.0
  • Line Hashing: FNV-1a (2 hex chars, 256 buckets)
  • File Hashing: FNV-1a (6 hex chars, 16M buckets)
  • Transport: stdio
  • Dependencies: rmcp, serde, serde_json, serde_yaml, globset, anyhow, fnv

Roadmap

  • Environment variable-based tool enablement (ENABLE_FILESYSTEM_TOOLS=true)
  • Granular tool control (ENABLE_LIST_DIRECTORY=true, etc.)
  • Additional tools: get_file_info, search_files, list_directory_with_sizes
  • Command-line argument support for configuration

License

See LICENSE file for details.

See Also

  • The Harness Problem - I Improved 15 LLMs at Coding in One Afternoon. Only the Harness Changed. - Can BΓΆlΓΌk Feb 2026
  • AGENTS.md Proposal - Frontmatter specification for agent access control

Frequently asked questions

What is Hashfile MCP Server?

Hash-anchored file editing with surgical precision over file editing and ironclad control of access

How do I install Hashfile MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Hashfile MCP Server runs locally from the MCP bundle https://github.com/mrorigo/hashfile-mcp/releases/download/v0.3.0/hashfile-mcp-aarch64-apple-darwin.tar.gz with the command npx -y https://github.com/mrorigo/hashfile-mcp/releases/download/v0.3.0/hashfile-mcp-aarch64-apple-darwin.tar.gz.

Does Hashfile MCP Server support remote (HTTP) connections?

No remote endpoint is listed for Hashfile MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does Hashfile MCP Server provide?

Hashfile MCP Server provides 6 tools, including create_directory, directory_tree, list_directory, and move_file. See the full tool list for descriptions and parameters.

How is Hashfile MCP Server's trust score calculated?

Hashfile MCP Server scores 44 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

β€”Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server