apps/docs/src/content/docs/en/mcp.mdx
import { TabItem, Tabs } from '@astrojs/starlight/components'
Daytona Model Context Protocol (MCP) server enables AI agents to interact with Daytona Sandboxes programmatically. This guide covers how to set up and use the MCP server with various AI agents.
Install the Daytona CLI to manage the MCP server.
<Tabs syncKey="os"> <TabItem label="Mac/Linux">brew install daytonaio/cli/daytona
powershell -Command "irm https://get.daytona.io/windows | iex"
Authenticate with Daytona to enable MCP server access.
<Tabs> <TabItem label="CLI" icon="seti:shell">daytona login
Daytona provides methods to initialize the MCP server with your preferred AI agent. Supported agents include Claude, Cursor, and Windsurf.
<Tabs> <TabItem label="CLI" icon="seti:shell"># Initialize with Claude
daytona mcp init claude
# Initialize with Cursor
daytona mcp init cursor
# Initialize with Windsurf
daytona mcp init windsurf
After initialization, open your AI agent application to begin using Daytona features.
Daytona provides methods to generate MCP configuration for integration with other AI agents.
<Tabs> <TabItem label="CLI" icon="seti:shell">daytona mcp config
This command outputs a JSON configuration that you can copy into your agent's settings:
{
"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
For Windows users, add the following to the env field:
"APPDATA": "${APPDATA}"
:::
Daytona provides methods to manually start the MCP server.
<Tabs> <TabItem label="CLI" icon="seti:shell">daytona mcp start
Daytona MCP server provides the following tools for interacting with Daytona Sandboxes:
To troubleshoot issues with the Daytona MCP server, try the following:
daytona login to refresh credentialsdaytona list to check sandbox statusIf the issue persists, contact [email protected].