MCP Server
Connect Cursor, Claude Desktop, and other MCP clients to Leap0 sandboxes via @leap0/mcp.
@leap0/mcp is a Model Context Protocol server for Leap0. It exposes sandbox lifecycle, filesystem, and process tools over stdio so coding agents can create and manage Leap0 sandboxes from their host environment.
Install
npm install -g @leap0/mcppnpm add -g @leap0/mcpyarn global add @leap0/mcpbun add -g @leap0/mcpOr run without a global install:
npx @leap0/mcp --helppnpm dlx @leap0/mcp --helpyarn dlx @leap0/mcp --helpbunx @leap0/mcp --helpAgent configuration
Generate a JSON snippet you can merge into your client's MCP settings:
leap0-mcp --print-configThis prints a mcpServers block using your current node binary and the resolved path to the package's cli.js. Placeholders use ${VAR} so you can rely on the shell or replace them with real values.
- Copy the JSON into your app's MCP config (e.g. Cursor Settings → MCP).
- Ensure
LEAP0_API_KEYis set in the serverenv(or remove the placeholder and set it in your user environment before starting the agent). - Remove or set optional entries (
LEAP0_BASE_URL,LEAP0_SANDBOX_DOMAIN) if you use non-default endpoints. - Restart the editor or MCP host.
On Windows, the printed config includes APPDATA in env so tools resolve user paths correctly.
CLI
| Flag | Meaning |
|---|---|
| (none) | Start the MCP server on stdio (JSON-RPC on stdout only) |
--print-config | Print MCP JSON config to stdout |
--version / -V | Print package version |
--help / -h | Print usage |
Diagnostics and errors go to stderr; MCP traffic uses stdout.
Troubleshooting
Failed to create Leap0 client/ API key errors — SetLEAP0_API_KEYin the MCPenvor in the process environment before launchingleap0-mcp.- 401 / 403 from tools — Key invalid or missing; confirm the key in the Leap0 dashboard and that the same env is visible to the MCP process.
- Connection / timeout errors — Check
LEAP0_BASE_URL, firewall, and that the machine running MCP can reach the API. - Empty or wrong PATH in
--print-config— The printedPATHis taken from the shell that ran the command; adjust in the MCP config ifnodeor other binaries are not found when the editor spawns the server.
Was this page helpful?

