daytona python interpreter.com
daytona python interpreter.com logo

Daytona Python Interpreter

Integrates with Daytona's secure Python execution environment to enable isolated code running and workspace management f...

Created byApr 23, 2025

Daytona MCP Interpreter

A Model Context Protocol server that provides Python code execution capabilities in ephemeral Daytona sandboxes.
![Daytona MCP Server in Claude Desktop](image.png)

Overview

Daytona MCP Interpreter enables AI assistants like Claude to execute Python code and shell commands in secure, isolated environments. It implements the Model Context Protocol (MCP) standard to provide tools for:
  • Python code execution in sandboxed environments
  • Shell command execution
  • File management (upload/download)
  • Git repository cloning
  • Web preview generation for running servers
All execution happens in ephemeral Daytona workspaces that are automatically cleaned up after use.

Installation

  1. Install uv if you haven't already:
  1. Create and activate virtual environment.
If you have an existing env, deactivate and remove it first:
Create and activate a new virtual environment:
(On Windows: `.venv\Scripts\activate`)
  1. Install dependencies:
Note: This project requires daytona-sdk version 0.10.5 or higher. Earlier versions have incompatible FileSystem API.

Environment Variables

Configure these environment variables for proper operation:
  • `MCP_DAYTONA_API_KEY`: Required API key for Daytona authentication
  • `MCP_DAYTONA_SERVER_URL`: Server URL (default: https://app.daytona.io/api)
  • `MCP_DAYTONA_TIMEOUT`: Request timeout in seconds (default: 180.0)
  • `MCP_DAYTONA_TARGET`: Target region (default: eu)
  • `MCP_VERIFY_SSL`: Enable SSL verification (default: false)

Development

Run the server directly:
Or if uv is not in your path:
Use MCP Inspector to test the server:
View logs:

Integration with Claude Desktop

[![Watch the demo video](https://img.youtube.com/vi/26m2MjY8a5c/maxresdefault.jpg)](https://youtu.be/26m2MjY8a5c)
  1. Configure in Claude Desktop (or other MCP-compatible clients):
On MacOS, edit: `~/Library/Application Support/Claude/claude_desktop_config.json` On Windows, edit: `%APPDATA%\Claude\claude_desktop_config.json`
  1. Restart Claude Desktop
  1. The Daytona Python interpreter tools will be available in Claude

Available Tools

Shell Exec

Executes shell commands in the Daytona workspace.

File Download

Downloads files from the Daytona workspace with smart handling for large files.
**Basic Usage:**
**Advanced Usage:**

File Upload

Uploads files to the Daytona workspace. Supports both text and binary files.
**Basic Usage:**
**Advanced Usage:**

Git Clone

Clones a Git repository into the Daytona workspace for analysis and code execution.
**Basic Usage:**
**Advanced Usage:**

Web Preview

Generates a preview URL for web servers running inside the Daytona workspace.
**Basic Usage:**
**Advanced Usage:**
**Example:**
<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> [![smithery badge](https://smithery.ai/badge/@nkkko/daytona-mcp)](https://smithery.ai/server/@nkkko/daytona-mcp)