CodeSandbox
MCP server for CodeSandbox SDK
What is CodeSandbox?
CodeSandbox is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for codesandbox sdk
MCP server for CodeSandbox SDK
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server for CodeSandbox SDK
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx codesandboxConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use CodeSandbox
The CodeSandbox MCP server wraps the CodeSandbox SDK and exposes sandbox lifecycle management and filesystem operations as MCP tools. AI clients can create, resume, hibernate, and configure cloud sandbox VMs; read and write files in sandbox filesystems; and manage sessions — enabling fully cloud-based code execution and development workflows without leaving the AI assistant.
Prerequisites
- Node.js 18 or higher and npx available
- A CodeSandbox account at https://codesandbox.io
- A Personal Access Token from CodeSandbox with Sandbox Creation, Read/Edit, VM Manage, and Preview Token Manage scopes
- Claude Desktop or a Cursor installation
- The CODESANDBOX_API_TOKEN environment variable set
Generate a CodeSandbox Personal Access Token
Log in to CodeSandbox, go to Settings > API Tokens, and create a new token. Enable the scopes: Sandbox Creation, Sandbox Read/Edit, VM Manage, and Preview Token Manage.
Verify the package works
Run a quick test to confirm the package installs and the help output is accessible.
npx -y @techlibs/codesandbox-mcp@latest --helpAdd the server to Claude Desktop config
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) and add the CodeSandbox MCP server entry.
{
"mcpServers": {
"codesandbox": {
"command": "npx",
"args": ["-y", "@techlibs/codesandbox-mcp@latest"],
"env": {
"CODESANDBOX_API_TOKEN": "your_personal_access_token_here"
}
}
}
}Optional: enable read-only mode
Add the --read-only flag to the args array to prevent the MCP server from performing any write operations, making it safe for read-only workflows.
{
"mcpServers": {
"codesandbox": {
"command": "npx",
"args": ["-y", "@techlibs/codesandbox-mcp@latest", "--read-only"],
"env": {
"CODESANDBOX_API_TOKEN": "your_personal_access_token_here"
}
}
}
}Restart Claude Desktop and verify
Quit and reopen Claude Desktop. Confirm the codesandbox server appears in the tools panel and try listing available tools.
CodeSandbox Examples
Client configuration
Complete claude_desktop_config.json entry using the @techlibs/codesandbox-mcp npm package.
{
"mcpServers": {
"codesandbox": {
"command": "npx",
"args": ["-y", "@techlibs/codesandbox-mcp@latest"],
"env": {
"CODESANDBOX_API_TOKEN": "your_personal_access_token_here"
}
}
}
}Prompts to try
Example natural language prompts to use with the CodeSandbox MCP server.
- "Create a new CodeSandbox from the React template and start it"
- "List all files in my sandbox's src directory"
- "Read the contents of /workspace/src/App.tsx in sandbox abc123"
- "Write a new file /workspace/src/utils.ts with the following TypeScript code"
- "Hibernate sandbox abc123 to save resources"
- "Get metadata for sandbox abc123 without starting the VM"Troubleshooting CodeSandbox
401 Unauthorized when using sandbox tools
Verify your CODESANDBOX_API_TOKEN is correct and has not expired. Generate a new token in CodeSandbox Settings > API Tokens. Ensure all required scopes (Sandbox Creation, Read/Edit, VM Manage, Preview Token Manage) are enabled on the token.
Sandbox VM fails to start or times out
CodeSandbox VMs may take 30-60 seconds to resume from hibernation. Use resumeSandbox first, then wait before issuing file operations. If consistently failing, check your CodeSandbox plan limits and VM tier availability.
npx cannot find the package or uses a cached old version
Clear the npx cache with npx clear-npx-cache or specify the exact version in args: ["-y", "@techlibs/codesandbox-mcp@latest"]. If behind a corporate proxy, ensure npm registry access is allowed.
Frequently Asked Questions about CodeSandbox
What is CodeSandbox?
CodeSandbox is a Model Context Protocol (MCP) server that mcp server for codesandbox sdk It connects AI assistants to external tools and data sources through a standardized interface.
How do I install CodeSandbox?
Follow the installation instructions on the CodeSandbox GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with CodeSandbox?
CodeSandbox works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is CodeSandbox free to use?
Yes, CodeSandbox is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
CodeSandbox Alternatives — Similar Developer Tools Servers
Looking for alternatives to CodeSandbox? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up CodeSandbox in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use CodeSandbox?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.