Skip to content

docs(rfc): RFC-0044 remote MCP authorization (OAuth 2.1) - #146

Merged
Madraka merged 5 commits into
mainfrom
claude/rfc-mcp-oauth-c4a2eb
Nov 7, 2026
Merged

Madraka merged 5 commits into
mainfrom
claude/rfc-mcp-oauth-c4a2eb

Conversation

@Madraka

@Madraka Madraka commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

What

RFC-0044, "Remote MCP authorization: OAuth 2.1 for Cloudhal deployments", for #144. Documentation only: no runtime code, no tests run.

The RFC decides, with alternatives: RFC 9728 resource metadata and the WWW-Authenticate challenge on /mcp (plus the 403 insufficient_scope step-up); Better Auth's mcp() + jwt() + cimd() plugins as the authorization server on the same database (issuer <origin>/api/auth, JWT access tokens verified locally against the jwks table plus one agent_grants row read for mode, elevation and immediate revocation); CIMD first with rate-limited, pruned DCR as the fallback (switchable); a Studio consent screen and "Connected agents" section; token → Principal so the policy engine, audit log, approvals, modes and elevations are unchanged and agent keys keep working; threat model; migration 0030_oauth and the Better Auth 1.7.12 → 1.7.18 family bump; test plan on sqlite + Miniflare D1 and an e2e test with the MCP client's OAuthClientProvider; three rollout phases matching #144 and the ADRs each amends (ADR-0004 addendum, ADR-0010, ADR-0011 §5–6); a self-host section that depends on #143's --base-url; a client compatibility table (Claude apps, Claude Code, ChatGPT/Codex, Cursor, VS Code, SDK/Inspector).

Open questions for the owner are at the end (DCR on by default, refresh reuse window, token lifetime, mode at consent, pre-registered clients, DPoP, consent memory, host allow-list, playground).

The docs site builds the RFC index from docs/rfcs, so no index file was edited.

Checklist

  • pnpm check and cargo test --workspace pass locally — pnpm lint is green; the full suites were not run (docs-only change, and the owner's machine must not run several suites at once)
  • Contract change? pnpm gen was run and generated files are committed (docs/adr/0001) — n/a
  • User-visible change in a published package? pnpm changeset added — n/a
  • Commits are signed off (git commit -s, DCO)
  • Docs / AGENTS.md updated if behaviour or commands changed — n/a (RFC only)

🤖 Generated with Claude Code

OAuth 2.1 for a deployment's /mcp (#144): RFC 9728 resource metadata and
the WWW-Authenticate challenge, Better Auth's mcp() plugin as the
authorization server on the same database (JWT access tokens verified
locally plus a grant row), CIMD first with limited DCR as the fallback, a
Studio consent screen and "Connected agents", token-to-Principal mapping
that keeps one authorization path, threat model, migrations, test plan,
rollout phases and client compatibility.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka Madraka added the rfc A design proposal in docs/rfcs label Nov 7, 2026
Madraka and others added 4 commits November 8, 2026 01:24
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Madraka added a commit that referenced this pull request Nov 7, 2026
The docs site publishes only pages on the branch; the RFC file lands with #146.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka
Madraka merged commit 5a9a7b8 into main Nov 7, 2026
4 checks passed
@Madraka
Madraka deleted the claude/rfc-mcp-oauth-c4a2eb branch November 7, 2026 23:26
Madraka added a commit that referenced this pull request Nov 7, 2026
The RFC file is on main since #146.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfc A design proposal in docs/rfcs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant