Skip to content

feat(mcp): open OAuth so connector clients can finish sign-in (0.7.0) - #95

Merged
ralyodio merged 1 commit into
masterfrom
feat/mcp-open-oauth
Nov 11, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/mcp-open-oauth

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

claude.ai's connector submission failed with "Couldn't register with p0dcasters's sign-in service". dev2 nginx shows Anthropic's tester (160.79.106.x, python-httpx) gets 200 from POST /api/mcp, then runs OAuth discovery and DCR anyway: three .well-known lookups and POST /register, all 404.

This adds an open sign-in that grants nothing:

  • /.well-known/oauth-protected-resource[/api/mcp] (RFC 9728) and /.well-known/oauth-authorization-server (RFC 8414)
  • POST /api/v1/mcp/oauth/register: stateless DCR (RFC 7591), https or loopback redirect_uris only
  • GET /api/v1/mcp/oauth/authorize: no login, 302 back with a code; refuses non-https/non-loopback redirects
  • POST /api/v1/mcp/oauth/token: verifies PKCE S256, issues opaque open_ tokens
  • the token isn't an OpenAccess token, so the review/profile tools still refuse (tested)
  • /api/v1/mcp/oauth/ added to the crawl gateway's openPaths

Verified locally on a production build through the middleware as ClaudeBot: discovery 200, register 201, authorize 302 to the claude.ai callback, token 200, tools/list 200 with the bearer. 113 tests pass, tsc clean.

🤖 Generated with Claude Code

…0.7.0)

claude.ai's connector flow runs OAuth discovery and dynamic client
registration even for a no-auth server (nginx: POST /api/mcp 200, then
.well-known lookups and POST /register, all 404 -> 'Couldn't register with
p0dcasters's sign-in service'). The site now answers every step and grants
nothing by it: RFC 9728/8414 metadata, stateless RFC 7591 registration,
authorize with no login (https or loopback redirects only), PKCE-checked
token endpoint issuing opaque open_ tokens that bearerPrincipal ignores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

0 finding(s) in the 9 file(s) this pull request changes.

Nothing in the files this pull request changes.

46 pre-existing finding(s) elsewhere in the repository — **HIGH**: 3 | **MEDIUM**: 37 | **LOW**: 6

Not introduced by this pull request.

Severity Rule Location
HIGH secret-database-url .github/workflows/ci.yml:28
HIGH js-ssrf-outbound-request public/sw.js:45
HIGH js-ssrf-outbound-request src/app/api/audio/route.ts:34
MEDIUM sql-template-interpolation scripts/build_live.py:16
MEDIUM sql-template-interpolation scripts/build_live.py:28
MEDIUM sql-string-concatenation scripts/export_indie.py:221
MEDIUM sql-template-interpolation scripts/load_directory.mjs:84
MEDIUM sql-template-interpolation scripts/load_directory.mjs:112
MEDIUM sql-template-interpolation scripts/load_directory.mjs:173
MEDIUM js-unescaped-html-sink src/app/about/page.tsx:101
MEDIUM sql-template-interpolation src/app/category/[category]/page.tsx:62
MEDIUM js-unescaped-html-sink src/app/category/[category]/page.tsx:75
MEDIUM sql-template-interpolation src/app/language/[lang]/page.tsx:64
MEDIUM sql-template-interpolation src/app/language/[lang]/page.tsx:78
MEDIUM js-unescaped-html-sink src/app/language/[lang]/page.tsx:91
MEDIUM js-unescaped-html-sink src/app/layout.tsx:153
MEDIUM sql-template-interpolation src/app/networks/[slug]/page.tsx:47
MEDIUM sql-template-interpolation src/app/networks/[slug]/page.tsx:49
MEDIUM js-unescaped-html-sink src/app/networks/[slug]/page.tsx:62
MEDIUM sql-template-interpolation src/app/networks/page.tsx:23

…and 26 more; the full set is in the SARIF artifact.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit fdddb83 into master Nov 11, 2026
5 checks passed
@ralyodio
ralyodio deleted the feat/mcp-open-oauth branch November 11, 2026 21:45
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