Fedit logo

Fedit

Go-based MCP file editor for anchored inserts, deletes, replacements, moves, copies, searches, and verified mutations.

Install Fedit

Run the project’s own setup commands, in order.

Setup steps from the project

fedit installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    go install github.com/amalexico/fedit@latest
    

Overview

The fedit MCP server exposes precise file-editing operations for agents working with named files. Its line-aware and content-anchored operations cover inserts, deletes, replacements, moves, copies, searches, and writes, with verification available for mutations. fedit also supports structural mapping for 21 languages, delimited-field extraction, and streaming searches or replacements for very large files. Reach for it when an agent needs predictable scripted edits instead of interactive editor behavior or broad regular-expression manipulation.

Use cases

  • Update deployment and service configuration files at known anchors
  • Replace or remove exact sections in source and documentation files
  • Process multi-gigabyte logs with streaming searches and replacements
  • Extract selected columns from CSV, TSV, and colon-delimited files

Key features

  • Anchored and line-range file mutations
  • Insert, delete, replace, move, and copy operations
  • Verification of replacement results
  • Streaming find and replace for large files
  • Language structure mapping and field extraction

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 63d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars12Stargazers on the source repository.
Last commit25d agoMost recent push to the default branch.

How Fedit works

What fedit MCP server does

fedit MCP server brings fedit's surgical file-editing model to MCP-based agents. It is designed for changes where the target should be explicit: a line range, a matching line, a pair of content anchors, or a named occurrence. The supported editing model includes inserting before or after a match, replacing selected content, deleting content, moving and copying blocks, and writing new data.

The underlying fedit program is a zero-dependency Go command-line tool. It works with paths supplied by the caller and avoids modifying files that were not explicitly named. Mutations can be verified after they are applied, helping an automation workflow detect an unsuccessful change rather than continuing silently.

How it works

Operations can target absolute or relative line positions, matching text, or structural boundaries. A search can first locate matching lines and provide occurrence information for a later targeted edit. Occurrence selection supports choosing a particular match, including the last one, which is useful when the same marker appears repeatedly in a configuration file.

For larger inputs, streaming mode processes data line by line. It supports find and replaceall, including literal and regular-expression replacement, without loading the complete file into memory. Streaming writes use a temporary file followed by a rename, preserving the original if processing is interrupted. The streaming path supports lines up to a 10 MB buffer.

The map operation displays file structure for 21 supported languages. fields extracts a selected column from delimited data and always streams its output; tab is the default delimiter, with alternatives such as commas or colons available through configuration.

Setup and configuration

Install the standalone binary with Go:

bash
go install github.com/amalexico/fedit@latest

Alternatively, download a binary from the project's GitHub Releases and place it on PATH. A basic installation check is:

bash
fedit -file /etc/hostname -op show

The command-line interface uses -file to identify the input, -op to select an operation, and operation-specific flags such as -line, -end, -match, -text, and -v. Multiple files can be supplied as a comma-separated list or glob, and a destination can be used for cross-file copy, move, and replace operations.

Tools and capabilities

  • Display complete files or selected line ranges.
  • Find lines containing a substring and use match occurrences as edit targets.
  • Insert content before or after line or content anchors.
  • Replace or delete line ranges and anchored sections.
  • Move and copy blocks, including cross-file operations.
  • Perform global literal or regular-expression replacements.
  • Write literal text, raw backslashes, file contents, or hex-encoded input.
  • Extract delimited columns for shell pipelines.
  • Map the structure of supported programming-language files.
  • Verify mutations and report replacement verification status.

Limitations and notes

Streaming mode is limited to find and replaceall; move, copy, and map require the full file structure in memory. Lines shorter than the requested field number are skipped during field extraction. The raw writer treats sequences such as \\n as literal backslash and n characters rather than expanding them into newlines. Interactive line entry is available through the CLI's writelines operation, while MCP workflows are better suited to supplying explicit content and anchors.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Fedit

fedit is an MCP server that connects AI agents to named files and provides precise editing tools for inserting, deleting, replacing, moving, and copying content. It also supports searches, verified mutations, structural mapping for 21 languages, delimited-field extraction, and streaming find or replace operations for large files.

Install the fedit binary with `go install github.com/amalexico/fedit@latest`. You can also download a binary from GitHub Releases and place it on your `PATH`; verify the installation with `fedit -file /etc/hostname -op show`.

Yes. Use content matches and anchor ranges to locate sections, or select a specific occurrence with an occurrence index. Insert, replace, move, and copy operations can target matching content rather than fixed line positions.

Yes, for streaming `find` and `replaceall` operations. Streaming processes files line by line, supports literal and regular-expression replacement, and writes through a temporary file before renaming it into place.

Replacement operations re-read the written file and report whether verification passed or failed. The command can also print context around changed matches with `-v`; streamed replacements retain verification while omitting that context output.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFedit AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/fedit?style=directory)](https://allmcps.com/mcp/fedit)
HTML Embed
<a href="https://allmcps.com/mcp/fedit"><img src="https://allmcps.com/api/badge/fedit?style=directory" alt="Fedit on AllMCPs" /></a>