技能潮 SkillTide 提交收录
官方说明7 个来源MCP 服务8 天前
dabito/hledit-mcp

dabito/hledit-mcp

Hash-anchored file edits: read files with
在 GitHub 查看 ↗直链 · 无中转页
配置模板(请按你的客户端调整)
claude mcp add hledit-mcp -- npx -y hledit-mcp
这是根据仓库名生成的可粘贴骨架,命令行参数与包名请以该项目 README 为准。
★ 数取值
1 ★ · dabito/hledit-mcp · 取自 GitHub 搜索 API · (2026-10-16 20:00:20 核对)
来源明细
收录自 punkpeye/awesome-mcp-servers 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-10-09 · 最近见到 2026-10-16 · 共见到 32 次 · 被 7 个来源列出
评分构成
综合分 703 · 1 ★ · 7 个来源 · mcp
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 dabito/hledit-mcp;我们收录于 2026-10-09;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

hledit-mcp

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

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:
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:
Then 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 Desktop and other MCP clients can use the same stdio server shape:
Set HLEDIT_CWD to the workspace the MCP client should allow hledit to edit.
Configuration
| Variable | Default | Description |
| --- | --- | --- |
| HLEDIT_BIN | hledit (on PATH) | Path to the hledit binary, if not on PATH. |
| HLEDIT_CWD | server's process.cwd() | Working directory hledit resolves relative paths against. Keep this scoped to the workspace you expect the MCP client to edit. |
| HLEDIT_MCP_DIFF | 0 | Opt-in textual diff output for successful edit/batch calls. Off by default to keep MCP/model context compact. Set 1, true, or yes to enable. |
| HLEDIT_MCP_DIFF_MAX_LINES | 80 | Max diff lines when HLEDIT_MCP_DIFF is enabled, including the omission marker. Minimum accepted value: 3. |
| HLEDIT_MCP_DIFF_CONTEXT | 2 | Context lines around changed ranges when diff output is enabled. Minimum accepted value: 0. |
来源
awesome · https://github.com/dabito/hledit-mcp
按领域浏览
MCP 服务
Traction
1 ★
收录于
昨天

更多MCP 服务

查看MCP 服务全部 5,525 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引