- Explore MCP Servers
- daytona-mcp
Daytona Mcp
What is Daytona Mcp
Daytona-MCP is an integration of the Model Context Protocol (MCP) for the Daytona SDK, facilitating seamless interaction between MCP clients and Daytona sandbox environments.
Use cases
Use cases for Daytona-MCP include creating and managing development sandboxes, executing code in isolated environments, managing files and directories, and integrating with Git repositories for version control.
How to use
To use Daytona-MCP, install it via npm, yarn, or pnpm, and then initialize a Daytona MCP server using your API key and server URL. You can interact with the server through a standardized interface for managing sandboxes, executing code, and handling files.
Key features
Key features include comprehensive resource exposure for sandboxes and Git repositories, a rich toolset for management and operations, multiple transport options (stdio and HTTP/SSE), performance caching, and full compliance with the MCP specification.
Where to use
Daytona-MCP can be used in software development environments where sandboxing and code execution are required, particularly in testing, CI/CD pipelines, and educational platforms.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Daytona Mcp
Daytona-MCP is an integration of the Model Context Protocol (MCP) for the Daytona SDK, facilitating seamless interaction between MCP clients and Daytona sandbox environments.
Use cases
Use cases for Daytona-MCP include creating and managing development sandboxes, executing code in isolated environments, managing files and directories, and integrating with Git repositories for version control.
How to use
To use Daytona-MCP, install it via npm, yarn, or pnpm, and then initialize a Daytona MCP server using your API key and server URL. You can interact with the server through a standardized interface for managing sandboxes, executing code, and handling files.
Key features
Key features include comprehensive resource exposure for sandboxes and Git repositories, a rich toolset for management and operations, multiple transport options (stdio and HTTP/SSE), performance caching, and full compliance with the MCP specification.
Where to use
Daytona-MCP can be used in software development environments where sandboxing and code execution are required, particularly in testing, CI/CD pipelines, and educational platforms.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Daytona MCP
A Model Context Protocol (MCP) integration for the Daytona SDK, enabling seamless interaction between MCP clients and Daytona sandboxes.
Overview
The Daytona MCP integration allows MCP clients to interact with Daytona sandbox environments through a standardized interface. It bridges the gap between the Model Context Protocol (MCP) and Daytona’s powerful sandbox capabilities.
This integration enables:
- Creating and managing Daytona sandboxes
- Executing code and commands within sandboxes
- Managing files and directories
- Working with Git repositories
- All through the standardized MCP interface
Features
- Comprehensive Resource Exposure: Access sandboxes, files, processes, and Git repositories through MCP resources
- Rich Tool Set: Full suite of tools for sandbox management, code execution, file operations, and Git operations
- Multiple Transport Options: Support for stdio and HTTP/SSE transports
- Caching for Performance: Efficient caching of sandbox instances to improve performance
- Full MCP Compliance: Complete implementation of the MCP specification
Installation
# Install using npm
npm install daytona-mcp
# Install using yarn
yarn add daytona-mcp
# Install using pnpm
pnpm add daytona-mcp
Prerequisites
- Node.js 18 or higher
- Daytona API key (obtain from Daytona Dashboard)
- For HTTP/SSE transport: Express.js
Quick Start
Starting a Daytona MCP Server
import { createDaytonaStdioServer } from 'daytona-mcp';
// Initialize using environment variables
const server = await createDaytonaStdioServer(
{ name: 'MyDaytonaServer', version: '1.0.0' },
{
apiKey: process.env.DAYTONA_API_KEY,
serverUrl: process.env.DAYTONA_SERVER_URL,
target: process.env.DAYTONA_TARGET
}
);
// The server is now running and handling stdio messages
console.log('Daytona MCP server running. Press Ctrl+C to exit.');
Using a Daytona MCP Client
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
import { spawn } from 'child_process';
// Launch the server as a child process
const serverProcess = spawn('node', ['./dist/server.js'], {
stdio: ['pipe', 'pipe', 'pipe']
});
// Initialize MCP client
const client = new Client({ name: 'DaytonaClient', version: '1.0.0' });
// Create a transport connected to the server's stdio
const transport = new StdioClientTransport({
input: serverProcess.stdout,
output: serverProcess.stdin
});
// Connect to the server
await client.connect(transport);
// Create a new sandbox
const createResult = await client.request({
method: 'tools/call',
params: {
name: 'create-sandbox',
arguments: {
language: 'typescript',
resources: {
cpu: 2,
memory: 4
}
}
}
});
// Parse the result to get the sandbox ID
const sandboxInfo = JSON.parse(createResult.content[0].text);
const sandboxId = sandboxInfo.id;
// Execute a command in the sandbox
const execResult = await client.request({
method: 'tools/call',
params: {
name: 'execute-command',
arguments: {
sandboxId,
command: 'echo "Hello from Daytona MCP"',
}
}
});
// Clean up
await client.request({
method: 'tools/call',
params: {
name: 'remove-sandbox',
arguments: { sandboxId }
}
});
Available Resources
| Resource | URI Pattern | Description |
|---|---|---|
| Sandboxes | sandboxes:// |
List all sandboxes |
| Sandbox | sandboxes://{id} |
Get details of a specific sandbox |
| Files | sandbox://{sandboxId}/files/{path*} |
Access files within a sandbox |
| Processes | sandbox://{sandboxId}/processes/{sessionId} |
Access processes/sessions within a sandbox |
| Git | sandbox://{sandboxId}/git/{repoPath*} |
Access Git repository information |
Available Tools
Sandbox Management
create-sandbox: Create a new sandboxget-sandbox: Get a sandbox by IDlist-sandboxes: List all available sandboxesstart-sandbox: Start a stopped sandboxstop-sandbox: Stop a running sandboxremove-sandbox: Remove a sandbox
Code Execution
execute-command: Execute a shell commandrun-code: Run code directlycreate-session: Create a persistent sessionexecute-session-command: Execute a command in a sessiondelete-session: Delete a sessionlist-sessions: List all active sessions
File Operations
list-files: List files in a directorycreate-directory: Create a directorydelete-file: Delete a file or directorymove-file: Move or rename a filefind-in-files: Search for text in filesreplace-in-files: Replace text in filesset-file-permissions: Set file permissions
Git Operations
clone-repository: Clone a Git repositoryget-git-status: Get repository statuslist-branches: List branchesstage-files: Stage files for commitcommit-changes: Commit staged changespull-changes: Pull changes from remotepush-changes: Push changes to remote
Environment Variables
The server can be configured using the following environment variables:
DAYTONA_API_KEY: Your Daytona API keyDAYTONA_SERVER_URL: Daytona server URL (default:https://app.daytona.io/api)DAYTONA_TARGET: Target region for sandboxes (default:us)
Development
-
Clone the repository:
git clone https://github.com/yourusername/daytona-mcp.git cd daytona-mcp -
Install dependencies:
npm install -
Build the project:
npm run build -
Run tests (requires Daytona API key):
# Create a .env file with DAYTONA_API_KEY echo "DAYTONA_API_KEY=your_api_key_here" > .env # Run tests npm test -
Run the example:
npm run example
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










