You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Act as an OAuth authorization server for MCP clients (DCR) instead of per-client API keys #1971
Problem
Every MCP client needs a key generated in MCPProxy and pasted into its config. That's manual, the key sits in plaintext in client config files, and rotating it means editing every client.
Proposal
Let MCPProxy be the OAuth 2.1 authorization server for its own MCP endpoint, following the MCP authorization spec. A client is set up with just a URL, e.g. http://127.0.0.1:8080/mcp/oauth (a separate path, so /mcp behaves as it does today), and logs in on its own:
A request without a token gets 401 + WWW-Authenticate: Bearer resource_metadata=… (RFC 9728).
The client discovers /.well-known/oauth-authorization-server (RFC 8414) and registers via DCR (RFC 7591).
The browser opens a consent page in the Web UI. The logged-in admin approves it and can pick a profile or which servers it can reach.
Issued tokens are agent tokens underneath, so profiles, scoping, activity attribution and revocation keep working. The client shows up in the Clients hub under its approved registration.
Security
Approval needs a Web UI session; registrations that are never approved expire. DCR is rate-limited and capped.
client_name is self-asserted, so a client is identified by its approved registration, not its name.
Redirect URIs are limited to loopback or HTTPS (RFC 8252).
API keys and agent tokens stay available for headless clients.
Related
Spec 089 (remote access tunnel) already plans these endpoints (DCR, authorize/consent, token) for tunneled traffic. Building them for the local endpoint first would give the tunnel its login check for free.
I have no problem with the per-client URL, but I think it would be nicer to choose the profile in the consent page.
I would also pre-fill it based on the client name, which I suppose will be enough for most cases, while still allowing users to override it during consent page.
Activity
test(oauth): scope the no-storage check to browser-login state (Spec …
Dumbris commentedon Nov 22, 2026
@felipecrs thanks for this, I like the idea and started on it. Spec is in #1996. It will be opt-in at first, and API keys stay.
One UX question where I'd like your opinion: after the OAuth login, how should MCPProxy know which client it is, so it can apply the right profile?
client_namefrom DCR is self-reported, so I don't want to trust it. Current plan:/mcp/oauth/cursor. The consent page says "Sign-in request for Cursor" and uses Cursor's profile. One click./mcp/oauthURL also works. There you pick "new client" or an existing one, plus a profile, on the consent page.Does that match how you'd expect it to work? Or would you rather always choose the profile on the consent page, whatever the URL is?
docs(spec): record storage decisions from PR-1c review (spec 132)
felipecrs commentedon Nov 22, 2026
I have no problem with the per-client URL, but I think it would be nicer to choose the profile in the consent page.
I would also pre-fill it based on the client name, which I suppose will be enough for most cases, while still allowing users to override it during consent page.
docs(oauth): record the Claude Code real-client check (Spec 132 PR-1f)
docs(spec): name suggestion on the generic address (spec 132)
docs(spec): address review of the name suggestion (spec 132)
feat(oauth): opt-in switch and default-off gate for browser login (Sp…
feat(oauth): protocol logic for browser login (Spec 132 PR-1b)
fix(oauth): tighten redirect matching and bound in-memory state (Spec…
fix(oauth): align code and request expiry, make limiter admission ato…
fix(oauth): consent page review round 1, backend (Spec 132 PR-2a)
fix(oauth): consent page review round 1, page and replace ownership (…
fix(oauth): consent page review round 2 (Spec 132 PR-2a)
fix(oauth): consent page review round 3 (Spec 132 PR-2a)
33 remaining items
docs: trim the oldest Recent Changes entries from CLAUDE.md
test(oauth): end-to-end script, docs and real-client record for brows…
test(oauth): run the consent spec in the Web UI sweep (Spec 132 PR-2a)
feat(oauth): consent page with client name suggestion for browser log…
feat(oauth): manage browser logins in Clients hub, CLI and MCP (Spec …
feat(oauth): sign-in requests in the macOS tray (Spec 132 PR-2c) (#2022)
fix(connect): supersede undo records by config generation, not time (…
fix(connect): serialise undo-state writers and make the state durable…
fix(connect): lock the config directory across processes for undo sta…
docs: note undo state and config lock for Connect browser login (Spec…
test(connect): strip Vue comment placeholders until stable (Spec 132 …
test(connect): run the feature-off golden on macOS only (Spec 132 PR-3)
feat(connect): browser-login choice in Connect (Spec 132 PR-3) (#2025)
fix(connect): keep fileDigest as a direct SHA-256 call
fix(connect): resolve the undo backup from the directory listing (#2028)