MCP server
Last updated: 5 December 2026 · @hadronbox/mcp 0.1.0 · API v1 (beta)
The hadronbox MCP server gives an AI client that supports the Model Context Protocol (MCP) hadronbox machines as tools: the agent creates a machine, runs commands in it, reads and writes files. Commands run in the hadronbox machine, not on your computer.
Release status: the commands below work as soon as the
@hadronbox/mcppackage is published on npm. The server runs locally (stdio) and uses the public API with your API key.
Requirements
- Node.js 20 or later (it runs with
npx; nothing else to install). - A scoped API key. Create one on the API keys page of the panel.
Which scopes
The agent uses the key, so give it only the scopes it needs:
The delete_machine tool is not listed by default; it appears when you start the server with --allow-delete (or HADRONBOX_MCP_ALLOW_DELETE=1). All scopes are on the API keys page.
Setup
Claude Code:
claude mcp add hadronbox -e HADRONBOX_API_KEY=$HADRONBOX_API_KEY -- npx -y @hadronbox/mcp
Claude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json or ~/.cursor/mcp.json) use the same format:
{
"mcpServers": {
"hadronbox": {
"command": "npx",
"args": ["-y", "@hadronbox/mcp"],
"env": { "HADRONBOX_API_KEY": "<HADRONBOX_API_KEY>" }
}
}
}
Replace <HADRONBOX_API_KEY> with your own API key. If you put the key in a configuration file, do not commit that file. Environment variables:
Tools
exec waits for the command to finish. The default timeout is 120 seconds, at most 3600 seconds; when it passes, the command is stopped in the machine too. Long output keeps its start and end and is shortened in the middle (20,000 characters by default). Commands get no stdin; for multi-line work the agent first writes a script with write_file.
Errors
Errors come back as tool results the model can read and act on:
- Missing scope (
INSUFFICIENT_SCOPE, 403): names the missing scope and the tool; the agent does not retry and asks you for a key with the right scope. - Command blocked (
COMMAND_BLOCKED, 400): the security scan did not run the command; the blocked part (details.target) and the reason are included. If the part only looks like an address (for example12:00), the command can run from a script file; if the target is really blocked, the agent is told not to look for another way. - Not enough credit (
CREDIT_INSUFFICIENT, 402): shows the balance and the amount needed in TL; it is not retried until the balance is topped up. - Unknown machines, wrong states, rate limits and connection errors also come back with an explanation. All codes: Error codes.
Security and cost
- The agent can do anything the key allows. Use the narrowest key; you can revoke it when the work is done.
- Instructions in a web page or a file can mislead the agent (prompt injection). Turn on the delete tool only when you need it.
- Running machines use credit. The agent calls
pause_machinewhen it is done; idle machines pause automatically anyway.
Examples with agent frameworks (Claude Agent SDK, LangGraph, OpenAI Agents): Agent frameworks.