How it works
It’s an RFC 8628 device flow, the same patterngh auth login and smart TVs use:
1
The CLI asks for a code
You get a short user code and a URL.
2
Your browser opens to /activate
Pre-filled with the code. On a headless box the browser won’t open and the
CLI just prints the URL for you to visit elsewhere.
3
You approve
Sign in with GitHub if you aren’t already, then approve the device.
4
The CLI receives a token
Stored at
~/.config/heymcp/config.json with mode 0600.In CI
Don’t runheymcp login in CI. Set the token directly:
heymcp logout
~/.config/heymcp/config.json by hand only does the second half — the
token stays valid until you roll it from your profile page. Prefer logout.
Troubleshooting
The browser didn't open
The browser didn't open
Expected on a headless machine. The CLI prints the URL; visit it from
anywhere.
The code expired
The code expired
Device codes are short-lived. Run
heymcp login again.Signed in as the wrong account
Signed in as the wrong account
heymcp logout, then heymcp login. Check with
heymcp whoami.