Python REPL MCP Server
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Integrations
Python REPL MCP Server
This MCP server provides a Python REPL (Read-Eval-Print Loop) as a tool. It allows execution of Python code through the MCP protocol with a persistent session.
Setup
No setup needed! The project uses uv
for dependency management.
Running the Server
Simply run:
Usage with Claude Desktop
Add this configuration to your Claude Desktop config file:
The server provides three tools:
execute_python
: Execute Python code with persistent variablescode
: The Python code to executereset
: Optional boolean to reset the session
list_variables
: Show all variables in the current sessioninstall_package
: Install a package from pypi
Examples
Set a variable:
Use the variable:
List all variables:
Reset the session:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. Here are some ways you can contribute:
- Report bugs
- Suggest new features
- Improve documentation
- Add test cases
- Submit code improvements
Before submitting a PR, please ensure:
- Your code follows the existing style
- You've updated documentation as needed
- Maybe write some tests?
For major changes, please open an issue first to discuss what you would like to change.
You must be authenticated.
A server that provides a persistent Python REPL environment through the MCP protocol, allowing execution of Python code, variable management, and package installation.