ND

nibzard/daytona-mcp-interpreter

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

24 stars 6 forks Качество 65 Тренд 10Apache-2.0

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

Обзор

A Model Context Protocol server that provides Python code execution capabilities in ephemeral Daytona sandboxes. 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. 2. Create and activate virtual environment. If you have an existing env, deactivate and remove it first: Create and activate a new virtual environment: Note: This project requires daytona-sdk version 0.10.5 or higher. Earlier versions have incompatible FileSystem API.

README

Показан фрагмент оригинального README. Открыть оригинал.

Daytona MCP Interpreter

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

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:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create and activate virtual environment.

If you have an existing env, deactivate and remove it first:

deactivate
rm -rf .venv

Create and activate a new 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>=0.10.5"

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:

uv run src/daytona_mcp_interpreter/server.py

Or if uv is not in your path:

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

Use MCP Inspector to test the server:

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

View logs:

tail -f /tmp/daytona-interpreter.log

Integration with Claude Desktop

  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

{
    "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",
Открыть полный README на GitHub

Установка

npx @modelcontextprotocol/inspector \
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

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