About Python Interpreter
Python Interpreter is an MCP server published by yzfly in the Developer Tools category: mCP Python Interpreter: run python code. Python-mcp-server, mcp-python-server, Code Executor. Conduid read 10 tools from its source: clear_session, install_package, list_directory, list_installed_packages, list_python_environments, list_sessions and 4 more. It is published to PyPI as mcp-python-interpreter and runs with uvx.
The repository has 104 stars and 36 forks, and its last commit was on 1 Nov 2026. Conduid has no tagged release on record for it. It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass No dynamic code execution and Scoped permissions. Its topics include claude-mcp, mcp-python-server, devtools and code.
Install
uvx mcp-python-interpreterpip install mcp-python-interpretergit clone https://github.com/yzfly/mcp-python-interpreterTools (10)
clear_sessionClear a REPL session's state and history.| Parameter | Type | Description |
|---|---|---|
| session_id | string | Session ID to clear |
install_packageInstall a Python package in the specified environment.| Parameter | Type | Description |
|---|---|---|
| environment | string | Name of the Python environment |
| package_name * | string | Name of the package to install |
| timeout | integer | Maximum execution time in seconds |
| upgrade | boolean | Whether to upgrade if already installed |
list_directoryList all Python files in a directory.| Parameter | Type | Description |
|---|---|---|
| directory_path | string | Path to directory (empty for working directory) |
list_installed_packagesList installed packages for a specific Python environment.| Parameter | Type | Description |
|---|---|---|
| environment | string | Name of the Python environment |
list_python_environmentsList all available Python environments (system Python and conda environments).list_sessionsList all active REPL sessions.read_fileRead the content of any file, with size limits for safety.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to the file |
| max_size_kb | integer | Maximum file size to read in KB |
run_python_codeExecute Python code with flexible execution modes.| Parameter | Type | Description |
|---|---|---|
| code * | string | Python code to execute |
| environment | string | Python environment name (only for subprocess mode) |
| execution_mode | string | Execution mode - "inline" (default, fast, in-process) or "subprocess" (isolated) |
| overwrite | boolean | Allow replacing an existing save_as file (default: False) |
| save_as | string | Optional filename to save the code before execution (within --dir by default) |
| session_id | string | Session ID for inline mode to maintain state across executions |
| timeout | integer | Maximum execution time in seconds (only enforced for subprocess mode) |
run_python_fileExecute a Python file (always uses subprocess for file execution).| Parameter | Type | Description |
|---|---|---|
| arguments | array | List of command-line arguments to pass to the script |
| environment | string | Name of the Python environment to use |
| file_path * | string | Path to the Python file to execute |
| timeout | integer | Maximum execution time in seconds (default: 300) |
write_fileWrite content to a file.| Parameter | Type | Description |
|---|---|---|
| content * | string | Content to write |
| file_path * | string | Path to the file to write |
| overwrite | boolean | Whether to overwrite if exists |
Security checks
Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 681 words.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by uv.lock.
- !No dynamic code executionScanned 3 source files and found 2 calls to eval or shell execution, in mcp_python_interpreter/server.py:102 and mcp_python_interpreter/server.py:107. Review how tool inputs reach them before granting credentials.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdio, Streamable HTTP and HTTP with SSEmcp_python_interpreter/main.py:38, mcp_python_interpreter/main.py:123, mcp_python_interpreter/main.py:129
- Starts other programs
- 6 callsmcp_python_interpreter/server.py:167, mcp_python_interpreter/server.py:320, mcp_python_interpreter/server.py:344
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- 3 callsmcp_python_interpreter/server.py:309, mcp_python_interpreter/server.py:565, mcp_python_interpreter/server.py:807
- Lockfile
- uv.lock
Pattern matches on the source text of 3 files: places to read, not proof of what the code does at run time.
README
The repository's README runs to about 681 words, fetched a month ago. The original in the repository is authoritative.
Read full README