fix(mcp): distinguish MCP configuration from OAuth authentication - #214
Open
gjtorikian wants to merge 5 commits into
Open
fix(mcp): distinguish MCP configuration from OAuth authentication#214gjtorikian wants to merge 5 commits into
gjtorikian wants to merge 5 commits into
Conversation
Greptile SummaryThe PR separates MCP configuration from OAuth status and strengthens Codex recovery handling.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
|
A non-zero `mcp add` was reclassified as configured whenever an entry of the same name existed. A stale entry from an earlier install satisfies that check, so a genuinely failed add reported success and setup could be marked complete with the intended endpoint never applied. Compare the client's effective endpoint when it can report one: a mismatch is decisive and stays failed. A null reading (no introspection, or `get` failed) is not contradicting evidence, so it keeps the existing name-only interpretation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…nfigured An unreadable `mcp get` still fell through to an installed result, so a failed Codex add whose endpoint could not be confirmed was reported as configured and could mark setup complete against a stale entry. Split "answered null" from "was never askable". A client that exposes its effective endpoint has to earn the configured verdict: mismatch and unreadable both stay failed. Claude Code, which has no introspection at all, keeps the name-only fallback. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The collision branch returned already-installed on the add command's wording alone, so a stale entry under our name reported as already configured and let setup persist completion against the wrong endpoint — the same defect the non-zero-exit path was just fixed for. Extract the endpoint check both paths need into staleEntryReason() and apply it to the collision branch too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`authentication: 'not-verified'` was stamped by comparing `client.key` to 'codex' in two places, and `mcp status` hardcoded `codex mcp login workos` even though the client library already held that exact command. The CLI cannot verify OAuth for *any* client — it never reads agent credentials — so annotating Codex alone made it read as the broken one when it was the only honest one. Move the fact onto `McpClientTarget` as `authenticationVerifiable` (false everywhere today) plus the client's own `recovery`, so callers report the caveat without knowing which client they hold, and a client that grows a real signal flips one literal. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
Addresses #213.
Testing
bun run format:checkbun run lintbun run typecheckbun run testbun run build