read_fileLABSCO SUMMARY
The code-analysis tools are what separate this from a plain filesystem server.
Asking which function contains a given line, or listing every function with its signature and line span, answers a structural question without the model reading the whole file first. The context-based patch is the one to reach for when it matters: it matches surrounding lines rather than line numbers, so the edit still lands correctly after the file has shifted.
What it is
A Python file-operations server: reading and writing, glob listing, regex search and replace across files, three kinds of precise patching, code structure analysis, git operations, and the same set against a remote host over SSH.
What you get
- Files —
read_filewith an optional line range,write_file,create_file,delete_file,move_file,copy_file - Directories —
list_fileswith glob patterns and depth control,get_file_infofor metadata - Search and change —
search_fileswith regex support,replace_in_filesacross many files at once,patch_filefor line-based, pattern-based or context-based edits - Code structure —
list_functionsreturns names, signatures, line numbers and docstrings;get_function_at_linefinds the function containing a line;get_code_structureextracts imports, classes and functions;search_functionsmatches functions by name pattern set_project_directoryandget_project_directory, so every later call takes a short relative path- SSH mode — connect with a URL or explicit parameters and every file operation runs on the remote machine, plus upload, download and rsync directory sync
- Git from the same place: status, init, clone, stage, commit, push, pull, log, branches, diff and remotes
Requirements
Install mcp-file-edit with uv or pip and point your client at it. Nothing else for local work; SSH mode takes a connection URL or the host, user and key as separate parameters.
Setup effort
Build from source — clone the repository, then follow the project's own run instructions
USE CASES
Making a precise change without rewriting the file
Patch by surrounding context so the edit survives the file having moved since you last read it.
Renaming something across a codebase
Search with a regex to see every hit first, then run the replacement across the matching files.
Understanding unfamiliar code quickly
Pull the imports, classes and functions with their line spans instead of reading top to bottom.
Editing files on a server you're logged into
Switch to SSH mode and the same read, patch and search tools operate on the remote filesystem, with rsync for whole directories.
32 tools
Listed in project docs. Your client may show a different list.
write_filecreate_filedelete_filemove_filecopy_filelist_filesget_file_infosearch_filesreplace_in_filespatch_fileset_project_directoryget_project_directorylist_functionsget_function_at_lineget_code_structuresearch_functionsssh_uploadssh_downloadssh_syncgit_statusgit_initgit_clonegit_addgit_commitgit_pushgit_pullgit_loggit_branchgit_checkoutgit_diffgit_remoteBEFORE YOU INSTALL
What to know first
Tools you get
32 tools named in the project's documentation.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uv pip install -e .MCP Clients
Claude Desktop
{
"mcpServers": {
"file-edit": {
"command": "uv",
"args": [
"run",
"mcp",
"run",
"<YOUR_PATH_TO_MCP_FILE_EDIT>/server.py"
]
}
}
}