- Explore MCP Servers
- mcp-codesavant
Mcp Codesavant
What is Mcp Codesavant
mcp-codesavant is a Model Context Protocol (MCP) server designed for code manipulation, execution, and version control. It enables AI assistants to read, write, and execute code while keeping track of changes.
Use cases
Use cases include collaborative coding projects, automated testing environments, educational tools for coding classes, and version-controlled code editing for software development.
How to use
To use mcp-codesavant, clone the repository, install the required dependencies, and configure the server in your Claude Desktop’s config.json file. You can then interact with the server using specific commands to read, write, and execute code.
Key features
Key features include line-specific code reading and writing, execution of multiple programming languages (Python, Node.js), controlled shell command execution, version control for tracking changes, code searching capabilities, and the ability to revert to previous code versions.
Where to use
mcp-codesavant can be used in software development environments, educational settings for learning programming, and any application requiring code execution and management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Codesavant
mcp-codesavant is a Model Context Protocol (MCP) server designed for code manipulation, execution, and version control. It enables AI assistants to read, write, and execute code while keeping track of changes.
Use cases
Use cases include collaborative coding projects, automated testing environments, educational tools for coding classes, and version-controlled code editing for software development.
How to use
To use mcp-codesavant, clone the repository, install the required dependencies, and configure the server in your Claude Desktop’s config.json file. You can then interact with the server using specific commands to read, write, and execute code.
Key features
Key features include line-specific code reading and writing, execution of multiple programming languages (Python, Node.js), controlled shell command execution, version control for tracking changes, code searching capabilities, and the ability to revert to previous code versions.
Where to use
mcp-codesavant can be used in software development environments, educational settings for learning programming, and any application requiring code execution and management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP-CodeSavant
CodeSavant is a WIP project.
CodeSavant is a Model Context Protocol (MCP) server that provides code manipulation, execution, and version control capabilities. It allows AI assistants to read, write, and execute code while maintaining a history of changes.
Features
- Read and write code files with line-specific operations
- Execute code in multiple programming languages (Python, Node.js)
- Execute shell commands in a controlled environment
- Track and manage code changes with version control
- Search within code files
- Revert to previous versions of code
Installation
- Clone the repository:
git clone https://github.com/twolven/mcp-codesavant.git
cd mcp-codesavant
- Install the required dependencies:
pip install -r requirements.txt
- Add the server configuration to your Claude Desktop config.json:
{
"mcpServers": {
"codesavant": {
"command": "python",
"args": [
"path/to/codesavant.py"
]
}
}
}
Directory Structure
The server creates and manages the following directory structure:
workspaces/ ├── project1/ │ ├── .code_history.json │ └── [code files] ├── project2/ │ ├── .code_history.json │ └── [code files] └── ...
Tool Reference
Detailed Usage
1. read_code_file
Read contents of a code file, optionally searching for specific sections.
Response:
2. write_code_file
Write or update specific lines in a code file.
Response:
3. get_code_history
Get change history for a code file.
Response:
4. execute_code_command
Execute a code-related shell command.
Response:
5. execute_code
Execute code in specified language.
Response:
6. revert_to_version
Revert a code file to a specific version.
Response:
7. read_code_file_lines
Read specific lines from a code file.
Response:
Error Handling
The server provides detailed error responses in the following format:
{
"success": false,
"timestamp": 1234567890,
"data": null,
"error": "Error message"
}
Error types include:
CodeFileError: File operation errorsCodeValidationError: Code validation errorsCodeExecutionError: Code execution errors
Language Support
Currently supported languages for code execution:
- Python (using system Python interpreter)
- Node.js (using node command)
Each language execution creates a temporary file in the workspace directory and executes it with appropriate interpreter.
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Todd Wolven - (https://github.com/twolven)
Acknowledgments
- Built with the Model Context Protocol (MCP) by Anthropic
- Developed for use with Anthropic’s Claude
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










