mcpField
3
302_sandbox_mcp

302_sandbox_mcp

FeaturedLocal
github.com/302aiAI & Agents21Updated 66w ago

About 302_sandbox_mcp

302 Sandbox MCP is an MCP server that provides a remote code sandbox for AI assistants to run arbitrary code. It also supports running commands and transferring files, and can be configured in clients such as Claude Desktop via npx.

Key features

  1. 01Remote code sandbox
  2. 02Code execution and command line runs
  3. 03Create, list and destroy sandboxes
  4. 04Import and export sandbox files
  5. 05Query file information at a path
  6. 06Tool list updated dynamically from remote server

Use cases

  1. 01Letting an AI assistant run generated code in an isolated environment
  2. 02Running command line tasks in a sandbox and reading the output
  3. 03Moving files between a sandbox and the local machine

MCP support

This project is an MCP server that exposes tools for creating sandboxes, executing code, running commands and transferring files to MCP clients. It runs in local stdio mode or can be hosted as a remote HTTP server.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"302_sandbox_mcp": {
"command": "npx",
"args": [
"-y",
"@302ai/sandbox-mcp"
],
"env": {
"302AI_API_KEY": "<302AI_API_KEY>"
}
}
}
}
Run commandnpx -y @302ai/sandbox-mcp
Environment variables to set
302AI_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@302ai/sandbox-mcp

Tools

9

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
pathanyYesPath(s) to export from the sandbox.
sandbox_idstringYesThe ID of the sandbox to export files from

Details

From the project README

🤖 302AI Sandbox MCP Server🚀✨

An MCP service with code sandbox that allows AI assistants to safely execute arbitrary code.

README image

中文 | English | 日本語

README image

Previews

Here are some usage examples

README image

README image

Here is the list of supported tools

README image

✨ Features ✨

  • 🔧 Dynamic Loading - Automatically update tool list from remote server.
  • 🌐 Multi modes supported, you can use stdin mode locally, or host it as a remote HTTP server

🚀 Tool List

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "302ai-sandbox-mcp": {
      "command": "npx",
      "args": ["-y", "@302ai/sandbox-mcp"],
      "env": {
        "302AI_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

To use with Cherry Studio, add the server config:

{
  "mcpServers": {
    "Li2ZXXJkvhAALyKOFeO4N": {
      "name": "302ai-sandbox-mcp",
      "description": "",
      "isActive": true,
      "registryUrl": "",
      "command": "npx",
      "args": [
        "-y",
        "@302ai/[email protected]"
      ],
      "env": {
        "302AI_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

To use with ChatWise, copy the following content to clipboard

{
  "mcpServers": {
    "302ai-sandbox-mcp": {
      "command": "npx",
      "args": ["-y", "@302ai/sandbox-mcp"],
      "env": {
        "302AI_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Go to Settings -> Tools -> Add button -> Select Import from Clipboard README image

Find Your 302AI_API_KEY here

Using Tutorials

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

✨ About 302.AI ✨

302.AI is an enterprise-oriented AI application platform that offers pay-as-you-go services, ready-to-use solutions, and an open-source ecosystem.✨

  1. 🧠 Integrates the latest and most comprehensive AI capabilities and brands, including but not limited to language models, image models, voice models, and video models.
  2. 🚀 Develops deep applications based on foundation models - we develop real AI products, not just simple chatbots
  3. 💰 Zero monthly fee, all features are pay-per-use, fully open, achieving truly low barriers with high potential.
  4. 🛠 Powerful management backend for teams and SMEs - one person manages, many people use.
  5. 🔗 All AI capabilities provide API access, all tools are open source and customizable (in progress).
  6. 💡 Strong development team, launching 2-3 new applications weekly, products updated daily. Developers interested in joining are welcome to contact us.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.