Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

MCP server · Audited from source

Python Interpreter MCP server

by yzfly/mcp-python-interpreterNOASSERTION licenceAudited 7 Oct 2026 · source 858b5910b5f0

PyPI mcp-python-interpreterstdiostreamable-http★ 104
✕BLOCKGrade D · 69/100 · 7 Oct 2026 · 858b591

Is it safe? No — BLOCK, grade D (69/100). It exposes 10 tools: 5 read, 4 write and 1 destructive. The audit recorded 4 findings (0 critical, 2 high, 1 medium, 0 low). Maintainer's description: MCP Python Interpreter: run python code. Python-mcp-server, mcp-python-server, Code Executor

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Python Interpreter MCP server (yzfly/mcp-python-interpreter)”. Retrieved 7 Oct 2026. https://modelsatlas.com/mcp/yzfly/python-interpreter

Why this is BLOCK. The audit found 0 critical and 2 high findings; the most severe is Code injection at mcp_python_interpreter/server.py:97. Each finding is listed below with its file and line.

Why this page is still public. People search for this server by name. Hiding it would leave them with the README's word alone; here they see what the code does. We list it so you can decide, and we do not show connect commands for BLOCK servers.

Trust audit

Audit 0.4.1 · full source read 7 Oct 2026

Trust score69/100✕BLOCK D
0 critical2 high1 medium0 low1 info

4 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.

What the source does

  • FilesystemDeclared1 observation
  • NetworkNone observedNothing seen in the source
  • ShellDeclared2 observations
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Findings (4)

Sorted by severity

HIGHCode injectioncode.eval_exec · mcp_python_interpreter/server.py:97
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
result_value = eval(code, self.locals)
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · mcp_python_interpreter/server.py:102
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
exec(code, self.locals)
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
MEDIUMFilesystem / pathmcp.destructive_tools
F-05 Filesystem / pathCWE-22 · CWE-59Layer L3
clear_session
Why
1 tool(s) can delete or overwrite
Fix
prefer a read-only mode or scoped tokens; the page states the blast radius
INFOSupply chainprompt.pipe_to_shell · README.md:89
F-08 Supply chainCWE-829 · CWE-1357Layer L2
curl -LsSf https://astral.sh/uv/install.sh | sh
Why
No further detail recorded for this rule.
Fix
—

Tools it exposes

10 declared in source · 1 destructive

5 read4 write1 destructive

1 tool can delete or overwrite. An agent that can be talked into calling a tool can be talked into calling this one, so give it a token scoped to what you need.

ToolWhat it doesRisk
clear_sessionNo description in the sourcedestructive
install_packageNo description in the sourcewrite
run_python_codeNo description in the sourcewrite
run_python_fileNo description in the sourcewrite
write_fileNo description in the sourcewrite
list_directoryNo description in the sourceread
list_installed_packagesNo description in the sourceread
list_python_environmentsList all available Python environments (system Python and conda environments).read
list_sessionsList all active REPL sessions.read
read_fileNo description in the sourceread

Safer alternatives

Audit history

  1. ✕BLOCK D 69 / 100

    First audit · 858b5910b5f0

README badge

Badges show the current verdict, BLOCK included

ModelsAtlas: BLOCK DMODELSATLASBLOCK · D

A badge cannot be hidden by the maintainer while the verdict is BLOCK. Fix the findings, push, and the re-audit updates it.

Questions about Python Interpreter MCP server

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.
I already installed Python Interpreter. What should I do?
Remove it from your client's MCP configuration, then rotate any API keys and tokens that were in your environment while it ran.
Can the verdict change?
Yes. The repository is watched and re-audited when its source changes. If the findings are removed the verdict updates, and the history on this page shows it.

Sources

  • yzfly/mcp-python-interpreter on GitHub — the source we read, its licence, stars and activityObserved · 7 Oct 2026
  • ModelsAtlas trust audit — BLOCK verdict for commit 858b5910b5f0Observed · 7 Oct 2026

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.