MCP Python Interpreter not working in Claude Code? Fixes
Failed It failed in our test on Oct 15, 2026. Below is the exact setup we used in Claude Code (2.1.296 (Claude Code)), every error we saw, and what to check, all from our own run log.
Date tested: · From our harness, not the maker’s claims · How we test
1. Use the install config we tested in Claude Code
claude mcp add -s local mcp-python-interpreter -- uvx mcp-python-interpreter --dir /workspace/timmy/harness/sandbox/pyinterpReplace any <YOUR_…> placeholder and local test paths with your own. Every client’s tested snippet is on the MCP Python Interpreter page.
2. Check that Claude Code connects to it
In our run the connect check was failed. Our check output:
mcp-python-interpreter: uvx mcp-python-interpreter --dir /workspace/timmy/harness/sandbox/pyinterp - ✘ Failed to connect — CONNECTION_CLOSED: Connection closedErrors we observed
- agent task: run cell: no successful call to this server's tools; no tool result containing ['42']
Quoted from our run log. Secrets redacted. We list only what we saw.
More help
MCP Python Interpreter: all results and setup · Full Claude Code run · General Claude Code MCP troubleshooting