File System · Developer Tools

MCP Edit File Lines logo

MCP Edit File Lines

oakenai/mcp-edit-file-lines

A TypeScript-based MCP server that provides tools for making precise line-based edits to text files within allowed directories.

Install

Client configuration

{
  "mcpServers": {
    "edit-file-lines": {
      "command": "node",
      "args": [
        "/path/to/edit-file-lines/build/index.js",
        "<allowed-directory>"
      ],
      "env": {
        "MCP_EDIT_STATE_TTL": "<MCP_EDIT_STATE_TTL>"
      }
    }
  }
}

Environment variables

MCP_EDIT_STATE_TTL
GitHub stars
21
Author
@oakenai
Category
File System, Developer Tools
Updated
Oct 6, 2026

Features

  • Replace entire lines

  • Replace specific text matches while preserving line formatting

  • Use regex patterns for complex matches

  • Handle multiple lines and multiple edits

  • Preview changes with dry run mode

  • Simple String Replacement

  • Multi-line Content with Preserved Structure

  • Complex JSX Structure Modification

  • Configuration Update with Whitespace Preservation

  • Flexible Whitespace Matching

Tools (4)

  • edit_file_lines

    Make line-based edits to a file using string or regex pattern matching.

  • approve_edit

    Apply changes from a previous dry run of edit_file_lines.

  • get_file_lines

    Inspect specific lines in a file with optional context lines.

  • search_file

    Search a file for text patterns or regular expressions to find specific line numbers and their surrounding context.

Details on this page are taken from the project's README. Open README

Supported clients

Clients mentioned in this server's README:

View all
Claude Desktop logo

Claude Desktop

Desktop · Freemium · Proprietary

Anthropic's official Claude AI desktop application. Supports MCP servers to extend functionality.

WindowsMacOS

Related MCP servers

More servers
MCP Filesystem Server logo

MCP Filesystem Server

mark3labs/mcp-filesystem-server

221

This MCP server provides secure access to the local filesystem via the Model Context Protocol (MCP).

File System
mcpsvr logo

mcpsvr

nanbingxyz/mcpsvr

163

A community-driven directory for discovering, reviewing, and contributing MCP servers.

File System
MCP Text Editor logo

MCP Text Editor

tumf/mcp-text-editor

89

A Model Context Protocol (MCP) server that provides line-oriented text file editing capabilities through a standardized API. Optimized for LLM tools with efficient partial file access to minimize token usage.

File System
AiDD (Dev Workflows) logo

AiDD (Dev Workflows)

skydeckai/skydeckai-code

56

An MCP server that provides a comprehensive set of tools for AI-driven development workflows. Features include file system operations, code analysis using tree-sitter for multiple programming languages, code execution, web content fetching with HTML-to-markdown conversion, multi-engine web search, code content searching, and system information retrieval.

File System
Claude MCP Setup logo

Claude MCP Setup

patruff/claude-mcp-setup

45

Greetings, human! You've wisely chosen to surrender control of your computer to an army of helpful Model Context Protocol (MCP) robots. This script will deploy our mechanical minions across your Windows system.

File System
MCP PDF Tools logo

MCP PDF Tools

hanweg/mcp-pdf-tools

37

An MCP (Model Context Protocol) server that provides PDF manipulation tools. This server allows LLMs to perform operations like merging PDFs and extracting pages through the Model Context Protocol.

File System