302_sandbox_mcp
@302ai
About 302_sandbox_mcp
Create a remote sandbox that can execute code/run commands/upload and download files.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"302ai-sandbox-mcp": {
"command": "npx",
"args": [
"-y",
"@302ai/sandbox-mcp"
],
"env": {
"302AI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Tools
9Export files from a sandbox directory or file path to downloadable urls. Supports batch export of multiple directories or files. When exporting directories, only common file formats are included (documents, images, audio, video, compressed files, web files, and programming language files).
Query the list of sandboxes associated with the current API key. If no parameters are passed, all current sandboxes will be returned.
Create a Linux sandbox that can execute code, run commands, upload and download files, and has complete Linux functionality. After successful creation, a sandbox_id will be returned, and all subsequent operations will need to include this sandbox_id to specify the corresponding sandbox. After successful creation, the sandbox will automatically pause. When calling other sandbox operation interfaces later, it will automatically reconnect and pause again after execution to avoid generating extra costs.
Destroy a sandbox by its ID.
Automatically creates a sandbox, executes code, and immediately destroys the sandbox after execution. Optionally exports sandbox files (compresses multiple files into a zip archive if there are multiple files in the specified path, or exports a single file directly). Recommended for use cases that don't require continuous sandbox operations.
Import files from public URLs or base64 data into a sandbox. Supports batch import of multiple files. If the target file already exists, it will be overwritten. If the target directory doesn't exist, it will be automatically created. You must create a sandbox before calling this tool.
Run a command line command on a specific linux sandbox. This returns text output only. For operations that generate files, you'll need to use separate file viewing and download endpoints.
Run code on a specific sandbox. This returns text output only. For operations that generate files, you'll need to use separate file viewing and export endpoints. Default file saving path is /home/user.
List files and directories at specified paths within a sandbox. Supports batch queries with multiple paths. This operation can be used before downloadSandboxFiles to check if the file exists.
Overview
What is 302_sandbox_mcp?
302_sandbox_mcp is an MCP (Model Context Protocol) server that provides a secure code sandbox, enabling AI assistants to safely execute arbitrary code. It offers tools for sandbox management, code execution, file operations, and command-line execution, and supports dynamic tool loading.
How to use 302_sandbox_mcp?
Install the server via the npm package @302ai/sandbox-mcp and configure it with your 302AI_API_KEY in your MCP client (e.g., Claude Desktop, Cherry Studio, or ChatWise). The server can run in stdin mode locally or be hosted as a remote HTTP server.
Key features of 302_sandbox_mcp
- Dynamic loading of tool list from remote server.
- Supports both local stdin and remote HTTP modes.
- Create, list, and destroy isolated sandboxes.
- Execute arbitrary code with one-click or run-code tool.
- Run command-line instructions inside the sandbox.
- Import and export files to and from the sandbox.
Use cases of 302_sandbox_mcp
- Safely executing code generated by an AI assistant.
- Running interactive command-line tasks in a sandboxed environment.
- Transferring files into and out of a secure sandbox for analysis.
- Automating code testing or data processing via MCP-compatible clients.
FAQ from 302_sandbox_mcp
What API key is required?
You need a 302AI_API_KEY, which you can obtain from 302.AI’s API list page.
Which MCP clients are supported?
The server works with Claude Desktop, Cherry Studio, ChatWise, and any MCP-compatible client. Example configurations for each are provided in the README.
How can I debug the server?
Use the MCP Inspector by running npm run inspector after installing dependencies.
What modes does the server support?
It supports two modes: stdin mode for local usage and a remote HTTP server mode for hosted deployments.
Is the tool list fixed or dynamic?
The tool list is dynamically loaded from a remote server, so new tools can be added without updating the client configuration.
More Reasoning MCP servers
AWorld: Advancing Agentic AI
inclusionAISearch, understand, reproduce, and improve an idea with ease
iFlytek Workflow MCP Server
iflytekThis a simple implementation of an MCP server using iFlytek. It enables calling iFlytek workflows through MCP tools.
Emergency Medicare Management MCP Server
manolazemergency-medicare-planner-mcp-server
Agentic Radar
splx-aiA security scanner for your LLM agentic workflows
Agentic MCP Client
peakmojoA standalone agent runner that executes tasks using MCP (Model Context Protocol) tools via Anthropic Claude, AWS BedRock and OpenAI APIs. It enables AI agents to run autonomously in cloud environments and interact with various systems securely.
Comments