Daytona MCP Python Interpreter

by nkkko
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Daytona MCP Python Interpreter

A Model Context Protocol server that provides Python code execution capabilities in ephemeral Daytona sandbox.

Installation+

  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create and activate virtual environment.

If by any case you have existing env, you should deactivate and remove the virtual environment:

deactivate rm -rf .venv

Create and activate virtual environment:

uv venv source .venv/bin/activate

(On Windows: .venv\Scripts\activate)

  1. Install dependencies:
uv add "mcp[cli]" pydantic python-dotenv daytona-sdk

Development

Run the server directly:

uv run src/daytona_mcp_interpreter/server.py

Or if uv is not found (not in path):

/Users/USER/.local/bin/uv run ~LOCATION/daytona-mcp-interpreter/src/daytona_mcp_interpreter/server.py

NOTE. You can run which uv to get the path to uv.

You can use MCP Inspector to test the server:

npx @modelcontextprotocol/inspector \ uv \ --directory . \ run \ src/daytona_mcp_interpreter/server.py

Tail log:

tail -f /tmp/daytona-interpreter.log

JSON Config file

  1. Configure in Claude Desktop, Windsurf, Cursor or other config file:

Claude Desktop on MacOS config is here: ~/Library/Application Support/Claude/claude_desktop_config.json.

CONFIG:

{ "mcpServers": { "daytona-interpreter": { "command": "/Users/USER/.local/bin/uv", "args": [ "--directory", "/Users/USER/dev/daytona-mcp-interpreter", "run", "src/daytona_mcp_interpreter/server.py" ], "env": { "PYTHONUNBUFFERED": "1", "MCP_DAYTONA_API_KEY": "api_key", "MCP_DAYTONA_API_URL": "api_server_url", "MCP_DAYTONA_TIMEOUT": "30.0", "MCP_VERIFY_SSL": "false", "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" } } } }

On Windows edit %APPDATA%\Claude\claude_desktop_config.json and adjust path.

  1. Restart Claude Desktop
  2. The Python interpreter tool will be available in Claude Desktop

Features

  • Executes Python code in isolated workspaces
  • Captures stdout, stderr, and exit codes
  • Automatic workspace cleanup
  • Secure execution environment
  • Logging for debugging

<a href="https://glama.ai/mcp/servers/hj7jlxkxpk"><img width="380" height="200" src="https://glama.ai/mcp/servers/hj7jlxkxpk/badge" alt="Daytona Python Interpreter MCP server" /></a>

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

A Model Context Protocol server that allows execution of Python code within Daytona workspaces, providing a secure and isolated environment for executing and managing Python scripts.

  1. Installation+
    1. Development
      1. JSON Config file
        1. Features