Python REPL
A Python REPL with persistent sessions and automatic dependency management using uv.
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:
uv run src/python_repl/server.py
Usage with Claude Desktop
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 variablescode: The Python code to executereset: Optional boolean to reset the session
-
list_variables: Show all variables in the current session -
install_package: Install a package from pypi
Examples
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
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.
Servidores relacionados
Alpha Vantage MCP Server
patrocinadorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Random Number
Provides LLMs with essential random generation abilities, built entirely on Python's standard library.
ADT MCP Server
An MCP server for ABAP Development Tools (ADT) that exposes various ABAP repository-read tools over a standardized interface.
Optuna MCP Server
Automate optimization and analysis using Optuna.
Dify MCP HTTP Tools
Fetch and call tools via MCP over HTTP with SSE or Streamable transport. Supports configuration of multiple MCP services.
MCP Code Crosscheck
A server for bias-resistant AI code review using cross-model evaluation.
Floom
Deploy Python functions as web apps. Type hints become UI, API, and shareable links. 32 MCP tools for deploy, run, storage, secrets, scheduling, versioning, and sharing.
vcpkg Package README MCP Server
Fetch comprehensive information about vcpkg packages, including READMEs, metadata, and search results.
SCMCP
A natural language interface for single-cell RNA sequencing (scRNA-Seq) analysis, supporting various modules from IO to enrichment.
MCP Talk Demo Files
A collection of demo files for MCP servers and clients, illustrating various transport protocols and server capabilities using Python.
Browser MCP
Control your real Chrome from Claude Code. 29 tools including CAPTCHA solving, file upload, multi-session, and human-in-the-loop.