CodeSandbox MCP Server

CodeSandbox MCP Server

codesandbox•bytechlibs

A Model Context Protocol server that exposes CodeSandbox SDK operations as tools for AI agents.

License: Not specified•Runtime: Awaiting documentation review•Category: cloud devops

WHAT IT DOES

  • •Creates, resumes, hibernates, and updates CodeSandbox sandboxes, optionally from a template ID with custom VM settings.
  • •Provides stateless tools where each call performs the SDK operation directly without a server-managed session registry.
  • •Supports read-only mode that disallows mutating tools and defaults sessions to read permission.
  • •Offers filesystem tools to read, list, write, and rename files inside a sandbox.

BEST FOR

  • •AI agents that need to create and manage CodeSandbox sandboxes and VMs programmatically.
  • •Agents performing file operations inside a sandbox with read-only access when needed.

ABOUT CODESANDBOX

CodeSandbox MCP Server is cataloged as an MCP server attributed to techlibs. A Model Context Protocol server that exposes CodeSandbox SDK operations as tools for AI agents. It is categorized under cloud devops. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for CodeSandbox MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server keep session state between calls?

No, all tools are stateless and each call performs the SDK operation directly using only the provided arguments.

What authentication does the server require?

It uses a CodeSandbox personal access token set via the CODESANDBOX_API_TOKEN or CSB_API_KEY environment variable.

上游原版 README

在 GitHub 查看同一版本原文

README.md · c5336fdc5f28 · 采集于 2026-11-13 08:49:43 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

CodeSandbox MCP Server

A Model Context Protocol (MCP) server that exposes CodeSandbox SDK operations as tools for AI agents.

  • Runtime: Node.js 18+
  • Auth: CODESANDBOX_API_TOKEN (or CSB_API_KEY)
  • SDK: Official @codesandbox/sdk

Install / Run

Use via npx in your MCP client config.

Example (Cursor/Claude Desktop mcp.json snippet):

{
  "mcpServers": {
    "codesandbox": {
      "command": "npx",
      "args": [
        "-y",
        "@techlibs/codesandbox-mcp@latest",
        "--read-only"
      ],
      "env": {
        "CODESANDBOX_API_TOKEN": "<your-api-token>"
      }
    }
  }
}

CLI binary name: mcp-server-codesandbox

You can also run directly:

npx -y @techlibs/codesandbox-mcp@latest --help

Flags:

  • --read-only: disallow mutating tools (write/rename) and default sessions to read permission
  • --vm-tier <tier>: default VM tier when creating/resuming
  • --hibernation-timeout <seconds>: default inactivity hibernation timeout
  • --keep-alive: keep sessions active while connected
  • --log-level <error|warn|info|debug>

Tools (Stateless)

All tools are stateless: no server-managed session registry. Each call performs the SDK operation directly using only the provided arguments.

  • createSandbox

    • Description: Create a sandbox (optionally from template id) and optionally start with custom VM settings.
    • Params:
      • privacy (public|private): Privacy of the sandbox.
      • title (string): Optional title.
      • description (string): Optional description.
      • tags (string[]): Up to 10 tags.
      • path (string): Destination folder path inside your workspace.
      • id (string): Template sandbox ID to fork from.
      • ipcountry (string): ISO 3166-1 alpha-2 country hint for VM scheduling.
      • vmTier (string): VM tier (e.g. Pico, Nano, ...). Overrides server default.
      • hibernationTimeoutSeconds (number): Inactivity timeout before VM hibernates.
      • automaticWakeupConfig.http (boolean): Auto-wake on HTTP.
      • automaticWakeupConfig.websocket (boolean): Auto-wake on WebSocket.
  • resumeSandbox

    • Description: Resume (or start) a sandbox VM.
    • Params:
      • sandboxId (string): Target sandbox ID.
  • hibernateSandbox

    • Description: Hibernate a sandbox VM (saves and sleeps the VM).
    • Params:
      • sandboxId (string): Target sandbox ID.
  • getSandboxInfo

    • Description: Get sandbox metadata without starting the VM.
    • Params:
      • sandboxId (string): Sandbox ID to fetch.
  • updateSandbox

    • Description: Update VM settings for a running sandbox.
    • Params:
      • sandboxId (string): Target sandbox ID.
      • vmTier (string): Change VM tier (Pico|Nano|Micro|Small|Medium|Large|XLarge).
      • hibernationTimeoutSeconds (number): Update inactivity hibernation timeout.
  • createSession

    • Description: Create a session for a sandbox (no state is stored server-side).
    • Params:
      • sandboxId (string): Target sandbox ID.
      • sessionId (string, optional): Provide a specific session ID; if omitted a UUID is generated.
      • permission (read|write): Session permission. Use read for safe, non-mutating access.
      • env (Record<string,string>, optional): Environment variables for the session.
      • git (object, optional): Git identity/options for the session creation.
        • provider (string): e.g. "github".
        • username (string, optional)
        • accessToken (string, optional)
        • email (string)
        • name (string, optional)
  • resumeSession

    • Description: Connect to an existing session by sandboxId + sessionId. If the session does not exist, it will be created using the optional parameters.
    • Params:
      • sandboxId (string): Target sandbox ID.
      • sessionId (string): Session identifier to connect to.
      • permission (read|write, optional): Used if creating the session.
      • env (Record<string,string>, optional): Used if creating the session.
  • readFile

    • Description: Read a file from the sandbox filesystem. The tool connects per call using sandboxId + sessionId.
    • Params:
      • sandboxId (string): Target sandbox ID.
      • sessionId (string): Session identifier (created if missing as needed).
      • permission (read|write, optional): Used if creating the session.
      • env (Record<string,string>, optional): Used if creating the session.
      • path (string): Absolute path inside the sandbox filesystem.
      • encoding (utf8|base64, optional): Encoding for the returned content (default utf8).
  • readdir

    • Description: List files and directories at a given path. The tool connects per call using sandboxId + sessionId.
    • Params:
      • sandboxId (string): Target sandbox ID.
      • sessionId (string): Session identifier (created if missing as needed).
      • permission (read|write, optional): Used if creating the session (defaults to read in read-only mode).
      • env (Record<string,string>, optional): Used if creating the session.
      • path (string): Absolute path to list within the sandbox filesystem.
  • writeFile

    • Description: Write a file in the sandbox filesystem. The tool connects per call using sandboxId + sessionId.
    • Params:
      • sandboxId (string): Target sandbox ID.
      • sessionId (string): Session identifier (created if missing as needed). Must allow write.
      • permission (read|write, optional): Used if creating the session (typically write).
      • env (Record<string,string>, optional): Used if creating the session.
      • path (string): Absolute path to the file.
      • content (string): Content to write (encoded per encoding).
      • encoding (utf8|base64, optional): Content encoding (default utf8).
      • overwrite (boolean, optional): Overwrite existing file (default true).
      • create (boolean, optional): Create the file if missing (default true).
  • rename

    • Description: Rename/move a file or directory. The tool connects per call using sandboxId + sessionId.
    • Params:
      • sandboxId (string): Target sandbox ID.
      • sessionId (string): Session identifier (created if missing as needed). Must allow write.
      • permission (read|write, optional): Used if creating the session (typically write).
      • env (Record<string,string>, optional): Used if creating the session.
      • from (string): Source path.
      • to (string): Destination path.
      • overwrite (boolean, optional): Overwrite if destination exists (default true).

Notes:

  • Filesystem operations connect a SandboxClient for the duration of the call and dispose it immediately; no state is retained.
  • Outputs are returned as text blocks (JSON payloads serialized to string) for broad client compatibility.

Development

  • Build: npm run build
  • Dev (stdio): npm run dev (requires token env var)

Environment

  • CODESANDBOX_API_TOKEN (preferred) or CSB_API_KEY: PAT with scopes for Sandbox Creation, Read/Edit, VM Manage, Preview Token Manage.

Limitations

  • This server targets CodeSandbox sandboxes (VMs), not legacy projects.
  • Session resume uses sandbox.connect({ id: sessionId }).

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for CodeSandbox MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/codesandbox)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related cloud devops MCP Servers

Alternative and complementary servers in the same category

View all in cloud devops →
Huawei MCP Server
mcp-server-huaweiclouddeveloper•huaweiclouddeveloper

A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

Repository stats unavailable
Cloud & DevOps
Coolify MCP Server
coolify-mcp-server•wrediam

An MCP server that exposes the Coolify v4.3.1 REST API so AI clients can manage applications, databases, services, servers, deployments, and more.

Repository stats unavailable
Cloud & DevOps

A deprecated Model Context Protocol server for interacting with Kong Konnect APIs, enabling AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.

Repository stats unavailable
Cloud & DevOps