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.
Verwandte Server
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
OpenAPI2MCP
Converts OpenAPI specifications into MCP tools, enabling AI clients to interact with external APIs seamlessly.
Tauri Development MCP Server
Build, test, and debug mobile and desktop apps with the Tauri framework faster with automated UI interaction, screenshots, DOM state, and console logs from your app under development.
Crates MCP Server
Query Rust crates from crates.io and docs.rs. Search for crates, get info, versions, dependencies, and documentation.
YAPI MCP Server
An MCP server for accessing YAPI interface details, configured via environment variables.
Base MCP Server
An MCP server providing onchain tools for AI applications to interact with the Base Network and Coinbase API.
Remote MCP Server (Authless)
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
NimCP
A powerful, macro-based library for creating Model Context Protocol (MCP) servers in the Nim programming language.
mcp-server template
A template for creating MCP (ModelContextProvider) servers, configurable via environment variables.
App Market Intelligence MCP
Analyze app data from the Apple App Store and Google Play Store for market intelligence and insights.
Stata MCP
Run Stata commands and execute .do files directly from VS Code and Cursor, with AI assistant integration.