Python Interpreter MCP
About
An MCP server that provides Python code execution capabilities through a REST API interface.
Details
- Author
- barvhaim
- Categories
- Developer Tools, API
Jump to
Setup
Install Python Interpreter MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/barvhaim/python-interpreter-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server that provides Python code execution capabilities through a REST API interface.
This MCP server exposes a single toolexecute_python_codethat allows AI assistants and other MCP clients to execute Python code remotely. The server acts as a bridge between MCP clients and a Python interpreter REST API service.
- Execute arbitrary Python code through MCP
- Returns complete execution results including stdout, stderr, exit codes, and file outputs
- Built with FastMCP for easy MCP server development
- Async HTTP client for reliable communication with the Python interpreter service
- Python 3.11 or higher
- A Python interpreter REST API service running onlocalhost:50081(such asBeeAI Code Interpreter)
git clone <repository-url> cd python-interpreter-mcp
The server will start and expose theexecute_python_codetool via the MCP protocol.
Add this configuration to your Claude Desktop MCP settings:
{ "mcpServers": { "python-interpreter": { "command": "uv", "args": [ "--directory", "/path/to/python-interpreter-mcp", "run", "main.py" ] } } }
Replace/path/to/python-interpreter-mcpwith the actual path to your project directory.
Executes Python code using a remote interpreter service.
- source_code(string): The Python code to execute
- stdout: Standard output from the Python execution
- stderr: Standard error output (if any)
- exit_code: Exit code of the Python process
- files: Any files generated during execution
# Through an MCP client result = await execute_python_code("print('Hello, World!')") # Returns: {"stdout": "Hello, World!\n", "stderr": "", "exit_code": 0, "files": {}}
The server is configured to connect to a Python interpreter REST API at:
- URL:http://localhost:50081/v1/execute
- Method: POST
- Content-Type: application/json
To use a different interpreter service, modify the URL inmain.py:23.
The server handles various error conditions:
- Request errors: Network connectivity issues
- HTTP errors: API service errors (4xx/5xx responses)
- Timeout errors: Long-running code execution
All errors are returned in the standard response format with appropriate error messages in thestderrfield.
- fastmcp: MCP server framework
- httpx: Async HTTP client for API communication
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Agent-native developer Q&A API with MCP + A2A endpoints for citations, job pickup, and answer submission.
Hosted MCP server and coordination layer for AI coding agents — live API contracts, database schema, frontend/backend mismatch detection, and shared handoff tickets for Claude Code, Cursor, Codex, and Lovable.
A TypeScript framework for building MCP servers with client session handling.
A Grey Hack server for Cursor IDE, providing GitHub code search, Greybel-JS transpilation, API validation, and script generation.
Unified MCP server for Ignite UI — documentation, API, and CLI scaffolding
JCode Harness Cloud is a paid remote MCP endpoint for OpenAI Codex harness MCP. It exposes structured JSON tools, a public server card, token-based access, usage receipts, and audit-ready wo
Interact with Gibson projects to create/update projects, explain database/API interactions, and write code within your IDE.
Turn any codebase into an MCP server with one command. Express & FastAPI → Claude-ready in 3 minutes.
Convert GitHub repositories to MCP servers automatically. Extract tools from OpenAPI, GraphQL & REST APIs for Claude Desktop, Cursor, Windsurf, Cline & VS Code. AI-powered code generation creates type-safe TypeScript/Python MCP servers. Zero config setup - just paste a repo URL. Built for AI assistants & LLM tool integration.
An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





