- Home
- MCP servers
- Editor
Editor
- python
13
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"danielpodrazka-editor-mcp": {
"command": "editor-mcp",
"args": [],
"env": {
"PROTECTED_PATHS": "*.env,.env*,config*.json,*secret*,/etc/passwd,/home/user/.ssh/id_rsa",
"MAX_SELECT_LINES": "100",
"ENABLE_JS_SYNTAX_CHECK": "0",
"FAIL_ON_JS_SYNTAX_ERROR": "0",
"FAIL_ON_PYTHON_SYNTAX_ERROR": "1"
}
}
}
}You can install and use the Editor MCP to read, edit, and manage text files through a structured, multi-step workflow that preserves context, provides diff previews, and enforces syntax checks for Python and JavaScript/JSX. It’s designed to help you perform precise edits safely and efficiently from an MCP client.
How to use
Set the file you want to work on using an absolute path. Read the entire file with line numbers to understand the full context, then drill into specific sections. Use the multi-step workflow to select lines, preview changes with a diff, and confirm or cancel edits. When you modify Python files, syntax errors will be checked before applying changes; for JavaScript/JSX, syntax checks can be enabled or disabled via environment settings. You can create new files, delete files, and list directory contents to navigate your project.
How to install
Prerequisites you need before installing:
- Python 3.7+
- FastMCP package
- Node.js (for JavaScript/JSX syntax checks, if you plan to edit those files)
- Optional: uvx for streamlined management of MCPs
- Optional: pytest for running tests during development
Step-by-step installation with UVX (recommended)
# Clone the repository containing the Editor MCP
git clone https://github.com/danielpodrazka/editor-mcp.git
cd editor-mcp
# Run the installation script
chmod +x install.sh
./install.sh
Manual installation (UVX or pip-based)
Use UVX to install directly from GitHub, or install from a local clone and then install in editable mode.
# Install directly from GitHub
uvx install git+https://github.com/danielpodrazka/mcp-text-editor.git
# Or install from a local clone
git clone https://github.com/danielpodrazka/mcp-text-editor.git
cd mcp-text-editor
uvx install -e .
Alternative: traditional pip installation
pip install git+https://github.com/danielpodrazka/mcp-text-editor.git
# Or from a local clone
git clone https://github.com/danielpodrazka/mcp-text-editor.git
cd mcp-text-editor
pip install -e .
Legacy requirements flow
uv pip install -r uv.lock
Generating a locked requirements file
uv pip compile requirements.in -o uv.lock
Available tools
set_file
Set the current file to work with by providing an absolute filepath.
skim
Read the entire file with each line prefixed by its line number.
read
Read a specific range of lines from the current file with line numbers.
select
Select a range of lines to prepare for an overwrite operation. Validates against max_select_lines and stores selection for subsequent overwrite.
overwrite
Prepare a diff preview by replacing the selected lines with new content. This is the first step of a two-step edit.
confirm
Apply the pending changes from the overwrite operation.
cancel
Discard pending changes from the overwrite operation.
delete_file
Delete the currently set file.
new_file
Create a new file and set it as the current file; first line is automatically selected for editing.
find_line
Find lines that contain the provided text in the current file.
find_function
Find a function or method definition in Python or JavaScript/JSX files, returning line numbers for the function boundaries.
listdir
List the contents of a directory.
run_tests
Run Python tests with pytest; optional path configuration via set_python_path.