microsandbox-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@microsandbox-mcprun python3 -c 'print(42)' in a sandbox"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
microsandbox-mcp
Give your AI agents sandboxes. This MCP server connects any AI agent to microsandbox — letting them create fast lightweight sandboxes, execute code, manage files, and monitor resources.
Documentation | npm Package | GitHub
Installation
Run the server with npx -y microsandbox-mcp using stdio transport.
claude mcp add --transport stdio microsandbox -- npx -y microsandbox-mcpAdd to ~/.cursor/mcp.json:
{
"mcpServers": {
"microsandbox": {
"command": "npx",
"args": ["-y", "microsandbox-mcp"]
}
}
}Add to .vscode/mcp.json:
{
"servers": {
"microsandbox": {
"command": "npx",
"args": ["-y", "microsandbox-mcp"]
}
}
}Add to your config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"microsandbox": {
"command": "npx",
"args": ["-y", "microsandbox-mcp"]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"microsandbox": {
"command": "npx",
"args": ["-y", "microsandbox-mcp"]
}
}
}Add to your Zed settings:
{
"context_servers": {
"microsandbox": {
"command": {
"path": "npx",
"args": ["-y", "microsandbox-mcp"]
}
}
}
}For any MCP client that supports stdio transport:
{
"mcpServers": {
"microsandbox": {
"command": "npx",
"args": ["-y", "microsandbox-mcp"]
}
}
}Related MCP server: Code Executor MCP Server
Available Tools
Every tool returns a JSON envelope: { "ok": true, "data": ... } on success or { "ok": false, "error": ... } on failure. Large command output, logs, and file reads are capped by default and include truncation metadata when shortened.
Runtime
Tool | Description |
| Check whether the microsandbox runtime, |
| Install runtime dependencies using the microsandbox SDK installer |
Sandbox Lifecycle
Tool | Description |
| Create an ephemeral sandbox, run a shell command, return output, and remove it |
| Create and boot a persistent sandbox with rootfs, resources, process, mounts, patches, network, secrets, and lifecycle options |
| Start stopped sandboxes by name, labels, or status selector |
| List sandboxes with status, image, labels, and timestamps |
| Show status for one sandbox or a filtered sandbox set |
| Return full configuration and metadata for one sandbox |
| Stop selected sandboxes gracefully or forcefully, with optional timeout |
| Request graceful drain for selected sandboxes |
| Wait until selected sandboxes reach a terminal state |
| Remove selected stopped sandboxes, optionally force-stopping running ones first |
Command Execution
Tool | Description |
| Execute an argv command with env, cwd, user, TTY, timeout, rlimits, stdin, and output caps |
| Execute a shell command string with the same execution controls |
| Start a long-running command and return an in-memory exec session id |
| Poll output events and exit status for an exec session |
| Write UTF-8 or base64 data to an exec session stdin |
| Send |
| Close and forget an exec session |
Logs
Tool | Description |
| Read captured logs with tail, time, source, grep, session id, and output cap filters |
| Poll captured logs using cursors and a bounded follow timeout |
Filesystem
Tool | Description |
| Read a sandbox file as UTF-8 text or base64 bytes |
| Write UTF-8 text or base64 bytes to a sandbox file |
| List sandbox directory entries |
| Create a sandbox directory |
| Remove a sandbox file or directory |
| Copy a file within one sandbox or between two running sandboxes |
| Rename a sandbox file or directory |
| Get sandbox path metadata |
| Check whether a sandbox path exists |
| Copy an allowlisted host path into a sandbox |
| Copy a sandbox path to an allowlisted host destination |
Metrics
Tool | Description |
| Get point-in-time metrics for one running sandbox |
| Get point-in-time metrics for all running sandboxes |
| Collect a bounded number of metrics samples from one sandbox |
Volumes
Tool | Description |
| Create a directory or disk-backed named volume with quota, capacity, and labels |
| List named volumes with kind, quota, capacity, usage, disk format, labels, and timestamps |
| Inspect one named volume |
| Remove one or more named volumes |
| Read a volume file as UTF-8 text or base64 bytes |
| Write UTF-8 text or base64 bytes to a volume file |
| List volume directory entries |
| Create a directory inside a volume |
| Remove a file or directory from a volume |
| Copy a file inside a volume |
| Rename a file or directory inside a volume |
| Get volume path metadata |
| Check whether a volume path exists |
Images
Tool | Description |
| List cached images |
| Inspect cached image config and layers |
| Remove one or more cached images, optionally forced with confirmation |
| Remove cached image artifacts unused by sandboxes, with confirmation |
Snapshots
Tool | Description |
| Create a snapshot from a stopped sandbox by name or explicit host path |
| List indexed snapshots |
| Inspect snapshot metadata by name, digest, or path, optionally verifying integrity |
| Verify recorded snapshot content integrity |
| Remove one or more snapshots, optionally forced with confirmation |
| Rebuild the local snapshot index |
| Export a snapshot to an allowlisted host archive path |
| Import a snapshot archive from an allowlisted host path |
SSH and SFTP
Tool | Description |
| Execute a command through the sandbox SSH subsystem |
| Read a file through sandbox SFTP as UTF-8 text or base64 bytes |
| Write UTF-8 text or base64 bytes through sandbox SFTP |
| Create a directory through sandbox SFTP |
| Remove a file or directory through sandbox SFTP |
| Rename a path through sandbox SFTP |
| Resolve a real path through sandbox SFTP |
| Read a symlink target through sandbox SFTP |
| Create a symlink through sandbox SFTP |
Resources
URI | Description |
| Runtime installation status and MCP configuration |
| Current sandbox inventory |
| Current volume inventory |
| Current image cache inventory |
| Current snapshot index |
| JSON Schema for sandbox creation inputs |
| Effective host path and dangerous-operation policy |
Configuration
Env var | Default | Description |
| current working directory | Colon-separated allowlist for bind mounts, host copy, snapshot import/export, and other host path operations |
|
| Set to |
|
| Enables future dangerous operations; destructive cache operations still require explicit |
|
| Default cap for command output, logs, and file reads |
|
| Default timeout budget for exec-style operations |
|
| Idle TTL for in-memory exec sessions |
| unset | Optional path to the |
| unset | Optional path to |
SDK Gaps
The server intentionally stays a thin TypeScript SDK adapter and does not shell out to msb for core behavior. Image pull/load/save, persistent registry login/logout/list, SSH authorization management, and managed SSH serving are not exposed until the TypeScript SDK provides first-class APIs for them. Command aliases (msb install/msb uninstall) and runtime self-update/uninstall are intentionally out of scope.
Requirements
macOS (Apple Silicon) or Linux (x86_64/ARM64 with KVM support).
Use runtime_check to verify whether msb and libkrunfw are available. Use runtime_install to install them from the MCP server. If that fails, install manually:
curl -fsSL https://install.microsandbox.dev | shDevelopment
git clone https://github.com/superradcompany/microsandbox-mcp.git
cd microsandbox-mcp
npm install
npm run build
npm test
npm run test:e2e
node dist/index.jsnpm run test:e2e launches the built MCP server over stdio and calls every registered tool and resource with live parameters. It creates temporary sandboxes, volumes, snapshots, and host files, then cleans them up. Global image cache deletion is guarded by default; set MICROSANDBOX_MCP_E2E_DESTRUCTIVE_CACHE=1 to let the e2e script run destructive image prune behavior instead of the safe confirmation-error path.
Links
microsandbox — The microVM sandbox runtime
Documentation — Guides and API reference
Agent Skills — Teach agents to use microsandbox without MCP
License
Apache-2.0
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/superradcompany/microsandbox-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server