Python InterpreterBLOCK
MCP Python Interpreter: run python code. Python-mcp-server, mcp-python-server, Code Executor
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://mseep.ai/app/yzfly-mcp-python-interpreter)
A Model Context Protocol (MCP) server that allows LLMs to interact with Python environments, read and write files, execute Python code, and manage development workflows.
Features
- Environment Management: List and use different Python environments (system and conda)
- Code Execution: Run Python code or scripts in any available environment
- Package Management: List installed packages and install new ones
- File Operations:
- Read files of any type (text, source code, binary)
- Write text and binary files
- Python Prompts: Templates for common Python tasks like function creation and debugging
Installation
You can install the MCP Python Interpreter using pip:
pip install mcp-python-interpreter
Or with uv:
uv install mcp-python-interpreter
Usage with Claude Desktop
- Install Claude Desktop
- Open Claude Desktop, click on menu, then Settings
- Go to Developer tab and click "Edit Config"
- Add the following to your
claude_desktop_config.json:
{
"mcpServers": {
"mcp-python-interpreter": {
"command": "uvx",
"args": [
"mcp-python-interpreter",
"--dir",
"/path/to/your/work/dir",
"--python-path",
"/path/to/your/python"
],
"env": {
"MCP_ALLOW_SYSTEM_ACCESS": 0
},
}
}
}For Windows:
{
"mcpServers": {
"python-interpreter": {
"command": "uvx",
"args": [
"mcp-python-interpreter",
"--dir",
"C:\\path\\to\\your\\working\\directory",
"--python-path",
"/path/to/your/python"
],
"env": {
"MCP_ALLOW_SYSTEM_ACCESS": "0"
},
}
}
}- Restart Claude Desktop
- You should
858b5910b5f0OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-python-interpreter -- uvx mcp-python-interpreter
{
"mcpServers": {
"mcp-python-interpreter": {
"command": "uvx",
"args": [
"mcp-python-interpreter"
]
}
}
}Exposed tools (10)
5 read · 4 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
clear_session | destructive | |
install_package | write | |
list_directory | read | |
list_installed_packages | read | |
list_python_environments | read | List all available Python environments (system Python and conda environments). |
list_sessions | read | List all active REPL sessions. |
read_file | read | |
run_python_code | write | |
run_python_file | write | |
write_file | write |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- declared (2 observation(s))
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (4)
result_value = eval(code, self.locals)
exec(code, self.locals)
clear_session
curl -LsSf https://astral.sh/uv/install.sh | sh
Gates applied: no_behavioural_pass.
858b5910b5f0full audit observations/trust-audit/mcp-server/yzfly__python-interpreter.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 858b5910b5f0 | BLOCK | D | 69 | first audit |
Questions
What is the Python Interpreter MCP server?
MCP Python Interpreter: run python code. Python-mcp-server, mcp-python-server, Code Executor
What tools does Python Interpreter expose?
10 in total: 5 read-only, 4 that write, and 1 that can delete or overwrite (clear_session). Every one is listed on this page with its risk.
Is Python Interpreter safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Python Interpreter need?
No credential environment variables were found in its source, so it appears to need none.
How does Python Interpreter run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as mcp-python-interpreter.
How current is this page?
The grade is for one exact copy of the source (858b5910b5f0), read on 2026-10-07. The repository is watched and re-audited when it changes.