Repository navigation
Description
Versions: Claude Code 2.1.306 on Windows (remove, logout, Clear authentication; 22 and 23 October 2026) and 2.1.306 → 2.1.310 (update; 24 October 2026). Two OAuth client profiles against the MCP server: a pre-registered public client without dynamic registration, and a client with dynamic client registration (RFC 7591) enabled.
What was measured
Three user actions, one provider, one grant:
claude mcp remove <server>: no request reached the provider's revocation endpoint. The prior refresh token was still accepted afterwards and issued a new access token. In the DCR profile no registration DELETE reached the provider. Measured in both profiles. The documentation says that removing a remote server "deletes the OAuth tokens and client registration" stored for it (docs). Locally that is consistent with what we saw (a later read of the credentials file found no entry for the server); at the provider the grant stayed live.- Update 2.1.306 → 2.1.310: the new build read the refresh token the previous build had written, from the same credentials path and key. It obtained a new access token with it and completed tool calls. No sign-in, no consent prompt, no revocation request, no registration DELETE. Measured in both profiles.
claude mcp logoutand Clear authentication (2.1.306): revocation requests for the access and the refresh token were sent, and the provider refused the prior refresh token afterwards. In the DCR profile neither sent a registration DELETE. Measured in both profiles.
So the revocation path exists in the client and works. It was observed on logout and Clear authentication, and not observed in the remove or update windows.
Why it matters to a user
A person who removed a remote MCP server reads in the documentation that its tokens are gone. The local copy may be; the provider's grant is not, and nothing in the removal told the provider. The documentation points to Clear authentication for revoking access, and on our bench logout and Clear authentication did end the grant; nothing on the remove path says that remove does not. After an update the new build kept using the stored grant without a consent prompt; we record that as an observation and ask only that it be documented.
How it was measured
- Our own synthetic OAuth authorization server and MCP server on loopback, with
revocation_endpointdeclared in its metadata. No real provider or model calls were made and no new vendor login was used. In the update cells Claude Code ran from the CLI with a model-protocol fixture, with no real model, account or browser. - Remove / logout / Clear authentication: authorize once, start a slow tool call, perform the action; a controller replays the prior refresh token with the profile's required client credentials once before and once after the action. "Token issued" after remove;
invalid_grantafter logout and after Clear authentication. The revocation requests after logout and Clear authentication are in the provider's request log. After remove there are none in the observed window, which ran at least 60 s past the observer's acknowledgement. - Update: authorize once on 2.1.306, let the access token expire naturally (120 s lifetime on the fixture), replace the Claude Code build at the same path with 2.1.310, start it and observe which token it presents. In both profiles it presented the old refresh token and received a new access token.
- Controls (update cells): an explicit revoke from the controller ended the old refresh token, and a fresh grant stayed usable.
Full rows, run IDs and the SHA-256 of each raw verdict: disconnection page (sections "Measured outcomes" and "Measured outcomes: after a component update"; host section "Claude Code"), the bench folder with RESULTS.json, UPDATE-RESULTS.json and deidentified receipts R01 and R06, and the summary of all six directions.
Limits
- The update was a same-path replacement of the build by us, not the official installer or the built-in auto-update; the official update path was not measured.
- Whether
mcp removedeleted the local token file is not proven: the file was read only after the command. - Clear authentication used a separate native session on the same profile and grant.
- Each update cell has one completed trial; the pattern is the same in both Claude Code cells.
- Remove, logout and Clear authentication each have one selected window per profile. The replay used the profile's own credentials; use by another party was not tested.
- We assign no severity. This is the Claude Code row of a measurement across five native hosts and the
mcp-remotebridge; the other rows are on the same page.
Questions
- The documentation sentence says remove deletes what Claude Code "stored for that server", which reads as local. Is leaving the provider-side grant alive on
mcp removethe intended contract? If so, could the page say that the provider is not told, and point to Clear authentication there? - Would
mcp removecall the same revocation (RFC 7009) thatlogoutalready calls, and delete the dynamic registration (RFC 7592) where one exists? Logout and Clear authentication left the registration in place too. - Would the Claude Code MCP documentation state the token lifecycle for remote servers: what each of remove, logout, Clear authentication and update does locally and at the provider?
Activity
Ben-Home commentedon Oct 27, 2026
The distinction your bench draws between a local credential delete and a provider-side grant is the whole bug, and it generalizes past
claude mcp remove: a refresh token is a bearer capability that lives in the authorization server, so deleting the client's copy removes the ability to revoke it later while leaving the capability itself alive. That makes remove worse than a no-op for the user who removed the server precisely to cut access, because the local file that would have let them revoke is the thing that got deleted first.Ordering matters in the fix. Revoke the refresh token before the access token. Plenty of servers treat access revocation as its own event and keep the parent grant alive, so a controller that reads "access revoked" as "grant ended" reproduces your own result. Delete local state only after the revocation response, and when the endpoint refuses or is missing, keep the entry as a tombstone with a visible warning rather than a clean delete. A
revocation_endpointthat is absent is not the same as a revocation that failed, and a user cannot tell the two apart from a delete that looks successful.On the DCR half, the missing registration DELETE is expected rather than a defect. RFC 7591 registration has no standard teardown. RFC 7592 adds a client configuration endpoint, and an authorization server only exposes one if it advertises the registration client URI in its metadata. The correct client behavior is to attempt the DELETE when the metadata says it exists and stay silent when it does not, which is what your DCR cells show. Worth stating in the docs so it does not arrive later as a second bug report.
The update cells are the interesting design question. A new build picking up a refresh token the previous build wrote is normal for a client upgrade, since the credential belongs to the user rather than the binary. What is not normal is that the consumption leaves no trace. When a grant is later found to have been used by something unexpected, there is no record of which build took it. Storing the build identifier beside the credential and logging the consumer turns that from an unknown into a line you can read.
One probe closes the loop: run the same action matrix against a provider that advertises a
revocation_endpointand one that does not, and assert the user-visible outcome differs. Today both paths end in the same silence.playb0t commentedon Nov 27, 2026
Update on a current build: 27 November 2026, Claude Code 2.1.332 on Windows, a separate synthetic bench, two OAuth client profiles per cell.
With RFC 8414 authorization server metadata the three actions behave as in the report above. After
claude mcp removethe bench recorded no revocation request and the provider still accepted the prior refresh token. Afterclaude mcp logoutand Clear authentication it recorded revocation requests for the access and refresh tokens, and the provider refused the prior refresh token withinvalid_grant.New: when the provider publishes
revocation_endpointonly in its OpenID discovery document and the RFC 8414 path returns 404, the bench recorded no revocation request after any of the three actions, and the provider accepted the prior refresh token in all six windows. Logout printedSigned out of "bench"and Clear authentication printedAuthentication cleared for bench. A control without Claude Code confirmed that the advertised endpoint revokes the token in that mode. This is consistent with modelcontextprotocol/typescript-sdk#3213, where the OpenID discovery schema dropsrevocation_endpoint; the cause inside Claude Code was not determined.No registration DELETE was recorded in any of the six DCR windows.
12 windows and results