# Code Sandbox API [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/Br0ski777/code-sandbox-x402  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/code-sandbox-api

## Description
Execute Python, JavaScript, SQL code in a sandbox. x402 micropayment.

## Tools
Capabilities this server exposes over MCP:

- **code_execute_sandbox** — Execute code in a sandboxed environment
- **code** — The code to execute
- **language** — Programming language: python, javascript, or sql
- **timeout** — Execution timeout in milliseconds (default: 5000, max: 10000)

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "code-sandbox-api": {
    "url": "https://code-sandbox.api.klymax402.com/mcp"
  }
}
```

## Documentation

## What Code Sandbox API does

The Code Sandbox API MCP server gives an MCP client one tool for running Python, JavaScript, and SQL without requiring a local runtime. The tool accepts source code, a language selection, and an optional timeout. Its response includes captured standard output, the selected language, execution duration, process exit status, and an error value when execution fails.

Python runs through a subprocess, JavaScript uses evaluation, and SQL runs against an in-memory SQLite database. The service is suited to short calculations, data transformations, snippet validation, and temporary database queries. It is not presented as a persistent database or a general application hosting environment.

## How it works

The server is available at `https://code-sandbox.api.klymax402.com/mcp`. An MCP-compatible client sends a tool call to the remote endpoint. The `code_execute_sandbox` operation executes the submitted source in the requested language and returns a structured result.

Calls use x402 pay-per-request authorization rather than an API key or account signup. The listed price is $0.02 per execution. Payment uses USDC on Base L2 (`eip155:8453`), with Coinbase CDP listed as the primary facilitator and PayAI as a fallback. x402-aware clients can handle the payment challenge and retry flow.

## Setup and configuration

Add the remote MCP URL to the client configuration:

```json
{
  "mcpServers": {
    "code-sandbox": {
      "url": "https://code-sandbox.api.klymax402.com/mcp"
    }
  }
}
```

No API key or signup is required, but the calling setup must be able to complete x402 payment with USDC on Base. The service can also be called over HTTP at `/api/execute` by an x402-aware client.

## Tools and capabilities

`code_execute_sandbox` accepts:

- `code`: required source code string.
- `language`: required value of `python`, `javascript`, or `sql`.
- `timeout`: optional execution limit in milliseconds. The default is 5,000 milliseconds and the maximum is 10,000 milliseconds.

A successful response can contain stdout, the executed language, elapsed time, an exit code of zero, and a null error. Output is capped at 10 KB. The tool supports Python subprocess execution, JavaScript evaluation, and SQL queries against in-memory SQLite.

## Limitations and notes

The Code Sandbox API MCP server limits execution time to 10 seconds and returned output to 10 KB. SQL operates on an in-memory SQLite database, so the material does not describe persistent storage.

Each call has a listed cost of $0.02 and requires x402 payment in USDC on Base. Clients without x402 handling may need to implement the 402 challenge, signing, and retry sequence themselves. ATXP is listed as another access route through an OAuth-wrapped x402 flow.

_Full upstream README: https://allmcps.com/mcp/code-sandbox-api/readme_

