302AI_API_KEY
: Your API key for accessing the 302 Sandbox MCP Server.test
. If the Room goes inactive, everything is automatically removed.Tools provided by this Server | Short Description |
---|---|
createSandbox | Create a Linux sandbox that can execute code, run commands, upload and download files, and has complete Linux functionality. |
directRunCode | Automatically creates a sandbox, executes code, and immediately destroys the sandbox after execution. |
downloadSandboxFiles | Export files from a sandbox directory or file path to downloadable URLs. |
killSandbox | Destroy a sandbox by its ID. |
listSandboxFiles | List files and directories at specified paths within a sandbox. |
listSandboxes | Query the list of sandboxes associated with the current API key. |
runCode | Run code on a specific sandbox. |
runCommand | Run a command line command on a specific Linux sandbox. |
writeSandboxFiles | Import files from public URLs or base64 data into a sandbox. |
createSandbox
sandbox_id
will be returned for subsequent operations. The sandbox automatically pauses after creation and between operations to minimize cost.
Parameters:
max_alive_time
(integer
): Maximum alive time in seconds (recommended: 300)envs
(object
, optional): Environment variablesmetadata
(object
, optional): Sandbox metadatasandbox_name
(string
, optional): Custom sandbox namedirectRunCode
code
(string
): Code to executelanguage
(string
): Programming language (default: Python)envs
(object
, optional): Custom environment variablesis_download
(boolean
, optional): Download generated files flagtimeout
(number
, optional): Max execution time in seconds (default: 5)downloadSandboxFiles
path
(string
): Path(s) to exportsandbox_id
(string
): Sandbox IDkillSandbox
sandbox_id
(string
): Sandbox IDlistSandboxFiles
path
(string
)sandbox_id
(string
): Sandbox IDlistSandboxes
sandbox_id
(string
, optional): Filter by sandbox IDsandbox_name
(string
, optional): Filter by sandbox namerunCode
code
(string
): Code to runsandbox_id
(string
): Sandbox IDenvs
(object
, optional): Environment variableslanguage
(string
, optional): Programming language (default: Python)timeout
(integer
, optional): Timeout in secondsrunCommand
cmd
(string
): The command to runsandbox_id
(string
): Sandbox IDenvs
(object
, optional): Environment variablestimeout
(integer
, optional): Timeout in seconds (suggest >120 for installs, etc.)writeSandboxFiles
file_list
(array
): Files to importsandbox_id
(string
): Sandbox ID