home / mcp / daytona mcp server

Daytona MCP Server

Provides a Python code execution sandbox and tools for code, shell, files, git, and web previews in ephemeral Daytona workspaces.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nibzard-daytona-mcp-interpreter": {
      "command": "/Users/USER/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/USER/dev/daytona-mcp-interpreter",
        "run",
        "src/daytona_mcp_interpreter/server.py"
      ],
      "env": {
        "MCP_VERIFY_SSL": "false",
        "MCP_DAYTONA_TARGET": "eu",
        "MCP_DAYTONA_API_KEY": "YOUR_API_KEY",
        "MCP_DAYTONA_TIMEOUT": "30.0",
        "MCP_DAYTONA_SERVER_URL": "https://app.daytona.io/api"
      }
    }
  }
}

You can run Python code, shell commands, and file operations inside secure, ephemeral Daytona sandboxes through an MCP server. This enables AI assistants to execute tasks in isolated workspaces, manage files, clone repositories, and preview web servers without leaving your environment.

How to use

Connect to the Daytona MCP Interpreter with an MCP client and start issuing actions. You can run Python code in sandboxed environments, execute shell commands, upload or download files, clone Git repositories, and generate web previews for servers running inside Daytona workspaces. All work is performed in temporary sandboxes that are automatically cleaned up after use.

How to install

Prerequisites: you need a runtime to host MCP connections and the necessary tooling to start the Daytona MCP Interpreter. You will also ensure you have access to Daytona authentication via an API key.

# Install the MCP runtime (example: UV) if you don’t have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create and activate a virtual environment for Python dependencies
uv venv
source .venv/bin/activate

# Install required dependencies for the Daytona MCP Interpreter
uv add "mcp[cli]" pydantic python-dotenv "daytona-sdk>=0.10.5"

Configuration and runtime details

Environment variables control how the interpreter authenticates and connects to Daytona. Set these in your environment to enable proper operation.

export MCP_DAYTONA_API_KEY=your_api_key
export MCP_DAYTONA_SERVER_URL=https://app.daytona.io/api
export MCP_DAYTONA_TIMEOUT=180.0
export MCP_DAYTONA_TARGET=eu
export MCP_VERIFY_SSL=false

Start the Daytona MCP Interpreter server

/Users/USER/.local/bin/uv run src/daytona_mcp_interpreter/server.py

Integrate with Claude Desktop

Configure the Daytona MCP server in your MCP client by pointing to the interpreter command and its startup options, then restart the client to enable the Daytona tools.

{
  "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_SERVER_URL": "api_server_url",
        "MCP_DAYTONA_TIMEOUT": "30.0",
        "MCP_VERIFY_SSL": "false",
        "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      }
    }
  }
}

Usage notes and troubleshooting

If you encounter timeouts or SSL verification issues, adjust MCP_DAYTONA_TIMEOUT and MCP_VERIFY_SSL to appropriate values for your environment. Ensure your API key has the necessary permissions to access Daytona resources. Logs can help diagnose startup problems or misconfigurations.

For visibility, monitor log output at the path shown in your environment (for example, a Daytona interpreter log file) to confirm the server is ready and accepting MCP connections.

Available tools

shell_exec

Execute shell commands inside the Daytona workspace with real-time output and access to the sandboxed environment.

file_download

Download files from the Daytona workspace with options for size limits, partial content, text conversion, compression, or forced downloads.

file_upload

Upload text or binary content into the Daytona workspace, with support for base64-encoded data and overwrite control.

git_clone

Clone Git repositories into the Daytona workspace with options for branch, depth, target path, and LFS support.

web_preview

Generate a preview URL for web servers running inside the Daytona workspace.