autorouter-mcp 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +30 -0
  2. package/dist/cli.js +1241 -1355
  3. package/package.json +1 -1
  4. package/server.json +2 -2
package/README.md CHANGED
@@ -366,6 +366,7 @@ autorouter restore --target claude # undo the most recent adopt
366
366
 
367
367
  autorouter login # which servers need a grant
368
368
  autorouter login remote-server # authorize one (opens a browser)
369
+ autorouter login remote-server --device # headless: enter a code elsewhere
369
370
  autorouter logout remote-server # forget a stored grant
370
371
  ```
371
372
 
@@ -391,6 +392,35 @@ fixed port (33418, `--port` or `$AUTOROUTER_OAUTH_PORT` to change it) because th
391
392
  redirect URI is baked into the registration a provider stores — a grant obtained
392
393
  on one port cannot be refreshed from another.
393
394
 
395
+ ### Headless machines
396
+
397
+ The browser flow cannot work over SSH: it binds a loopback listener and expects
398
+ a browser on the same host to redirect into it. Two flows replace it, and on a
399
+ box with no display autorouter picks one of them by itself rather than timing
400
+ out waiting for a browser that was never going to open.
401
+
402
+ ```sh
403
+ autorouter login remote-server --device # RFC 8628: enter a code on your phone
404
+ autorouter login remote-server --manual # paste the redirect URL back
405
+ ```
406
+
407
+ `--device` is the better one where the provider offers it. Nothing has to reach
408
+ back into the machine: it prints a short code and a URL, you enter them in a
409
+ browser on any other device, and the headless side polls until you are done.
410
+ Detection is the `device_authorization_endpoint` in the provider's metadata.
411
+
412
+ `--manual` is the fallback for providers that do not implement RFC 8628. It
413
+ prints the authorization URL, you open it elsewhere, and the browser is then
414
+ redirected to `http://localhost:33418/callback`, which will not load — nothing
415
+ is listening. That is expected: copy the URL out of the address bar and paste it
416
+ back. Pasting the whole URL is worth preferring over just the code, because the
417
+ `state` in it is what proves the code came from the login you started.
418
+
419
+ Neither flow binds a port. A device login registers a client that also works for
420
+ a later browser login from the same machine, so nothing has to be redone if the
421
+ box grows a display. Set `AUTOROUTER_ASSUME_HEADLESS=1` to force the detection
422
+ on a machine where it guesses wrong.
423
+
394
424
  ### Choosing permissions
395
425
 
396
426
  A dynamically registered client may default to every scope the provider