OAuth
Mudda is its own OAuth 2.1 authorization server, following the MCP authorization spec. Most clients do all of this for you; this page is for anyone building one.
The flow
Section titled “The flow”| Step | Endpoint | Standard |
|---|---|---|
A 401 from /mcp carries WWW-Authenticate: Bearer resource_metadata="…", scope="read write" |
/mcp |
RFC 9728 |
The client reads which server issues tokens for /mcp: this one |
GET /.well-known/oauth-protected-resource (also with /mcp appended) |
RFC 9728 |
| …and that server’s endpoints and capabilities | GET /.well-known/oauth-authorization-server (also with a path appended) |
RFC 8414 |
It registers itself, getting a client_id |
POST /oauth/registrations |
RFC 7591 |
| It sends the user to consent, with a PKCE challenge | GET /oauth/authorize |
OAuth 2.1, RFC 7636 |
| It redeems the code (valid 10 minutes) with the PKCE verifier | POST /oauth/token |
OAuth 2.1 |
| It refreshes the hour-long access token as it expires | POST /oauth/token |
OAuth 2.1 |
| It may revoke its own token | POST /oauth/revoke |
RFC 7009 |
| It may ask whether one of its tokens is still active | POST /oauth/introspect |
RFC 7662 |
What is enforced
Section titled “What is enforced”- PKCE with
S256on every authorization, confidential clients included, and only the authorization-code and refresh-token grants. - Consent needs the signed-in browser. A signed-out user is sent to sign in and brought back. A bearer token can’t approve anything, so a read-only token can’t grant itself more.
- The user is always asked. A client that already holds a token is still shown the consent screen, because consent also sets what its session may do.
- The user chooses the scopes. Every scope the client asked for is listed, ticked, and only
those left ticked are granted. Unticking all of them approves nothing. Ask for
read writeunless your client needs to delete; an unknown scope is refused. - The consent screen names where the client will be sent, since anyone can register a client under any name.
- Redirect URIs must be
https,httpon a loopback host (localhost,127.0.0.1,::1) for native clients, or a private-use scheme in thescheme://form (cursor://…). Out-of-band URIs are refused. - A
resource(RFC 8707) naming any other server is refused at/oauth/authorize, so tokens from a board only work on that board. - Tokens and client secrets are stored hashed. Access tokens last an hour, and each refresh rotates the refresh token. A refresh token unused for 90 days is refused, so a client that stopped being used has to ask the user again.
- Registration is open but grants nothing on its own, and is limited to 20 an hour per IP address.
Connected clients
Section titled “Connected clients”A connected client is a token like any other, labelled with the client’s name and carrying
the scopes granted, and there is one per client. Consenting under a name that another client
already holds replaces that client’s grant, the way minting replaces a token of the same label.
Claude Code re-registers on each claude mcp add, so that is how its old connection is dropped.
A client’s work is attributed to its name.
Revoking it under API tokens revokes its access and refresh tokens, and consenting again brings it back.
Clients that won’t work
Section titled “Clients that won’t work”The issuer and every URL come from the board’s own host, and clients refuse an issuer that doesn’t match the URL they reached. Browser-only clients that call the token endpoint directly from a page are not supported, because there are no CORS headers. Server-side and native clients (claude.ai, ChatGPT, Claude Code, Cursor) don’t need them.