MCP Python Interpreter
Runs Python code and manages Python environments and packages from an agent, inside a working folder.
Test results
No full client pass yetFull result per app: Does it work with Claude Code? · Does it work with Cursor?
Install
claude mcp add mcp-python-interpreter -- uvx mcp-python-interpreter --dir /path/to/dir/pyinterpRun in your terminal. This exact command is what our harness runs in Claude Code; see the results above.
{
"mcpServers": {
"mcp-python-interpreter": {
"command": "uvx",
"args": [
"mcp-python-interpreter",
"--dir",
"/path/to/dir/pyinterp"
]
}
}
}Save as .cursor/mcp.json. This exact config is what our harness runs in Cursor; see the results above.
{
"mcpServers": {
"mcp-python-interpreter": {
"command": "uvx",
"args": [
"mcp-python-interpreter",
"--dir",
"/path/to/dir/pyinterp"
]
}
}
}Add to claude_desktop_config.json and restart Claude Desktop. Tested on the Linux beta; see the results above.
[mcp_servers.mcp-python-interpreter]
command = "uvx"
args = ["mcp-python-interpreter", "--dir", "/path/to/dir/pyinterp"]Add to ~/.codex/config.toml (shared by the ChatGPT (Codex) CLI and the ChatGPT desktop app; Codex runs inside the ChatGPT desktop app). Tested with the ChatGPT (Codex) CLI bundled in the ChatGPT desktop app; see the results above.
Not connecting? Troubleshooting: Claude Code · Cursor · Claude Desktop · ChatGPT (Codex)
Test history
| Date | Check | Result | Version |
|---|---|---|---|
| 2026-10-15 | Protocol (direct stdio) | Protocol: failed | |
| 2026-10-15 | Claude Code | Failed connected, agent task (no successful call to this server's tools; no tool result containing ['42']) | 2.1.296 (Claude Code) |
| 2026-10-15 | Cursor | Failed connected, tools visible, agent task (no successful call to this server's tools; answer missing ['42']; no tool result containing ['42']) | 2026.10.14-941492e |