Skip to content
MCP server

Edit MCP

Local MCP server and CLI for precise line, range and text edits in files

Pricing
Open source
Platforms
CLI, Linux, macOS
Version
1.0.3
Listing updated
today

Similar MCP servers

About Edit MCP

Edit MCP is an open-source MCP server for developer tools. It is available on CLI, Linux, macOS, API and self-hosted.

The README describes edit-mcp as a single C++17 binary with no runtime dependencies that works both as an MCP server over stdio and as a command-line tool. Its tools target edits by search string, by line numbers, or by character position, so an AI client can change a file without rewriting it wholesale.

Every write supports a dry run that returns a before and after diff. Writes are atomic, CRLF line endings and byte order marks are kept, and binary or non-UTF-8 files are refused. Optional confinement with a root directory limits all paths to one folder, with symlinks resolved.

The project suits developers who run coding agents such as Claude Code, opencode, Codex or pi and want deterministic file edits. The README also ships an agent skill that teaches an agent which tool to pick, and it can be built with make, CMake, or installed from release binaries.

Tools this server provides (9)

Taken from the project documentation; the running server may differ.

replace_content
Search and replace, literal or regex, with all or selected matches.
replace_lines
Replace a span of lines with new content, preserving indentation.
delete_lines
Delete a span of lines including the newline.
replace_range
Replace a character range by line and column position.
multi_replace
Apply many content, line or range edits across files in one call.
get_content
Find text with line and column positions, captures and context lines.
get_lines
Read lines with line numbers.
get_range
Read a character range with coordinates.
multi_get
Run many reads in one call.

What it does

Search and replace edits
Literal or ECMAScript regex replacement with capture groups, limited to the first match or a chosen occurrence.
Line and range edits
Replace or delete line spans and character ranges, with indentation carried over from the surrounding lines.
Batch multi-file edits
Apply several content, line or range edits across files in one call, all-or-nothing per file.
Dry-run diffs
Every write tool can preview changes as a before and after diff before touching the file.
Root directory confinement
The --root option restricts every path the server can touch to one directory.
Agent skill installer
Installs an embedded SKILL.md into Claude Code and Agents skill directories.

Good for

  • Renaming a symbol across several source files in one batch call
  • Inserting or deleting lines in a config file by line number from an agent
  • Previewing a regex refactor with a dry run before applying it
  • Letting an MCP client edit project files while keeping access inside one folder
  • Editing files from a Termux shell on Android using the android-arm64 build

Pricing

Open source

Edit MCP FAQ

Does it need any dependencies to build?

The README says it is one C++17 binary with zero dependencies and no build step beyond make, or it can be built with CMake.

How do I connect it to Claude Code?

The README gives the command claude mcp add edit -- /path/to/edit-mcp, and notes that edit-mcp config prints config for other agents.

Does it preserve line endings and encoding?

The README says CRLF line endings and BOM are preserved and that binary and non-UTF-8 files are refused.

Can it restrict which files an agent can change?

Adding --root to the command confines every path to that directory, with symlinks resolved.

Is Edit MCP free?

Yes. Edit MCP is open source, so you can use and self-host it for free.

What are the best alternatives to Edit MCP?

The closest alternatives to Edit MCP are mcpcut, Agentic MCP, PlugMCP directory, Allmcps Server and Ambit.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.

How AIPoweredBot checks servers