A Python REPL with persistent sessions and automatic dependency management using uv.
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.
No setup needed! The project uses uv
for dependency management.
Simply run:
uv run src/python_repl/server.py
Add this configuration to your Claude Desktop config file:
{
"mcpServers": {
"python-repl": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/python-repl-server",
"run",
"mcp_python"
]
}
}
}
The server provides three tools:
execute_python
: Execute Python code with persistent variables
code
: The Python code to executereset
: Optional boolean to reset the sessionlist_variables
: Show all variables in the current session
install_package
: Install a package from pypi
Set a variable:
a = 42
Use the variable:
print(f"The value is {a}")
List all variables:
# Use the list_variables tool
Reset the session:
# Use execute_python with reset=true
Contributions are welcome! Please feel free to submit a Pull Request. Here are some ways you can contribute:
Before submitting a PR, please ensure:
For major changes, please open an issue first to discuss what you would like to change.
Generate MCP servers using Smithery with Cursor IDE integration.
Extracts images from files, URLs, or base64 strings and converts them to base64 for LLM analysis.
Up-to-date Docs For Any Cursor Prompt
Create and modify wireframes in the Frame0 app through natural language prompts.
Interact with your MLOps and LLMOps pipelines through your ZenML MCP server
A command-line interface wrapper for the Google Gemini API, enabling interaction with Gemini's Search and Chat tools.
Access DevRev's APIs to manage work items, parts, search, and user information.
Enables IDEs like Cursor and Windsurf to analyze large codebases using Gemini's 1M context window.
Enable AI Agents to fix Playwright test failures reported to Currents.
Arbitrary code execution and tool-use platform for LLMs by Riza