Managing 0x with an agent
Give an AI agent (Claude Code or any MCP client) a scoped, revocable token for the 0x admin API through the x1-admin MCP server. Reads run, live changes wait for a human's approval, and sign-in, credentials, payouts and deletes are never available.
An operator of a 0x deployment can let an AI agent work on the platform through the admin API, the same API the admin console uses. The agent connects through x1-admin, an MCP server, with an agent token the operator creates in the console.
Live since 2026-11-07
Agent tokens and the x1-admin MCP server are live on 0x.limo's admin console.
Human sign-in doesn't change. Operators still sign in with a passkey, a COLDCARD or an authenticator app. An agent token is a separate kind of credential, with its own limits.
#What an agent can and can't do
Every admin route has one of four classes for agents. The admin API applies the class before any handler runs, whatever role the agent has.
| class | what happens | examples |
|---|---|---|
| read | runs | health, worlds, plays, the network and the swarm, Earth status, review queues, the audit trail |
| manage | runs at once (reversible desk work, audited) | re-running a pre-check, drafting review issues, suggesting a reply on the hype desk |
| live | queued for a human. The agent gets an action_id. The change runs once, as the agent, if an operator approves it within an hour | world release stage, Earth LOD switch, weather events, fire dispatch, delivery mode, CSP mode, publishing, restarts, crediting |
| denied | never | sign-in and sessions, operators, roles, agents, approvals, credentials and secrets, payouts and refunds, anything that deletes |
Other limits:
- One role. An agent token holds one built-in or custom role, optionally scoped to apps, worlds or publishers. Break-glass can't be an agent's role.
- Never more than its owner. The operator who creates a token owns it. Each request also needs its owner to hold the permission right now. If the owner loses a role or is disabled, the agent loses it too.
- A dry run first. For a dangerous operation, the agent can run the plan (dry run) and read its effect. Its apply is what gets queued. The approver sees the same effect.
- Two-person rules still apply. An action that needs a second operator can't be approved by the agent's own owner.
- Rate limit. Each agent has its own rate limit, on top of the console's.
- Audit. Every call is in the hash-chained admin audit trail, refused calls included. The
actor is
agent:<name>, and the role column names the owner. A change that ran after approval also records the approval.
#Creating a token
In the console, open Security & access › Agents, then New agent. You need the
agents.manage permission, which security-admins have.
- Pick a name, a role and, if you like, a scope and an expiry (1 to 90 days, 30 by default). You can only give the agent permissions you hold yourself, everywhere.
- The dry run shows how many routes the agent will reach in each class.
- Apply. This needs a fresh second factor, like any dangerous action.
- The token (
0xag_+ 64 hex digits) is shown once. Save it in a file only you can read. Tokens minted before the rename to 0x start withx1ag_and keep working. The console keeps only its hash.
The Agents page shows each token's owner, role, expiry, last use, number of calls and
rate-limit hits. Revoke stops a token at once and rejects its pending actions. Any
operator with agents.manage can revoke a token. Only its owner can rotate it, which
gives a new token and stops the old one at once.
#Connecting Claude Code
x1-admin runs on a host that can reach the admin API. It has two transports:
stdio, for one agent on one machine, usually started over SSH:
claude mcp add x1-admin -- ssh <admin-host> \ ZEROX_AGENT_TOKEN_FILE=~/.config/0x/agents/<name>.token \ node <path>/x1-admin-mcp/bin/x1-admin-mcp.mjs --stdioStreamable HTTP, on the operators' private network only. Each client sends its own token as a bearer, and the server keeps no token of its own:
claude mcp add --transport http x1-admin http://<private-address>:8590/mcp \ --header "Authorization: Bearer $(cat ~/.config/0x/agents/<name>.token)"The HTTP transport refuses to listen on wildcard or public addresses, and refuses requests from browsers (any request with an
Originheader).
Ask the agent to start with agent_whoami. It reports the agent's role, its owner and how many routes it reaches in each class.
#Tools
About fifty tools, each on one admin route, grouped by area. The tool descriptions name each route's class and permission.
| area | tools |
|---|---|
| status | ops_health, ops_nodes, ops_alerts, metrics_catalog, metrics_query |
| worlds | worlds_list, world_get, plays_overview, world_set_release |
| network and swarm | p2p_topology, p2p_network, p2p_traffic, p2p_capacity, p2p_trackers, p2p_mode, p2p_set_mode, swarm_overview, swarm_items, seedboxes_list |
| Earth | earth_terrain_status, earth_bake_status, earth_bake_log, earth_lod_build, earth_lod_switch, climate_status, climate_history, climate_trigger, firefighters_status, firefighters_dispatch, helicopters_status |
| review | listings_list, listing_get, listing_issues, sourcecheck_jobs, listing_precheck, listing_approve |
| hype desk | hype_status, hype_replies, xreach_status, xreach_likes, xreach_like_action, xreach_run |
| operations | infra_status, docs_status, audit_search, audit_verify |
| the agent | agent_whoami, agent_actions, agent_action_status |
| any read route | admin_get (a concrete /admin/v1/... path of any read route) and admin_routes (the route table with classes, offline) |
Read tools carry readOnlyHint. Manage and live tools carry destructiveHint. A dangerous
tool takes a reason (shown to the approver) and dry_run: true to stop after the plan.
#Approving
Queued actions wait in Security & access › Agent approvals, with the agent, its owner, the operation, its dry run or request, and the agent's reason. To approve one you need the action's own permission and a fresh second factor. It then runs once, as the agent. Anyone eligible, or the agent's owner, can reject it. After an hour a pending action expires, and the agent has to ask again.
The agent polls agent_action_status and sees pending, executed (with the result),
failed, rejected or expired.
