What it is
When ORRERION starts, it opens a local control server. The MCP server lives on it: agents ORRERION starts reach it through a small stdio bridge, and any HTTP client on your Mac can call it directly.
It listens on 127.0.0.1 only. Other machines on your network can’t reach it, and every request except the health check needs a token.
Port and token
The server tries port 47821 first and picks a free port if that one is taken. Set ORRERION_CONTROL_PORT before launching ORRERION to prefer another port.
The live port and token are written to a file only your user can read (mode 600):
~/Library/Application Support/Orrerion/data/control.json
It holds port, token and pid. ORRERION doesn’t show the token anywhere in the app: this file is the only place to get it. Agents ORRERION starts are given it automatically.
To get it, ORRERION must be running. Then read both values into your shell with plutil, which comes with macOS:
CTRL="$HOME/Library/Application Support/Orrerion/data/control.json"
PORT=$(plutil -extract port raw -o - "$CTRL")
TOKEN=$(plutil -extract token raw -o - "$CTRL")
Check that it works. This prints 200, or 401 if the token is wrong:
curl -s -o /dev/null -w '%{http_code}\n' -X POST "http://127.0.0.1:$PORT/mcp" \
-H "X-Orrerion-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
Send the token in the X-Orrerion-Token header on every request. ORRERION makes a new token each time it starts, so after a restart the old one gets 401: read the file again instead of saving the value somewhere. Treat the token like a password. Anyone who has it can use the MCP tools as you.
Endpoints
| Method | Path | Token | What it does |
|---|---|---|---|
GET | /health | No | Returns { "ok": true, "version": "…" }. Use it to check ORRERION is running. |
POST | /mcp | Yes | The MCP server, as JSON-RPC 2.0. Single requests and batches. |
POST | /hook | Yes | Relays Claude Code hook events from agents ORRERION started. Internal. |
GET | /plan-review/<id> | Review key | The plan review page an agent opens for you. Gated by the review’s own link key, not the token. |
A request without a valid token gets 401. Unknown paths get 404.
Calling MCP over HTTP
POST /mcp takes a JSON-RPC 2.0 message (or an array of them) and answers with plain JSON. It supports initialize, ping, tools/list and tools/call. Notifications, messages without an id, get an empty 202.
With PORT and TOKEN set as above, list the tools:
curl -s "http://127.0.0.1:$PORT/mcp" \
-H "X-Orrerion-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool the same way:
curl -s "http://127.0.0.1:$PORT/mcp" \
-H "X-Orrerion-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"task_list","arguments":{}}}'
MCP clients that support the streamable HTTP transport can point at http://127.0.0.1:<port>/mcp with the token header. Most people don’t need to: running orrerion setup in a project registers the server in .mcp.json for you.
Permissions
- Agents ORRERION started prove who they are with their own agent key and keep the permission you gave them. A caller that names an agent without its key is refused.
- Everything else (curl, scripts, clients set up through
.mcp.json) gets the level set in Settings → MCP. The default is no-destructive: it can read and create, but can’t delete tasks, agents or docs. Choose full only if you trust every process running as your user. - Secrets are never returned over HTTP. Vault tools hand values to a command or a file, as in the MCP docs.
HTTP in the browser
The in-app browser gets its own local HTTP proxy per profile, which is how DNS overrides work: a hostname like shop.example.test is sent to the address you mapped it to, without touching /etc/hosts. Plain HTTP, HTTPS (through CONNECT, so the original host name and TLS certificate still match) and WebSockets all go through it, and rule changes apply to the next connection.
Agents can inspect that traffic: browser_network lists a tab’s requests with method, status, type and timing, and browser_request returns one request in full, headers and bodies included.
Limits
- Local only: there is no option to listen on other interfaces.
- Responses are plain JSON.
GET /mcpreturns405: there is no server-sent event stream. - MCP resources and prompts are empty lists. Everything is a tool.
Next: Keyboard shortcuts