mcp-file-edit
A simple MCP server for file system operations, ideal for vide-coding type activities.
claude mcp add --transport stdio patrickomatik-mcp-file-edit uv run mcp run /path/to/mcp-file-edit/server.py
How to use
mcp-file-edit provides a comprehensive set of file system operations via the MCP protocol. It supports reading, writing, creating, deleting, moving, and copying files, as well as directory listing and recursive operations. The server also includes powerful search and replace capabilities using regex patterns, and a patching workflow that supports line-based, pattern-based, and context-based modifications. For code projects, it offers code analysis utilities to extract functions, classes, and overall structure, which can help with quick introspection and documentation generation. Safety features such as path traversal protection and project boundary enforcement help prevent accidental changes outside the working directory, and backups with dry-run and atomic operations help ensure modifications are safe. SSH transfer support and git integration extend its usefulness for remote work and versioned projects.
To use the tools, configure Claude Desktop (or your MCP client) to point to the file-edit server. Typical usage involves setting a project directory to establish a base path, then invoking operations like read_file, write_file, list_files, search_files, and patch_file. The toolset also exposes high-level helpers such as set_project_directory to switch between local and remote workspaces, and list_functions or get_code_structure for code analysis tasks. Remember to enable dry-run mode if you want to preview changes before applying them.
How to install
Prerequisites:
- Python 3.8+ installed on the host machine
- Git installed
- uv (Python package runner) installed or access to a Python environment
Option A: Install via uv (recommended)
- Clone the repository: git clone https://github.com/patrickomatik/mcp-file-edit.git
- Install in editable mode using uv: cd mcp-file-edit uv pip install -e .
Option B: Install via pip
- Clone the repository: git clone https://github.com/patrickomatik/mcp-file-edit.git
- Install in editable mode using pip: cd mcp-file-edit pip install -e .
Option C: Run directly from source (for development)
- Ensure dependencies are installed: uv pip install -e .
- Run the server script as needed via the MCP client configuration (see mcp_config example).
Additional notes
Notes and tips:
- The recommended deployment uses uv to run the Python-based MCP server. The example mcp_config uses the path to your server.py; adjust /path/to/mcp-file-edit/server.py to your actual location.
- If you plan to access the server remotely, consider enabling SSH-based project directories and using ssh:// style paths as described in the SSH support section of the README.
- When applying patches or performing destructive operations, enable backup and dry-run modes to minimize risk.
- Ensure your working directory is properly sandboxed to avoid accidental modifications outside the intended project tree.
- For large codebases, consider enabling depth controls in search operations to improve performance and avoid excessive scanning.
Related MCP Servers
mcp -qdrant
An official Qdrant Model Context Protocol (MCP) server implementation
web-agent-protocol
🌐Web Agent Protocol (WAP) - Record and replay user interactions in the browser with MCP support
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
lc2mcp
Convert LangChain tools to FastMCP tools
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
relace
Unofficial Relace MCP client with AI features. Personal project; not affiliated with or endorsed by Relace