Provides version control capabilities for tracking and managing code changes, allowing users to revert to previous versions
Enables execution of Node.js code using the node command
Enables execution of Python code through the system Python interpreter
Allows execution of shell commands in a controlled environment
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:
- Install the required dependencies:
- Add the server configuration to your Claude Desktop config.json:
Directory Structure
The server creates and manages the following directory structure:
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:
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
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Provides code manipulation, execution, and version control capabilities. It allows AI assistants to read, write, and execute code while maintaining a history of changes.
Related MCP Servers
- AsecurityAlicenseAqualityShell and file edit capabilities tightly coupled to provide a powerful coding experience. You can work with different modes: architect and code-writer for separate plan and implementation phase. You can get it to invoke any cli command, e.g., compiling, type checking, linting, github cli, pythonLast updated -6543PythonApache 2.0
- -security-license-qualityTransform your local machine into a powerful code command center. Automate file handling, run terminal commands, and leverage AI to enhance your development workflows—all securely and instantly, without cloud latency.Last updated -1PythonMIT License
- -securityFlicense-qualityA powerful interface for extending AI capabilities through remote control, calculations, email operations, knowledge search, and more.Last updated -31Python
- AsecurityAlicenseAqualityProvides comprehensive Git operations as tools for AI assistants and applications. This server enables AI systems to interact with Git repositories, allowing to initialize, fetch, commit, log, status, etc..Last updated -107TypeScriptMIT License