# Edit MCP

> Edit MCP is an open-source MCP server for developer tools. Local MCP server and CLI for precise line, range and text edits in files. It is available on CLI, Linux, macOS, API and self-hosted.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS, API, self-hosted
- **Repository:** https://github.com/fgsidev/edit-mcp
- **MCP Registry name:** io.github.FgsiDev/edit-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

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.

## Features

- **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

## Tools

- `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.

## 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.

## Alternatives

- [mcpcut](https://ai-powered.com/mcp/mcpcut): mcpcut is an open-source MCP server for security.
- [Agentic MCP](https://ai-powered.com/mcp/agentic-mcp): Agentic MCP is an open-source MCP server for developer tools.
- [PlugMCP directory](https://ai-powered.com/mcp/plugmcp-directory): PlugMCP directory is a freemium MCP server for developer tools.
- [Allmcps Server](https://ai-powered.com/mcp/allmcps-server): Allmcps Server is a freemium MCP server for community directories.
- [Ambit](https://ai-powered.com/mcp/ambit): Ambit is an open-source MCP server for developer tools.
- [MobileBuildMCP](https://ai-powered.com/mcp/mobilebuildmcp): MobileBuildMCP is an open-source MCP server for developer tools.
- [Itamos MCP Tools](https://ai-powered.com/mcp/itamos-mcp-tools): Itamos MCP Tools is a free MCP server for developer tools.
- [MCPVetter](https://ai-powered.com/mcp/mcpvetter): MCPVetter is a freemium MCP server for security.

---
Source: https://ai-powered.com/mcp/edit-mcp
