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/Unpublished Servers Configuration
```json "mcpServers": { "python_local": { "command": "uv", "args": [ "--directory", "/path/to/python_local", "run", "python_local" ] } } ```Published Servers Configuration
```json "mcpServers": { "python_local": { "command": "uvx", "args": [ "python_local" ] } } ```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.
Metadata
Release files for iflow-mcp_python-local 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iflow_mcp_python_local-0.1.1.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iflow_mcp_python_local-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.6 kB
Release files / iflow_mcp_python_local-0.1.1.tar.gz
| Download URL | iflow_mcp_python_local-0.1.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6618a4145e7120168fab450bab85fb527b5d65bfa02941539de883eea1a6e6f
|
|
BLAKE2b-256 checksum How to use checksums |
8c571bf7d1e6337331be8c025968064dbb0f4d7646435de7bb4a91a655ec06cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / iflow_mcp_python_local-0.1.1-py3-none-any.whl
| Download URL | iflow_mcp_python_local-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
117176ac8e3c50b77657d3164d978e2d5654bcb197dbc3b85980a739a372b5b5
|
|
BLAKE2b-256 checksum How to use checksums |
d198a4be75f4c386a800da315950100c7948162da404440a8c24424d407b43fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|