OAuth 2.1
The OAuth deployment behind the MCP server is open to any client. Dynamic client registration means nothing to pre-arrange; PKCE means no secrets in a desktop app; resource indicators mean a token minted for one audience cannot be replayed at another.
Endpoints
Everything is discoverable — a client never needs a URL pasted by hand.
| Endpoint | Purpose | Spec |
|---|---|---|
| POST /oauth/register | Dynamic client registration | RFC 7591 |
| GET /oauth/authorize | Consent screen | OAuth 2.1 |
| POST /oauth/authorize | Approve or deny | OAuth 2.1 |
| POST /oauth/token | Code and refresh exchange | RFC 6749 |
| POST /oauth/revoke | Revocation | RFC 7009 |
https://secretvoice.dev/.well-known/oauth-authorization-server https://api.secretvoice.dev/.well-known/oauth-protected-resource
Scopes
Ask for the minimum; a token that cannot generate cannot spend your credits.
| Scope | Grants |
|---|---|
| voices:read | List voices and languages |
| tts:generate | Generate audio — this spends credits |
| history:read | Read generation history |
| account:read | Read plan and balance |
The flow
1 · Register
POST /oauth/register
{
"client_name": "My agent",
"redirect_uris": ["http://127.0.0.1:33418/callback"]
}
→ 201 { "client_id": "ip…-…" }
2 · Authorize
GET /oauth/authorize?response_type=code &client_id=…&redirect_uri=… &scope=voices:read%20tts:generate &code_challenge=…&code_challenge_method=S256 &resource=https://api.secretvoice.dev
3 · Exchange
POST /oauth/token
grant_type=authorization_code&code=…&client_id=…
&redirect_uri=…&code_verifier=…
→ { access_token, refresh_token, expires_in: 3600, scope }
4 · Call
POST https://api.secretvoice.dev/mcp authorization: Bearer <access_token>
Security
Questions