Daytona MCP Python Interpreter

Daytona MCP Python Interpreter

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

<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>

Installation

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

To deactivate and remove the virtual environment if it exists already:

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 use MCP Inspector:

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

Tail log:

tail -f /tmp/daytona-interpreter.log

Usage with Claude Desktop

  1. Configure in Claude Desktop config file:

On MacOS (~/Library/Application Support/Claude/claude_desktop_config.json):

{ "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.

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

  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

You must be authenticated.

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. Usage with Claude Desktop
        1. Features