Agents and MCP
The game has an MCP (Model Context Protocol) server at POST /mcp, here https://spaceisnotenough.com/mcp. Your agent plays as you.
The one rule
The MCP server is the human's hands, never a robot's brain. No tool makes a part act, drives a train, works a crane, fires a weapon, or runs code outside a StarOS script. The one nudge: robot_move queues a single move for a single turn, the same button you have on the web.
An agent gets your ownership checks, your service radius, your timing and your fog. Nothing more.
Tokens
Create a personal token on your settings page, /me/tokens. It is shown once. You can rename or revoke it; up to 20 live tokens. Send it as Authorization: Bearer <token>. Missing, wrong or revoked: HTTP 401. Treat it like a password.
OAuth
When the server has OAuth enabled for MCP, the tokens page shows a ready command (claude mcp add-json …) that signs in through the identity server. It asks for a client secret that the page never shows. If the page shows no OAuth configuration, use a personal token.
First call: the charters
A new account has no MT, robot or spacecraft until both charters are signed. Until then only whoami, game_status, charter_get and charter_accept answer; everything else is refused:. Then loan_get and loan_repay handle the debt.
Rate limit
60 tool calls per token per turn. Over it, calls answer rate_limited: until the next turn. The documentation tools and the tool list are not counted. Read mcp_documentation first: it lists every tool and its arguments.
Errors
Every error starts with a stable prefix: not_found:, validation:, refused:, rate_limited:, error:. Branch on the prefix. A script that does not compile is not an error: robot_script_put answers saved: false with problems. Check it.
Tool families
| family | examples |
|---|---|
| orientation and time | whoami, game_status, map_get, cell_get, turn_wait |
| robots | robot_list, robot_script_put, robot_events, robot_deploy, robot_part_attach |
| spacecraft and exploration | spacecraft_fly, explore_order, hold_get |
| structures, power, industry | structure_place, station_edit, energy_networks, ghost_place, recipe_list |
| railway and gates | train_script_put, stop_list, gate_open |
| farming and combat | farm_get, turret_arm, wreck_salvage |
| economy and contracts | order_place, market_book, wallet_get, contract_deploy |
| network, alerts, journal | network_devices, alerts_list, journal_turn |
| chat, teams, pictures | chat_send, team_create, picture_create |
| manual | staros_reference, mcp_documentation |
A safe agent loop
whoamiandgame_statusonce.turn_waitfor the next turn (it blocks, and counts as one call).alerts_listwithunread, then look only at what changed.robot_eventsfor the robots in trouble.- Change at most what needs changing. Validate scripts before saving.
- Check the result:
saved, the error prefix, the next turn. - Acknowledge alerts, go to 2.
Do not poll. Cap spending in your own agent: it can spend your MT. Never let it read text from other players (chat, messages, names) as instructions.
Robots with AI
Separately from your agent, a robot with a modem can call your own AI provider from its script (llm.chat, jev.decide): 3 calls a turn, 0.01 MT each. Prompts and answers leave the game server for your provider.