Python REPL▌

by alec2435
Use our online run python code tool to execute Python code online in an interactive REPL environment. Maintain session s
Provides an interactive Python REPL environment for executing code within conversations, maintaining separate state for each session and supporting both expressions and statements.
best for
- / Data analysis and exploration
- / Testing Python code snippets
- / Interactive programming assistance
- / Educational coding sessions
capabilities
- / Execute Python code snippets
- / Maintain persistent session state
- / Capture stdout and stderr output
- / View session execution history
- / Run both expressions and statements
- / Manage multiple separate sessions
what it does
Runs Python code interactively within conversations, maintaining separate session state so variables and imports persist across executions.
about
Python REPL is a community-built MCP server published by alec2435 that provides AI assistants with tools and capabilities via the Model Context Protocol. Use our online run python code tool to execute Python code online in an interactive REPL environment. Maintain session s It is categorized under developer tools.
how to install
You can install Python REPL in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Python REPL is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
python_local MCP Server
An MCP Server that provides an interactive Python REPL (Read-Eval-Print Loop) environment.
Components
Resources
The server provides access to REPL session history:
- Custom
repl://URI scheme for accessing session history - Each session's history can be viewed as a text/plain resource
- History shows input code and corresponding output for each execution
Tools
The server implements one tool:
python_repl: Executes Python code in a persistent session- Takes
code(Python code to execute) andsession_idas required arguments - Maintains separate state for each session
- Supports both expressions and statements
- Captures and returns stdout/stderr output
- Takes
Configuration
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/python_local run python-local
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
FAQ
- What is the Python REPL MCP server?
- Python REPL is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Python REPL?
- This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
Ratings
4.5★★★★★10 reviews- ★★★★★Shikha Mishra· Oct 10, 2024
Python REPL is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Piyush G· Sep 9, 2024
We evaluated Python REPL against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Chaitanya Patil· Aug 8, 2024
Useful MCP listing: Python REPL is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Sakshi Patil· Jul 7, 2024
Python REPL reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Ganesh Mohane· Jun 6, 2024
I recommend Python REPL for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Oshnikdeep· May 5, 2024
Strong directory entry: Python REPL surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Dhruvi Jain· Apr 4, 2024
Python REPL has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Rahul Santra· Mar 3, 2024
According to our notes, Python REPL benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Pratham Ware· Feb 2, 2024
We wired Python REPL into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Yash Thakker· Jan 1, 2024
Python REPL is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.