Which one do I need?
| you want an agent to… | use |
|---|---|
| work with your cloud files, threads and account from anywhere | the hosted MCP server |
| drive machines attached to your computer, under local grants | the local MCP relay, commandagi mcp |
| script CommandAGI from your own program | the TypeScript or Python SDK |
All three authenticate as a principal. None of them can create or widen a grant — that is always a person's act.
Hosted MCP server
https://api.commandagi.com/mcp — Streamable HTTP, stateless, JSON responses. Authenticate with an API key (cagi_…), created in the workbench from the account menu's API keys.
claude mcp add --transport http commandagi https://api.commandagi.com/mcp \
--header "Authorization: Bearer cagi_YOUR_KEY"It exposes a large catalogue of tools — over three hundred — including threads (list_threads, create_thread, send_message, get_thread), files (list_drive, read_drive_file, write_drive_file), your account (whoami, get_credits, list_models), code (run_code), hosted sites (create_site, deploy_site), trading (trade_venues, trade_order, trade_account, trade_cancel) and paired hosts (list_hosts, host_call). Use search_tools to find the one you need.
Local MCP relay
On a computer running the host, commandagi mcp is a stdio MCP server that relays to the host's own endpoint. Give it the agent's host credential — in the environment or a file, never as an argument:
claude mcp add commandagi -e COMMANDAGI_CREDENTIAL=cagp_… -- commandagi mcp
# or
claude mcp add commandagi -- commandagi mcp \
--credential-file ~/.config/claude/commandagi.credentialWithout a credential, a client can read and show things but cannot act. The host's endpoint answers on loopback only and refuses requests that carry a web page's origin. The same control tools also answer plain HTTP at POST /control/<tool> with Authorization: Bearer <credential>.
Local tools
| group | tools |
|---|---|
| project and worlds | get_project, project_status, list_worlds, get_world, save_world, list_devices, get_device |
| files | read_file, write_file (under a files grant), graph_query, graph_search |
| code and simulation | evaluate_code (sandboxed, no network), sim_trials |
| the open workbench | list_panes, open_file, show_world, thread_read, thread_say |
| control | list_grants, list_units, open_channel, arm, run_program, send_command, read_channel, stop, close_channel |
| other hosts | list_hosts, host_call |
| outreach | outreach_apps, outreach_identify, outreach_start, outreach_send, outreach_reply, outreach_outcome, outreach_due, outreach_advance, outreach_status |
| markets | market_venues, market_order, market_account, market_cancel |
The control tools follow every rule in Agents and standing grants: each needs the matching verb in a grant, stop needs any grant, and every action is recorded before it is sent.
TypeScript SDK
npm i commandagi # Node 22 or laterimport { CommandAGI } from "commandagi";
const cagi = new CommandAGI(); // reads COMMANDAGI_API_KEY
const { threadId } = (await cagi.threads.create({
intent: "Summarise this week's robotics news",
})) as { threadId: string };
await cagi.threads.send(threadId, "Add a link for each one.");The commandagi command is another package, @commandagi/host (npm install -g @commandagi/host), which is also the local host: commandagi whoami, commandagi threads create --intent "…", commandagi call <tool> --json '{…}', and an interactive terminal when run on its own. Source: github.com/CommandAGI/commandagi-sdk-typescript.
Python SDK
pip install commandagi # Python 3.9 or laterfrom commandagi import CommandAGI
cagi = CommandAGI() # reads COMMANDAGI_API_KEY
with cagi.launch("simulation/warehouse") as world:
world.sim.ik(target=[0.3, 0.0, 0.4])
jpeg = world.observe(fresh=True)Source: github.com/CommandAGI/commandagi-sdk-python.
Environment
| variable | meaning |
|---|---|
COMMANDAGI_API_KEY | your API key, cagi_… |
COMMANDAGI_BASE_URL | the API origin, default https://api.commandagi.com |
COMMANDAGI_CREDENTIAL | a principal's credential for the local relay |