feat(sdk): expose global MCP auth status - #2706
Conversation
🦋 Changeset detectedLatest commit: 2129763 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c138582cfb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
commit: |
Related Issue
N/A — this is a focused SDK gap: hosts can list global MCP configuration but cannot read persisted OAuth authorization state without reaching into private credential storage or starting an authorization flow.
Problem
Global MCP configuration and OAuth runtime state intentionally have different owners.
listGlobalMcpServersreturns durable configuration only, so a host cannot tell whether an OAuth-configured server already has persisted credentials. UsingbeginGlobalMcpServerAuthas a status probe is unsafe because an unauthenticated server starts a real browser authorization flow.What changed
listGlobalMcpServerAuthStatusesto the v1 Core API and the v1/v2 Node SDK surfaces.not-applicable,bearer-token,oauth-required, oroauth-authorized.hasTokenscheck; the new method performs no network request and starts no OAuth flow.listGlobalMcpServersand the persisted MCP configuration schema unchanged.oauth-authorizedmeans persisted tokens exist for the server name and URL; it does not validate token freshness or server acceptance over the network. Plain remote servers without explicitauth: "oauth"remainnot-applicable.Verification:
@moonshot-ai/agent-coretypecheck@moonshot-ai/agent-core-v2typecheck and import-boundary check@moonshot-ai/kimi-code-sdktypecheckgit diff --checkThe three complete Node SDK test files still contain 23 pre-existing Windows-specific failures involving path normalization, localized ENOENT text, and one background-output timing assertion; none are in this diff, and the three added tests pass independently.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.