A single C++17 binary that gives agents precise line, range and search-replace file edits, with dry-run diffs.
Most agent edit failures are small. A replacement hits the wrong occurrence, indentation drifts, or a second edit shifts the line numbers the third one depended on. The edit-mcp MCP server is a compact answer to those problems: one C++17 binary, no runtime dependencies, offering a handful of tightly specified edit and read operations.
Coordinates are 1-based and columns count characters, not bytes. On top of that, a few rules do the heavy lifting:
multi_replace measures every coordinate against the file as it was before the call, so batched edits cannot shift each other; overlaps are rejected and each file succeeds or fails as a wholedryRun and returns a before-and-after diffRegex replacements use ECMAScript syntax with capture references, match per line by default, and can span lines with the s flag.
| Tool | Purpose |
|---|---|
replace_content |
Literal or regex search-and-replace, all matches or a chosen occurrence |
replace_lines / delete_lines |
Rewrite or remove a line span |
replace_range |
Replace by line and column positions; zero length inserts |
multi_replace |
Mixed edits across several files in one call |
get_content, get_lines, get_range, multi_get |
Read with coordinates and context |
The same operations exist as CLI commands, which helps agents that lack MCP support and must work through a shell.
Build with make (or CMake), or use the install script, which picks a release binary for Linux x64 and arm64, macOS arm64 or Android arm64 and prints the MCP config. Termux needs the Android build specifically. Run with no arguments, the edit-mcp MCP server speaks stdio. edit-mcp config --agent claude prints a ready config with the absolute path filled in; there are formats for opencode and Codex too.
Pass --root with a directory to confine every path to that folder, symlinks resolved. Without it, relative, absolute and home-relative paths all work, so set a root if you want a boundary. An embedded skill file teaching tool choice and indentation rules can be installed for Claude Code and other skill-aware agents.
This is a file editor only; it does not run Git or commands. Pair it with a Git server for history, or browse more version control and developer tools.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| replace_content | Search and replace, literal by default or ECMAScript regex; all matches unless limited to one occurrence. |
| replace_lines | Replace a line span with new content, applying the original line's indentation automatically. |
| delete_lines | Delete a line span including its newline. |
| replace_range | Replace text by line and column positions; a length of zero inserts. |
| multi_replace | Apply many content, line and range edits across files, with coordinates fixed to the pre-call file and per-file all-or-nothing writes. |
| get_content | Find text and return line:column positions, captures and context lines. |
| get_lines | Read lines with line numbers, or raw. |
| get_range | Read a character range with coordinates. |
| multi_get | Perform several reads in one call. |
claude mcp add edit -- /path/to/edit-mcp| Variable | Description | Required |
|---|---|---|
| EDIT_MCP_REPO | Overrides the repository install.sh downloads release binaries from. | Optional |
| EDIT_MCP_VERSION | Pins the release version install.sh installs. | Optional |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Enables applications to provide context for LLMs in a standardized way, separating the concerns of providing context from LLM interaction.
Recipe Finder Ai MCP server. Tools: find recipe, substitute ingredient, plan weekly meals. B...
[Frame0](https://frame0.app/) is a Balsamiq-alternative wireframe tool for modern apps. **Frame0 MCP Server** allows you for creating and modifying
Fetches comments from GitHub Pull Requests, including file paths, line ranges, and replies, using a personal access token.