Code Sandbox API logo

Code Sandbox API

Run Python, JavaScript, and SQL in a paid sandbox through MCP, with output, errors, timing, and exit status.

Install Code Sandbox API

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://code-sandbox.api.klymax402.com/mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

Code Sandbox API MCP server executes Python, JavaScript, or SQL in a remote sandbox and returns captured output, errors, timing, and an exit code. It exposes the `code_execute_sandbox` MCP tool through a streamable HTTP endpoint and charges per call using x402 payments in USDC on Base. Use it for calculations, transformations, code checks, or in-memory SQLite queries when an agent needs computed results rather than static information.

Use cases

  • Run short Python calculations
  • Validate JavaScript snippets
  • Transform data with code
  • Query temporary SQLite data
  • Check code output and errors

Key features

  • Python, JavaScript, and SQL execution
  • MCP tool over a remote HTTP endpoint
  • Configurable 5–10 second timeout
  • Captured output, errors, timing, and exit code
  • x402 payment with USDC on Base

Tools4

What Code Sandbox API lets your agent do. Expand a tool for its parameters.

Self-reported~52 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

24/26 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit2mo agoMost recent push to the default branch.
Tools exposed4Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Code Sandbox API works

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:

config.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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Code Sandbox API

Code Sandbox API is an MCP server that connects AI clients to a remote sandbox execution API. Its main tool, `code_execute_sandbox`, runs Python, JavaScript, or SQL and returns output, errors, execution time, and an exit code. Calls use x402 payments in USDC on Base without an API key.

Add its remote MCP URL to your client configuration; no local installation is described. Use `https://code-sandbox.api.klymax402.com/mcp` as the server URL, then ensure the client can complete x402 payment in USDC on Base.

Configure the remote `/mcp` URL in Cursor's MCP settings, and provide an x402-capable payment setup for execution calls.

It supports Python, JavaScript, and SQL. Python runs through a subprocess, JavaScript uses evaluation, and SQL runs against an in-memory SQLite database.

Each execution is listed at $0.02. Payment uses the x402 protocol with USDC on Base L2, and the service does not require an API key or signup.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCode Sandbox API AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/code-sandbox-api?style=directory)](https://allmcps.com/mcp/code-sandbox-api)
HTML Embed
<a href="https://allmcps.com/mcp/code-sandbox-api"><img src="https://allmcps.com/api/badge/code-sandbox-api?style=directory" alt="Code Sandbox API on AllMCPs" /></a>