Make line-based edits to a text file. Each edit replaces exact line sequences.
MCP Edit File Lines MCP server exists for a simple reason — assistants are far more useful when they can act on MCP Edit File Lines directly instead of describing what you should do. Make line-based edits to a text file. Each edit replaces exact line sequences.
A TypeScript-based MCP server that provides tools for making precise line-based edits to text files within allowed directories.
Once MCP Edit File Lines is connected, these are the calls the assistant has available:
get_file_lines — edit_file_lines (dry run)approve_edit — Shows the output of each operationedit_file_lines — Make line-based edits to a file using string or regex pattern matching. Each edit can: - Replace entire lines - Replace specific text matches whilesearch_file — Search a file for text patterns or regular expressions to find specific line numbers and their surrounding context. This tool is particularly usefulTesting — The Testing tool exposed by this serverDebugging — Use the Test Tools script to test the MCP tools directly against sample files. The MCP InspectorSetup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.
You will need one environment variable: MCP_EDIT_STATE_TTL. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. MCP Edit File Lines's toolset — get_file_lines, approve_edit, edit_file_lines and 3 more — is a fair guide to whether it matches your workflow. It is maintained by oakenai; worth a glance at recent repository activity before you build anything load-bearing on it.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| get_file_lines | edit_file_lines (dry run) |
| approve_edit | Shows the output of each operation |
| edit_file_lines | Make line-based edits to a file using string or regex pattern matching. Each edit can: - Replace entire lines - Replace specific text matches while preserving line formatting - Use regex patterns for complex matches - Ha |
| search_file | Search a file for text patterns or regular expressions to find specific line numbers and their surrounding context. This tool is particularly useful for locating the exact lines you want to edit with edit_file_lines. |
| Testing | The Testing tool exposed by this server. |
| Debugging | Use the Test Tools script to test the MCP tools directly against sample files. The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) might help, but it currently does not support handing input that are n |
| Variable | Description | Required |
|---|---|---|
| MCP_EDIT_STATE_TTL | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.