Skip to content
Skip to Content
Developers

AI app sign-in

Todoku is its own OAuth 2.1 server. The person signs one wallet message on todokupay.xyz; the AI app gets a token for mcp.todokupay.xyz/mcp that can read your orders and make pay links in your name, never pay.

EndpointPath
Protected resource metadata (RFC 9728)https://mcp.todokupay.xyz/.well-known/oauth-protected-resource/mcp
Authorization server metadata (RFC 8414)/.well-known/oauth-authorization-server
Authorize/oauth/authorize → the consent page /oauth/connect
TokenPOST /api/oauth/token
Register (RFC 7591)POST /api/oauth/register
Revoke (RFC 7009)POST /api/oauth/revoke

The flow

  1. A personal tool answers 401. The app reads the resource metadata, then the server metadata.
  2. Client: apps with a client metadata document (CIMD) from claude.ai, claude.com or chatgpt.com are fetched and trusted by host; any other app registers itself (dynamic registration) and is shown as "(unverified)".
  3. Authorize: code flow only, PKCE S256 only, the resource must be https://mcp.todokupay.xyz/mcp, scope account. Todoku's consent page names the app and where it sends you back.
  4. Consent: the wallet signs one sign-in message that names the app and says it can't move money. The page checks the request's origin and a cookie set for that one request.
  5. Tokens: a single-use code (60 seconds) for an access token (1 hour) and a refresh token (30 days, replaced on every use). Reusing a code, or an old refresh token after a 30-second grace, revokes the whole grant. Only SHA-256 hashes of tokens are stored.

The rules

  • The consent page can't be framed by another site.
  • A redirect must match exactly; a loopback address may use any port.
  • The person can disconnect any app in Account → AI apps, which revokes the grant and every token.
  • surface:mcp_auth stops new sign-ins.

On this page