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.
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
ABP.IO MCP Server
An MCP server for ABP.IO that enables AI models to interact with your ABP applications and framework.
mcp-ssh-sre
An MCP server providing read-only server monitoring tools to AI assistants. Runs predefined diagnostic commands over SSH and passes only the results to the LLM - your server credentials and shell are never exposed.
Accordo MCP Server
Provides dynamic YAML-driven workflow guidance for AI coding agents with structured development workflows, progression control, and decision points.
Azure DevOps
An MCP server for interacting with Azure DevOps agents and queues.
MCP Playground
A demonstration MCP server implementation in Go featuring real-time bidirectional file communication.
MCP Demo Server
A reference implementation of a Model Context Protocol (MCP) server with example tools, prompts, and resources.
MCP Agentic Development Platform
A comprehensive MCP development environment with interactive visualizations, multiple client interfaces, and advanced agentic capabilities.
Figma
Interact with the Figma API to access and manage design files and resources.
Financial Dashboard with AI Agent Integration
A financial dashboard for monitoring and analyzing investment portfolios with AI-powered insights.
Video Agent MCP Server
An MCP server for AI-powered video creation using the FAL AI API.