hledit MCP server
io.github.dabito/hledit-mcp·v0.1.4·1 starsHash-anchored file edits for MCP clients. Rejects stale writes before they happen.
1 stars63 downloads/wk
Reviews
Write oneNobody has reviewed hledit MCP yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
hledit MCP tools (1)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
hleditRead, edit, or batch-edit files using hash-anchored line references (LN#HASH, currently LN#HHH). Use op:'read' to get anchors, op:'edit' for single changes, op:'batch' for multiple edits in one call. Anchors come from the most recent read and detect stale context before any write.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan10 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 74 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How hledit MCP compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 75% of 48,255 servers
- Tools
- 1
- the typical server has 7
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 1
- more than 65% of 28,688 servers
- Downloads a week
- 63
- more than 50% of 12,191 servers with a package
What its tools let an agent do: 1 read
Install hledit MCP in Claude Code, Cursor or VS Code
Runs npx -y hledit-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add hledit-mcp -- npx -y hledit-mcp
What the publisher says
From the hledit MCP repository's README, as published. We do not edit it. Read it on GitHub
hledit-mcp
hledit-mcp is an MCP server exposing hledit's hash-anchored file edits to standard MCP clients such as Claude Code, Claude Desktop, and Cursor.
Same idea as pi-hledit (the Pi-native integration), but over MCP instead of Pi's extension API, so the same edit primitive can be used from MCP-compatible clients. Official MCP Registry: io.github.dabito/hledit-mcp.
Instead of asking an agent to reproduce old text exactly, hledit read annotates each line with a stable anchor:
5#K7Q:func main() {
6#M9A: fmt.Println("hello")
7#R2C:}Write commands reference anchors such as 6#M9A. Before changing the file, hledit recomputes the hash at that line. If the file changed since it was read, the anchor is rejected and no write happens — the agent gets a stale error and a remap hint instead of silently corrupting the wrong line.
Demo
See docs/demo/transcript.md for a deterministic MCP stdio transcript showing stale-write rejection over the actual hledit-mcp tool surface.
The transcript is generated by docs/demo/hledit-mcp-demo.mjs, which drives dist/index.js through @modelcontextprotocol/sdk's stdio client. It does not call hledit directly.
MCP server for stale-write-safe file editing
hledit-mcp gives MCP-compatible coding agents one file-editing tool that reads line anchors, validates those anchors against current file contents, and rejects stale writes before touching disk. It is for local workspace edits where you want explicit stale-context failure instead of blind text replacement.
Why MCP, separately from pi-hledit
pi-hledit and hledit-mcp share the same tool contract (core.ts in this repo — arg-building, batch translation, result formatting) and the same underlying hledit CLI. Only the registration/execution glue differs: pi-hledit wires that contract into Pi's registerTool, this wires it into @modelcontextprotocol/sdk's McpServer. MCP has no equivalent of Pi's renderCall/renderResult terminal rendering, so this package doesn't have one either — that layer is genuinely Pi-specific chrome, not part of the portable tool contract.
Use hledit-mcp when you want stale-write rejection over an MCP tool boundary instead of relying on a host's native text replacement behavior.
Requirements
- Go 1.21+ to install the hledit CLI (or a prebuilt binary on PATH)
- Node.js 18+
- An MCP-compatible client
Install
Install the hledit CLI first:
go install github.com/dabito/hledit@latestThen configure your MCP client to run hledit-mcp. For Claude Code, verify the current CLI syntax with claude mcp add --help; recent versions use:
claude mcp add hledit -- npx -y hledit-mcpClaude Desktop and other MCP clients can use the same stdio server shape:
{
"mcpServers": {
"hledit": {
"command": "npx",
"args": ["-y", "hledit-mcp"],
"env": {
"HLEDIT_CWD": "/path/to/workspace"
}
}
}
}Set HLEDIT_CWD to the workspace the MCP client should allow hledit to edit.
Configuration
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
hledit MCP: common questions
- Is hledit MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the hledit MCP safety report
- How do I install hledit MCP?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does hledit MCP need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is hledit MCP maintained?
- The last commit was 113 days ago (2026-07-14). The latest release is v0.1.4.
- What can I use instead of hledit MCP?
- Servers from other publishers that do the same job: Excel MCP Server.
- How does hledit MCP compare with other MCP servers?
- safety score 88/100 (higher than 75% of 48,255 servers); tools 1 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to hledit MCP
Same job from other publishers: the closest match first, then the best rated.
- Excel MCP ServerCreate and edit Excel files with AI: charts, PivotTables, formulas. No Excel needed.not reviewedWidely usedA