SDKs & MCP.

Two MCP servers — 453 hosted cloud tools and 190 local host tools — plus TypeScript, Python, and Rust SDKs sharing one schema and declarative design vocabulary.

Choosing a surface

you want an agent or script to…use
learn CommandAGI's plain files and safety rules automaticallythe skill: SKILL.md
access Drives, threads, sites, semantic search, and paired hosts from anywherethe hosted MCP server (453 tools)
control attached machines, local folders, CLI agents, and local CAD/FEA/EDAthe local MCP relay (190 tools via commandagi mcp)
drive threads, simulated worlds, 3D kernels, and code documents in codethe TypeScript, Python, or Rust SDK

All surfaces verify a principal credential and honor explicit standing grants (Threads & standing grants).

The skill

One command installs SKILL.md into Claude Code, Codex, Cursor, and compatible Agent Skills clients:

shell
npx skills add https://commandagi.com

This fetches /.well-known/agent-skills/commandagi/SKILL.md. Re-run to refresh.

Hosted MCP server

https://api.commandagi.com/mcp speaks Streamable HTTP with stateless JSON responses. OAuth 2.0 PKCE clients discover authorization metadata automatically from the 401 challenge (add the URL directly and sign in via /mcp in Claude Code or codex mcp add commandagi --url https://api.commandagi.com/mcp), or pass a bearer API key (cagi_…):

shell
claude mcp add --transport http commandagi https://api.commandagi.com/mcp \
  --header "Authorization: Bearer cagi_YOUR_KEY"

The hosted server exposes 453 tools covering threads, Drives, graph/vector search, sandboxes, 3D/EDA/FEA/slicing services, Matrix Earth, Geoeconomics, sites, mailboxes, shipping, markets, and paired hosts (list_hosts, host_call). Use search_tools and describe_tool to locate and inspect specialized tool schemas on demand.

Local MCP relay

On machines running @commandagi/host or the desktop app, commandagi mcp serves a stdio MCP relay over loopback (POST /control/<tool> also accepts Authorization: Bearer <credential> directly and blocks browser origins). Pass cagp_… credentials via COMMANDAGI_CREDENTIAL or --credential-file — never inline as CLI flags:

shell
claude mcp add commandagi -e COMMANDAGI_CREDENTIAL=cagp_… -- commandagi mcp
# or load cleanly from a file
claude mcp add commandagi -- commandagi mcp \
  --credential-file ~/.config/claude/commandagi.credential

Uncredentialed callers can inspect read-only state (list_worlds, get_device, list_panes, search_tools), while actuation, writes, and unsandboxed Python require verified standing grants.

Built-in local tool catalog (190 tools)

categoryrepresentative tools
worlds, devices & paneslist_worlds, get_world, save_world, list_devices, get_device, list_panes, open_file, fly_to, ride, replay_tracks
files, graphs & gitread_file, write_file, propose, propose_change, design_diff, list_mounts, graph_query, graph_search, git_status, git_commit, git_checkpoint
code, CAD, EDA, FEA, CAM & importersevaluate_code, run_host_code, threed_articulate, mech_engineer, fab_slice, study_check, study_run, study_results, validate_design, systems_check, electronics_gate, kicad_check, firmware_gate, import_3dxml, import_jt, import_plcopen, export_robot_program
threads & AI CLIsthread_read, thread_say, list_agents, fork_agent, seat_agent, mount_tasks, run_tests, ask_question
control, robotics & computer uselist_grants, grant, open_channel, arm, run_program, send_command, stop, stop_unit, computer_screenshot, computer_act, follow_start, robot_connect, robot_command, robot_trajectory, robot_finetune, robot_skill_promote, robot_diagnose, plan_pick_place
tests, rollouts, hosts & commercetestplan_check, testplan_run, rollout_start, rollout_advance, outreach_*, opportunity_*, market_*, ship_*, forecast_*, list_hosts, host_call, search_tools, describe_tool

Parity SDKs (TypeScript, Python, Rust)

All three SDKs share one release version and emit byte-compatible op graphs (commandagi-sdk.schema.json) for .3d, circuits, and simulations (commandagi/design, commandagi.design.*, commandagi::design::*).

TypeScript (npm i commandagi)

Node 22+. (@commandagi/host is a separate npm package providing the commandagi CLI.) Source: CommandAGI/commandagi-sdk-typescript.

typescript
import { CommandAGI, Kernel } from "commandagi";

const cagi = new CommandAGI(); // reads COMMANDAGI_API_KEY
const { threadId } = await cagi.threads.create({ intent: "Design a NEMA 17 bracket in 6061 aluminum" }) as { threadId: string };
await cagi.threads.send(threadId, "Add M3 mounting slots.");

await using world = await cagi.launch("simulation/arm-cell");
await world.sim.run();
await world.sim.ik({ target: [0.08, -0.12, 0.86] });
const frame = await world.observe({ fresh: true });

const kernel = new Kernel(); // uses COMMANDAGI_THREED="local,cloud"
const { observation } = await kernel.observe(graph);

Python (pip install commandagi)

Python 3.9+ (or uv add commandagi). Includes commandagi.kernel.Kernel, commandagi.design.cadquery (Pyodide-sandboxed CadQuery subset), and robotics RL extras commandagi[gym] (CommandAGIEnv) and commandagi[lerobot] (commandagi.lerobot). Source: CommandAGI/commandagi-sdk-python.

python
from commandagi import CommandAGI

cagi = CommandAGI()
with cagi.launch("simulation/arm-cell") as world:
    world.sim.run()
    world.sim.ik(target=[0.08, -0.12, 0.86])
    open("cell.jpg", "wb").write(world.observe(fresh=True))

Rust (cargo add commandagi)

Zero runtime network dependencies (streams via system curl stdin so secrets never appear in argv) plus an offline no-deps design ABI targeting WebAssembly directly. Source: CommandAGI/commandagi-sdk-rust · docs.rs/commandagi.

rust
use commandagi::client::CommandAGI;

let cagi = CommandAGI::from_env()?;
let thread = cagi.threads().create("Design a NEMA 17 bracket")?;
cagi.threads().send(&thread.id, "Make it 3 mm thick.")?;

let world = cagi.launch("simulation/arm-cell")?;
world.sim().run()?;
world.sim().ik([0.08, -0.12, 0.86])?;
std::fs::write("cell.jpg", world.observe()?.bytes)?;

Environment variables

variablepurpose
COMMANDAGI_API_KEYBearer API key (cagi_…) for HTTP API, Hosted MCP, CLI, and SDKs
COMMANDAGI_BASE_URLAPI origin override (defaults to https://api.commandagi.com)
COMMANDAGI_CREDENTIALPrincipal credential (cagp_… or cagc.…) read by commandagi mcp
COMMANDAGI_THREAD_IDActive thread id injected automatically inside managed sandboxes
COMMANDAGI_THREEDKernel resolution order (local,cloud, local, cloud, or URL)
COMMANDAGI_THREED_URL, COMMANDAGI_THREED_TOKENExplicit external commandagi threed serve URL and bearer token