Skip to content

fix(discovery): preserve declared MCP OAuth identity - #66

Open
aryasaatvik wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
aryasaatvik:fix/mcp-declared-oauth-identity
Open

fix(discovery): preserve declared MCP OAuth identity#66
aryasaatvik wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
aryasaatvik:fix/mcp-declared-oauth-identity

Conversation

@aryasaatvik

Copy link
Copy Markdown

Summary

Preserve the OAuth credential explicitly bound to an owner-declared MCP surface when deterministic detection enriches its onboarding guidance. This prevents an unrelated OAuth credential, such as a CLI login, from being relabeled and attached to MCP.

Before / After

Case Before After
Declared MCP OAuth exists First OAuth-shaped credential wins Credential referenced by the matching declared MCP surface wins
No matching declaration First OAuth-shaped credential wins Existing fallback remains unchanged

Reconciliation

detected MCP URL
  -> matching owner-declared MCP surface
  -> OAuth credential referenced by that surface
  -> detected DCR/CIMD/manual-onboarding enrichment

Validation

  • bun test src/lib/discover.test.ts — 8 passed
  • git diff --check origin/main...fork/fix/mcp-declared-oauth-identity

@aryasaatvik
aryasaatvik marked this pull request as ready for review August 18, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant