Sponsored by Deepsite.site

Daytona

Created By
Daytona8 months ago
Run code in secure remote sandboxes
Content

Daytona MCP (Model Context Protocol) Server

Daytona MCP Server allows AI agents to utilize:

  • Daytona Sandbox Management (Create, Destroy)
  • Execute commands in Daytona Sandboxes
  • File Operations in Daytona sandboxes
  • Generate preview links for web applications running in Daytona Sandboxes

Prerequisites

  • Daytona account
  • Daytona CLI installed
  • A compatible AI agent (Claude Desktop App, Claude Code, Cursor, Windsurf)

Steps to Integrate Daytona MCP Server with an AI Agent

  1. Install the Daytona CLI:

Mac/Linux

brew install daytonaio/cli/daytona

Windows

powershell -Command "irm https://get.daytona.io/windows | iex"
  1. Log in to your Daytona account:
daytona login
  1. Initialize the Daytona MCP server with Claude Desktop/Claude Code/Cursor/Windsurf:
daytona mcp init [claude/cursor/windsurf]
  1. Open Agent App

Integrating with Other AI Agents Apps

Run the following command to get a JSON Daytona MCP configuration which you can c/p to your agent configuration:

daytona mcp config

Command outputs the following:

{
  "mcpServers": {
    "daytona-mcp": {
      "command": "daytona",
      "args": ["mcp", "start"],
      "env": {
        "HOME": "${HOME}",
        "PATH": "${HOME}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin"
      },
      "logFile": "${HOME}/Library/Logs/daytona/daytona-mcp-server.log"
    }
  }
}

Note: if you are running Daytona MCP Server on Windows OS, add the following to the env field of the configuration:

"APPDATA": "${APPDATA}"

Finally, open or restart your AI agent

Available Tools

Sandbox Management

  • create_sandbox: Create a new sandbox with Daytona

    • Parameters:
      • target (default: "us"): Target region of the sandbox
      • image: Image of the sandbox (optional)
      • auto_stop_interval (default: "15"): Auto-stop interval in minutes (0 means disabled)
  • destroy_sandbox: Destroy a sandbox with Daytona

File Operations

  • upload_file: Upload a file to the Daytona sandbox

    • Files can be text or base64-encoded binary content
    • Creates necessary parent directories automatically
    • Files persist during the session and have appropriate permissions
    • Supports overwrite controls and maintains original files formats
    • Parameters:
      • file_path: Path to the file to upload
      • content: Content of the file to upload
      • encoding: Encoding of the file to upload
      • overwrite: Overwrite the file if it already exists
  • download_file: Download a file from the Daytona sandbox

    • Returns file content as text or base64 encoded image
    • Handles special cases like matplotlib plots stored as JSON
    • Parameters:
      • file_path: Path to the file to download
  • create_folder: Create a new folder in the Daytona sandbox

    • Parameters:
      • folder_path: Path to the folder to create
      • mode: Mode of the folder to create (defaults to 0755)
  • get_file_info: Get information about a file in the Daytona workspace

    • Parameters:
      • file_path: Path to the file to get information about
  • list_files: List files in a directory in the Daytona workspace

    • Parameters:
      • path: Path to the directory to list files from (defaults to current directory)
  • move_file: Move or rename a file in the Daytona workspace

    • Parameters:
      • source_path: Source path of the file to move
      • dest_path: Destination path where to move the file
  • delete_file: Delete a file or directory in the Daytona workspace

    • Parameters:
      • file_path: Path to the file or directory to delete

Git Operations

  • git_clone: Clone a Git repository into the Daytona workspace

    • Parameters:
      • url: URL of the Git repository to clone
      • path: Directory to clone the repository into (defaults to current directory)
      • branch: Branch to clone
      • commit_id: Commit ID to clone
      • username: Username to clone the repository with
      • password: Password to clone the repository with

Command Execution

  • execute_command: Execute shell commands in the ephemeral Daytona Linux environment

    • Returns full stdout and stderr output with exit codes
    • Commands have sandbox user permissions
    • Parameters:
      • command: Command to execute

Preview

  • preview_link: Generate accessible preview URLs for web applications running in the Daytona sandbox

    • Creates a secure tunnel to expose local ports externally without configuration
    • Validates if a server is actually running on the specified port
    • Provides diagnostic information for troubleshooting
    • Supports custom descriptions and metadata for better organization of multiple services
    • Parameters:
      • port: Port to expose
      • description: Description of the service
      • check_server: Check if a server is running

Troubleshooting

  • Authentication issues: Run daytona login to refresh your credentials
  • Connection errors: Ensure that the Daytona MCP Server is properly configured
  • Sandbox errors: Check sandbox status with daytona sandbox list

Support

For more information, visit daytona.io or contact support at support@daytona.io.

Server Config

{
  "mcpServers": {
    "daytona-mcp": {
      "command": "daytona",
      "args": [
        "mcp",
        "start"
      ],
      "env": {
        "HOME": "${HOME}",
        "PATH": "${HOME}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin"
      },
      "logFile": "${HOME}/Library/Logs/daytona/daytona-mcp-server.log"
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.