Repository navigation
auth login and connect: no login wall where the server asks for none - #80
Merged
Merged
Conversation
A server that lists its tools without credentials (Google's hosted Gmail server, for one) made `auth login` print "Logged in", and leave a file with no token in it that `auth list` then showed as a login. It asks only when a tool is called, so a later session would have failed with no hint why. Now `auth login` checks for a token. With none, it says no login was made, removes the stray file, and says what to do if tool calls then need one (--header, or --client-id and --client-secret). The API's result gains `authenticated`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
toolmenuVerdict: ✓ unchanged: the same menu and the same findings. Nothing to accept. Findings against the baseline: 0 new, 0 gone, 0 changed. toolmenu diff:
|
| Rule | Finding | |
|---|---|---|
| info | write/no-dry-run · unsure |
2 tools are annotated as destructive, and toolmenu found no dry_run/preview-style parameter and no preview tool for the same thing. Where a mistake is costly to undo, a dry run lets the agent see what would change while it can still back out. · snapshot_menu, check_session → Next: Where the effect is hard to undo, add a dry_run parameter that returns what would change without changing it. If it's cheap to undo, or a preview exists under another name, ignore this. |
0 errors, 0 warnings, 1 info
Where the tokens go (estimate): the top 5 tools are 93% of the menu
| Share | Tool | Tokens | Description | Schema |
|---|---|---|---|---|
| 30% | snapshot_menu |
~461 | ~99 | ~353 |
| 26% | check_session |
~394 | ~102 | ~283 |
| 15% | review_baseline |
~231 | ~65 | ~156 |
| 12% | diff_menus |
~187 | ~39 | ~138 |
| 10% | check_auth |
~149 | ~86 | ~54 |
- repeated: cwd (~37 tokens) in 4 tools, ~148 in all
A tool's schema can't $ref another tool's, so a block shared across tools is paid once per tool: only a smaller block saves tokens there.
toolmenu · token counts are estimates
Dreamwork 1.10.0 answers server/discover with a 401 and serves a guest menu over the 2025 handshake, so snapshot stopped at "wants credentials". With --protocol auto, a 401 or 403 to server/discover now gets one 2025 initialize before toolmenu reports credentials. CHANGELOG lines for this and the auth login change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kCPJZAgTv3Bna4BGLzw2o
- A 2026-only server behind a login keeps its server/discover 401 when the 2025 retry fails for another reason; a stored login that was refused is reported as such, with no retry. - auth login keeps a store file that existed before it (a registered client, a rejected token) when the server asks for nothing. - auth login's next step no longer suggests --client-id, which leads back to the same message. - CHANGELOG: the plugin pin goes under Repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kCPJZAgTv3Bna4BGLzw2o
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kCPJZAgTv3Bna4BGLzw2o
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
connect: with--protocol auto(the default) and no stored login, a 401 or 403 toserver/discovergets one 2025initializebefore toolmenu reports "wants credentials". If that is refused too, the error namesinitialize; if it fails some other way (a server on 2026-07-28 only), the originalserver/discover401 is reported.--protocol modernis unchanged.auth login: a server that never asks for credentials gets "No login made … nothing was stored" instead of "Logged in", and the empty store file is removed. A store file from before the login (a registered client, a rejected token) is kept.raw-http-server.mjs:discoverStatus,initializeStatusandrequireAuthoptions.Why
Dreamwork 1.10.0 (
https://mcp.dreamworkhq.com/mcp) answersserver/discoverwith a 401 and serves a 74-tool guest menu over the 2025 handshake.toolmenu snapshotstopped at "wants credentials" and pointed atauth login, which then reported a login with no token behind it.Tests
npm test: 727 passing.--protocol moderndoesn't fall back; a 2026-only server keeps its discover 401; a server that refuses everything reportsinitialize got HTTP 401. It fails without theconnect.tschange.auth logintest: nothing stored, and the next step.snapshotlists 74 tools with no flags.Notes
src/connect.ts: the retry is a recursiveconnect()withprotocol: 'legacy', so on a real login wall each connection now makes two requests before failing.