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.
| Endpoint | Path |
|---|---|
| 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 |
| Token | POST /api/oauth/token |
| Register (RFC 7591) | POST /api/oauth/register |
| Revoke (RFC 7009) | POST /api/oauth/revoke |
The flow
- A personal tool answers 401. The app reads the resource metadata, then the server metadata.
- 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)".
- Authorize: code flow only, PKCE S256 only, the
resourcemust behttps://mcp.todokupay.xyz/mcp, scopeaccount. Todoku's consent page names the app and where it sends you back. - 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.
- 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_authstops new sign-ins.
MCP endpoint
Eight tools at mcp.todokupay.xyz/mcp that let any AI app price bills, make pay links and follow orders, with a card that renders in the chat. It never holds keys.
Escrow events
Every order's life on QIE as events you can index yourself. Ids and amounts only, never a phone number, meter or name.