Provides AST (Abstract Syntax Tree) analysis for Python code, enabling detailed code structure examination and manipulation
MCP Code Editor
A FastMCP server providing powerful code editing tools including precise file modifications with diff-based operations, file creation and reading with line numbers, and more tools for code editing workflows.
Features
- Precise file modifications with diff-based operations
- File creation and reading with line numbers
- Project analysis and structure inspection
- AST (Abstract Syntax Tree) analysis for Python code
- Console tools for interactive processes
- Library indexing for external dependencies
- Code definition search and navigation
- No automatic backup files (v0.1.10+) - cleaner file operations without .bak files
Installation
Usage
As a standalone server
As a library
Architecture
The project is structured as follows:
core/
: Core models and utilitiesmodels.py
: Data models for diff operations
tools/
: Tool implementationsfile_operations.py
: File reading, writing, and modification toolsdiff_tools.py
: Diff-based modification toolsproject_tools.py
: Project analysis and structure toolsast_analyzer.py
: AST analysis for Python codeconsole_tools.py
: Interactive console process toolslibrary_indexer.py
: External library indexing tools
Requirements
- Python 3.8+
- fastmcp>=0.1.0
Development
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Run the server:
python main.py
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
A FastMCP server providing powerful code editing tools including precise file modifications with diff-based operations, file creation and reading with line numbers, and more tools for code editing workflows.
Related MCP Servers
- AsecurityAlicenseAqualityTypeScript-based MCP server designed to enhance code editing experiences by providing features such as hover information, code completion, and diagnostics.Last updated -313MIT License
- -securityAlicense-qualityFastMCP is a comprehensive MCP server allowing secure and standardized data and functionality exposure to LLM applications, offering resources, tools, and prompt management for efficient LLM interactions.Last updated -3PythonMIT License
- -securityAlicense-qualityA TypeScript-based MCP server that provides tools for making precise line-based edits to text files within allowed directories.Last updated -18TypeScriptMIT License
- AsecurityAlicenseAqualityAn MCP server that provides tools for reading, writing, and editing files on the local filesystem.Last updated -11,387PythonApache 2.0