Skip to content

feat(web): MCP OAuth consent page#1118

Merged
graphite-app[bot] merged 1 commit into
mainfrom
Prasanna721/mcp-oauth-provider
Jun 16, 2026
Merged

feat(web): MCP OAuth consent page#1118
graphite-app[bot] merged 1 commit into
mainfrom
Prasanna721/mcp-oauth-provider

Conversation

@Prasanna721

Copy link
Copy Markdown
Member

Consent + connect UI for the new OAuth 2.1 provider. The API side lives in mono#1812 (stacked on the Enterprise MCP PR). When an MCP client starts OAuth, this is the page where you pick the org and approve access.

What's here:

  • /oauth/consent: the consent screen. Pick an organization (cards), then set access: permission (read / read+write) and scope (full, or scoped to specific container-tag spaces with a searchable picker). Approving hands the code back to the client.
  • /connect: plugin-aware entry for known clients (Claude Code, etc.).
  • ConsentCard.tsx: shared card component (org list with fade, dual-icon connecting header, scoped-spaces picker), built to reuse across plugins.
  • plus a fix to the mcp resource metadata.

Pairs with mono#1812 (the API OAuth provider) and the Enterprise MCP PR. Draft until the end-to-end flow is verified.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp 651e304 Jun 16 2026, 05:35 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 651e304 Commit Preview URL

Branch Preview URL
Jun 16 2026, 05:36 PM

@Prasanna721 Prasanna721 marked this pull request as ready for review June 15, 2026 19:41
@graphite-app graphite-app Bot requested a review from Dhravya June 15, 2026 19:41
@claude

claude Bot commented Jun 15, 2026

Copy link
Copy Markdown

Claude finished @Prasanna721's task in 2m 29s —— View job


PR Review Complete

  • Loading review tools
  • Fetching PR diff
  • Checking existing review comments
  • Analyzing code for bugs, security issues, and logic errors
  • Submitting review

Overview: Adds OAuth consent UI for MCP clients with org picker, permission selection (read/write), and scoped access to specific spaces.

Issues found:

  • Silent failure of /v3/mcp/connect-scope call — if saving the user's scope preferences fails, the OAuth consent still proceeds. The user may think they limited access to specific spaces, but the token could be issued with broader permissions. See inline comment for details.

Score: 8/10

The UI implementation is clean and well-structured. The main concern is the silent error handling on the scope-setting API call, which could lead to a mismatch between what the user approved and what access was actually granted. The rest of the code handles errors appropriately and the OAuth flow looks solid.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds OAuth consent UI for MCP clients with org picker, permission selection (read/write), and scoped access to specific spaces.

Issues found:

  • Silent failure of /v3/mcp/connect-scope call — if saving the user's scope preferences fails, the OAuth consent still proceeds. The user may think they limited access to specific spaces, but the token could be issued with broader permissions.

Score: 8/10

The UI implementation is clean and well-structured. The main concern is the silent error handling on the scope-setting API call, which could lead to a mismatch between what the user approved and what access was actually granted. The rest of the code handles errors appropriately and the OAuth flow looks solid.

if (!oauthQuery) {
setError(
"Missing authorization request. Start the flow again from your app.",
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Silent failure may grant broader access than user intended

If the /v3/mcp/connect-scope request fails (network error, 500, auth issue), the error is silently swallowed and the OAuth consent proceeds anyway. The user sees "Scoped access to spaces X, Y, Z" on the consent screen, approves, but their scope preferences weren't actually saved.

Depending on how the backend handles missing scope data, the issued token may have broader permissions than the user selected.

Suggested change
)
}).catch((err) => {
console.error("Failed to save scope preferences:", err)
throw err // Abort consent if scope preferences can't be saved
})

If you want to allow consent to proceed even on scope-save failure, at minimum log a warning and consider showing the user a notice that their scope preferences may not have been applied.

@graphite-app

graphite-app Bot commented Jun 16, 2026

Copy link
Copy Markdown

Merge activity

Consent + connect UI for the new OAuth 2.1 provider. The API side lives in mono#1812 (stacked on the Enterprise MCP PR). When an MCP client starts OAuth, this is the page where you pick the org and approve access.

What's here:

- `/oauth/consent`: the consent screen. Pick an organization (cards), then set access: permission (read / read+write) and scope (full, or scoped to specific container-tag spaces with a searchable picker). Approving hands the code back to the client.
- `/connect`: plugin-aware entry for known clients (Claude Code, etc.).
- `ConsentCard.tsx`: shared card component (org list with fade, dual-icon connecting header, scoped-spaces picker), built to reuse across plugins.
- plus a fix to the mcp resource metadata.

Pairs with mono#1812 (the API OAuth provider) and the Enterprise MCP PR. Draft until the end-to-end flow is verified.
@graphite-app graphite-app Bot force-pushed the Prasanna721/mcp-oauth-provider branch from e6662bd to 651e304 Compare June 16, 2026 17:33
@graphite-app graphite-app Bot merged commit 651e304 into main Jun 16, 2026
5 of 7 checks passed
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.

2 participants