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.
相關伺服器
Alpha Vantage MCP Server
贊助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
1MCP
A unified MCP server that aggregates multiple MCP servers into a single endpoint.
MCP Music Analysis
Analyze audio from local files, YouTube, or direct links using librosa.
swarm.at
Settlement protocol that validates agent actions before execution. Guards destructive operations with hash-chained ledger receipts, trust tiers, and 31 workflow blueprints.
Stimulsoft Documentation MCP Server
Official MCP server for Stimulsoft Reports & Dashboards documentation. Semantic search across FAQ, Programming Manual, Server/User Manual, and Server/Cloud API for .NET, WPF, Avalonia, WEB, Blazor, Angular, React, JS, PHP, Java, and Python platforms.
FeedOracle Macro Intelligence
Deterministic macro regime engine for AI trading agents — RISK_ON / NEUTRAL / RISK_OFF / STRESS with transparent scoring rules.
PixelLab
Generate and manipulate pixel art using the PixelLab API.
pyATS
Interact with network devices using Cisco's pyATS and Genie libraries for model-driven automation.
Code Editor
Enables AI assistants to write, edit, and manage code files directly in a specified directory, respecting .gitignore patterns.
SolTracker
Access real-time and historical token, wallet, and trading data from the Solana ecosystem via the Solana Tracker API.
Gwirian
Modern Open source Test Management with MCP Server integration