# Daytona MCP for AI Agents MCP

> Daytona manages ephemeral development environments through an MCP. It lets your AI agent orchestrate cloud sandboxes by creating, resizing, stopping, and starting entire dev workspaces on demand. Manage full environment lifecycles—from initial setup to deep debugging—all conversationally.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** sandboxes, dev-environments, workspace-automation, ephemeral-infrastructure, cloud-development

## Description

Need to spin up a fresh coding environment without leaving your chat or IDE? This MCP connects your development workflow directly to Daytona's infrastructure control plane. It lets you treat complex cloud management tasks like simple conversations with your AI agent.

You can provision standardized, temporary sandboxes instantly, giving your team consistent environments for testing and debugging. Need more power? You tell the agent, and it dynamically resizes resources like vCPU or RAM to match your workload requirements. If a sandbox gets into an error state mid-test, you don't restart from scratch; you simply ask the agent to recover it. The process includes full control over persistent storage—you can create volumes, manage snapshots for later use, and even fork existing environments if you need a specific baseline for testing. Because this MCP is hosted on Vinkius, your AI client connects once to access this tool alongside thousands of other enterprise capabilities.

## Tools

### activate_snapshot
Activate a snapshot

### archive_sandbox
Archive a sandbox

### create_api_key
Create a new Daytona API key

### create_sandbox
Create a new Daytona sandbox

### create_snapshot
Create a new snapshot

### create_volume
Create a new volume

### deactivate_snapshot
Deactivate a snapshot

### delete_api_key
Delete an API key by name

### delete_sandbox
Delete a sandbox

### delete_snapshot
Delete a snapshot

### delete_volume
Delete a volume

### fork_sandbox
Fork an existing sandbox

### get_api_key
Get details of a specific API key by name

### get_current_api_key
Get details of the currently authenticated API key

### get_sandbox_preview_url
Get a signed preview URL for a specific port on a sandbox

### get_sandbox
Get details of a specific sandbox

### get_snapshot
Get details of a specific snapshot

### get_volume_by_name
Get details of a specific volume by name

### get_volume
Get details of a specific volume by ID

### list_api_keys
List Daytona API keys

### list_sandboxes_paginated
List all Daytona sandboxes (paginated)

### list_sandboxes
List all Daytona sandboxes

### list_snapshots
List all Daytona snapshots

### list_volumes
List all Daytona volumes

### recover_sandbox
Recover a sandbox from an error state

### resize_sandbox
Resize sandbox resources

### start_sandbox
Start a stopped sandbox

### stop_sandbox
Stop a running sandbox

## Prompt Examples

**Prompt:** 
```
I need a new environment to test the payment gateway. Can you create one with high memory?
```

**Response:** 
```
**Sandbox Provisioning Status:**
✅ Sandbox ID: `dev-payment-03` created successfully.
*   **CPU:** 4 vCPUs (Increased from default)
*   **RAM:** 16GB
*   **Disk:** 50GB
*   **Status:** Running

I recommend running a test suite immediately. Remember to `create_snapshot` before you make major changes.
```

**Prompt:** 
```
The API key for the staging environment seems to be revoked. Can you check my keys?
```

**Response:** 
```
**API Key Inventory**
*   **Key Name:** `staging-api`
*   **Status:** Active
*   **Created By:** Agent (You)
*   **Last Used:** 2 hours ago

I also see an expired key, `legacy-test`, which I recommend deleting to keep your security profile clean. Let me know if you want me to delete it.
```

**Prompt:** 
```
We found a bug in the old user profile service from last week. Can we restore that environment?
```

**Response:** 
```
**Snapshot Restoration Plan:**
*   **Target Snapshot:** `user-profile-20260515`
*   **Status Check:** The snapshot is valid and contains necessary resources.
*   **Action:** I am now initiating the restoration process. This will give you a clean, stable environment exactly as it was on May 15th.
```

## Capabilities

### Provisioning and Scaling Sandboxes
Create new sandboxes, start stopped environments, stop running ones, delete old workspaces, resize resources, or fork existing instances.

### Snapshotting and Restoration
Take point-in-time backups of an environment's state using `create_snapshot`, and then use those snapshots to restore the workspace later via `activate_snapshot`.

### Persistent Storage Management
Create, list, retrieve, and delete volumes (`create_volume`, `get_volume`) ensuring that critical data persists even after the sandbox is terminated.

### Authentication Key Control
Manage all necessary API access tokens by listing, generating (`create_api_key`), or deleting keys to maintain a clean security posture.

## Use Cases

### Debugging a production bug in a safe sandbox
A QA engineer discovers a bug only reproducible on the staging environment. Instead of filing an infrastructure ticket, they ask their agent to `fork_sandbox` from the last known good build and run diagnostic steps immediately.

### Scaling up for seasonal load testing
A development team knows holiday traffic will spike resource usage. They instruct their agent to `list_sandboxes`, identify underpowered ones, and then use the `resize_sandbox` tool across the board before the peak period.

### Reproducing a failure from last month
A developer is debugging an intermittent issue. They ask their agent to find snapshots taken around the time of the error and use `activate_snapshot` to restore a perfect, historical testing environment.

### Cleaning up old development clutter
An ops engineer needs to decommission several old test workspaces. They ask their agent to `list_sandboxes`, identify the targets, and then run `delete_sandbox` on them in bulk, ensuring nothing gets missed.

## Benefits

- Instant debugging environments: Quickly spin up dedicated sandboxes, allowing your agent to run isolated tests without manual infrastructure provisioning.
- State preservation: Never lose progress. Use `create_snapshot` and `activate_snapshot` to save an environment's state right before a risky code change or test suite execution.
- Resource optimization: Stop over-provisioning. The agent can automatically manage your compute by calling `resize_sandbox` when workloads increase, saving costs.
- Zero-downtime debugging: If a sandbox fails mid-test, the agent doesn't quit; it uses `recover_sandbox` to bring the environment back online quickly.
- Full visibility into infrastructure: Use `list_volumes` and `list_snapshots` to get an immediate inventory of all your long-term data stores and backups.

## How It Works

The bottom line is you manage complex dev infrastructure using simple conversation.

1. Subscribe to this MCP on Vinkius and provide your Daytona API Key.
2. Connect your preferred AI client (Claude, Cursor, etc.) to the Vinkius platform.
3. Ask your agent natural language questions like, 'Create a new sandbox with 4GB of RAM for Node.js testing' or 'What are my active development environments?'

## Frequently Asked Questions

**How do I manage development sandboxes with the Daytona MCP for AI Agents?**
You control everything through conversation. You can ask your agent to create a new sandbox, scale its CPU resources up or down, and even take backups (snapshots) of it when you're ready to test something risky.

**Can the Daytona MCP for AI Agents help me debug old code?**
Yes. Instead of trying to replicate a bug manually, your agent can restore an environment from a previous snapshot—say, one from last week—so you have the exact conditions needed for debugging.

**What is the best way to keep my test data safe using Daytona MCP for AI Agents?**
Use persistent volumes. This keeps your core application data separate from the temporary compute environment, guaranteeing that your data survives even if you delete and recreate the sandbox.

**Is the Daytona MCP for AI Agents useful for large teams?**
Absolutely. It allows different team members to work in isolated sandboxes without interfering with each other's setup, ensuring everyone has a clean workspace on demand.

**How do I know if my current sandbox is properly configured?**
You can ask your agent to get the full details of the sandbox. It will return all metadata—CPU, RAM, disk size, and network status—so you always know exactly what resources are allocated.