An MCP server that wraps the `hledit` CLI to expose hash-anchored file reading and stale-write-safe edits to MCP clients. It lets clients read files with stable line anchors and apply single or batch edits that are rejected if the file changed since it was read.
From the registry: Hash-anchored file edits for MCP clients. Rejects stale writes before they happen.
$ go install github.com/dabito/hledit@latesthttps://github.com/dabito/hleditPlease install the `hledit-mcp` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install Go 1.21+** — Go 1.21 or newer is required to install the underlying `hledit` CLI, unless you already have a prebuilt `hledit` binary available on your PATH. (https://go.dev/)
- **Install Node.js 18+** — Node.js 18 or newer is required to run the `hledit-mcp` server via `npx`.
- **Install the `hledit` CLI** — Install the `hledit` command-line tool that this MCP server wraps. Run: `go install github.com/dabito/hledit@latest` (https://github.com/dabito/hledit)
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","hledit-mcp"]
- required environment variables:
- `HLEDIT_CWD`: Workspace directory that `hledit` should be allowed to edit; used as the working directory for resolving relative paths. (example: `<your-workspace-path>`)
- optional environment variables:
- `HLEDIT_BIN`: Path to the `hledit` binary if it is not available on PATH. (example: `<path-to-hledit-binary>`)
Note: The README states this is a stdio MCP server. `HLEDIT_CWD` technically defaults to the server process's current working directory, but it should be set explicitly in practice to scope edits to the intended workspace.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.HLEDIT_BINPath to the `hledit` binary when it is not available on PATH.HLEDIT_CWDWorking directory used as the base for resolving relative file paths for edits.An MCP Server for computer-use in Windows OS