execute_python_codeLABSCO SUMMARY
Execution kept in a service you choose, not in your shell.
The server does not run the code itself; it forwards to an interpreter service you host, which is where the sandboxing decisions live. That also means nothing works until that service is up, and moving it is a matter of changing one URL in main.py.
What it is
A one-tool server that forwards Python code to a code-interpreter REST service and returns the complete execution result.
What you get
- Arbitrary Python executed on the interpreter service rather than in your client
- The full result: stdout, stderr, the exit code, and any files the run generated
- An async HTTP client between the server and the interpreter service
- A configurable interpreter endpoint, pointed at a local execute URL out of the box
Requirements
Python 3.11 or higher, uv, and a Python interpreter REST API service listening on a local port. BeeAI Code Interpreter is the one the project names.
Setup effort
One command — uvx python-interpreter-mcp
USE CASES
Checking a snippet actually runs before you rely on it
Execute it and read the real stdout and exit code rather than a prediction of them.
Doing a calculation the model should not do in its head
Send the code, get the computed answer back.
Producing a file from code in the conversation
Run the script and collect the files it generated from the result.
Reading the real error a piece of code throws
Look at the returned stderr and exit code instead of guessing at the traceback.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation. execute_python_code proxies to an external REST interpreter at localhost:50081, which must be running.
Requires
- uvx on PATH
- Python 3.11
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uvx python-interpreter-mcpMCP Clients
Claude Desktop
{
"mcpServers": {
"python-interpreter": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_PYTHON_INTERPRETER_MCP>",
"run",
"main.py"
]
}
}
}