fedit — Claude Code MCP server: editing and setup
A Go-based MCP server for precise file changes, including anchored inserts, replacements, deletion, copying, and moves.
Open on GitHubWhat fedit does
fedit runs targeted file operations from the command line. It can display and search lines, insert text around a match, replace a range, delete content, or move and copy blocks. Locations may be selected with line numbers or text anchors, while -v checks each mutation.
The tool is shipped as a dependency-free Go binary and includes structure mapping for multiple languages. It can extract columns from CSV or TSV files and process large logs with -stream, reading them line by line and writing through a temporary file. The Go install route requires Go itself, so go install will fail until Go is available.
What it helps with
- replace a line range in a configuration file
- insert a block after a matching anchor
- move one function before another block
- extract a column from CSV or TSV data
- rewrite a large log without loading it all
Example prompts for the agent
- Ask the agent to replace lines 30–35 in
server.confwithpatched-block.txt, then verify the edit. - Use fedit to add a rule after
# Custom rulesiniptables.rulesand run the operation with-v. - Find every
ERRORline inhuge.logand change it toWARNwithreplacealland-stream.
How to install fedit
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fedit
How do I install fedit in Claude Code?
Install fedit with go install github.com/amalexico/fedit@latest. Then verify the binary with fedit -file /etc/hostname -op show.
What does fedit do?
It edits files by line number or content anchor. Its operations cover insertion, replacement, deletion, copying, and moving, using the fedit command.
Can fedit process large files?
Yes. Add -stream to find or replaceall to read the file line by line. Output goes through a temporary file before the final rename.