Reference
LiveDevice login
How a harness signs a user in to DreamUI. The user approves in a browser, and the MCP adapter stores the credential on the host.
Recommended: use the MCP auth tool
The adapter’s uicopilot_auth tool runs the whole flow: it polls and stores the credential locally, so the user never pastes a token into chat.
Register the MCP adapter in your harness
Use the generated configuration from the ZIP guide.
Check status
MCP · uicopilot_authIs the host already signed in? { "action": "status" }Start sign-in if needed
MCP · uicopilot_authBegin device login { "action": "start" }Open the returned
loginUrlfor the user so they can authorize in a browser.Poll until claimed or expired
MCP · uicopilot_authPoll with the returned device code { "action": "poll", "deviceCode": "RETURNED_DEVICE_CODE" }Respect the returned interval if present and stop at expiry. A pending result is not sign-in success.
Confirm status again
Proceed only after status reports the host is authenticated.
Underlying endpoints
Base URL: https://dreamui.com. Routes live in app/api/cli/auth/*/route.ts.
| Method and path | Request | Success | Notes |
|---|---|---|---|
POST /api/cli/auth/start | No body required | { deviceCode, userCode, expiresIn: 600, loginUrl } | Show loginUrl to the user. Device codes are temporary credentials. |
POST /api/cli/auth/poll | { "deviceCode": "…" } | { "status": "pending" }{ "status": "claimed", "token": "…" } | Claimed response contains a secret. Missing input → 400; expired code → 404. |
GET /api/cli/auth/status | Authorization: Bearer <CLI_TOKEN>x-cli-token: <CLI_TOKEN> | { "ok": true } | Invalid or missing token → 401 { "ok": false, "error": "Invalid CLI token" }. |