Edit File Lines MCP Server
@oakenai
About Edit File Lines MCP Server
MCP Server to make line-based edits to a file.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-edit-file-lines": {
"command": "node",
"args": [
"build/index.js",
"<allowed-directory>",
"[additional-directories...]"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Edit File Lines MCP Server?
A TypeScript-based MCP server that provides tools for making precise, line-based edits to text files within allowed directories, using string or regex pattern matching.
How to use Edit File Lines MCP Server?
The server provides tools (edit_file_lines, approve_edit, get_file_lines, search_file) that can be invoked from any MCP client. Edits can be previewed with a dry run, then applied by providing the returned state ID to approve_edit.
Key features of Edit File Lines MCP Server
- Replace entire lines or specific text matches with
edit_file_lines - Use regex patterns for complex multi-line edits
- Dry run mode to preview changes before applying
- Two-step approval workflow with expiring state IDs
- Search files for patterns and inspect lines with context
Use cases of Edit File Lines MCP Server
- Update configuration values in source code files
- Modify component props or JSX structures
- Rename variables or strings across multiple lines
- Safely apply batch edits with preview and approval
- Locate exact line numbers before editing via search
FAQ from Edit File Lines MCP Server
What does the edit_file_lines tool do?
It edits specific line ranges in a file by replacing matched strings or regex patterns, with optional dry run to preview changes.
How do I apply changes after a dry run?
Call the approve_edit tool with the state ID returned by edit_file_lines to commit the modifications.
What happens if a state ID expires?
State IDs expire after a short time; attempting to use an expired or invalid ID returns an error.
What files can I edit with this server?
Only files within allowed directories configured for the server; the README mentions "allowed directories" but does not specify how they are set.
What additional tools are available besides edit_file_lines?
You can use get_file_lines to inspect specific lines with context, and search_file to find lines matching text or regex patterns across the file.
Frequently asked questions
What does the `edit_file_lines` tool do?
It edits specific line ranges in a file by replacing matched strings or regex patterns, with optional dry run to preview changes.
How do I apply changes after a dry run?
Call the `approve_edit` tool with the state ID returned by `edit_file_lines` to commit the modifications.
What happens if a state ID expires?
State IDs expire after a short time; attempting to use an expired or invalid ID returns an error.
What files can I edit with this server?
Only files within allowed directories configured for the server; the README mentions "allowed directories" but does not specify how they are set.
What additional tools are available besides `edit_file_lines`?
You can use `get_file_lines` to inspect specific lines with context, and `search_file` to find lines matching text or regex patterns across the file.
Basic information
More Other MCP servers

Figs, Relationship Expert
Figs O'Sullivan, LMFTCouples therapist Figs O'Sullivan (LMFT, 17 years, endorsed by Sue Johnson, creator of EFT) inside your AI. Ask relationship questions answered from his clinical writing, name the pattern in a fight, get a three-step rep
Blender
ahujasidOpen-source MCP to use Blender with any LLM

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。

Lemon.io
lemon-ioRequest dedicated senior developers to work on your project, write job descriptions, and prep technical interviews — all without leaving your Claude chat. Just describe what you need, and Lemon.io MCP does the rest. 1–3
Comments