ReferenceOAuth 2.1
OAuth Reference
Specification reference for Taicket OAuth 2.1 grants, parameters, scopes, token lifetimes, error responses, and RFC 9728 / RFC 8414 discovery metadata.
Supported grant types and scopes
| Property | Supported Values |
|---|---|
| Grant types | authorization_code, refresh_token |
| Response types | code |
| PKCE methods | S256 only (plain is rejected) |
| Client registration | CIMD (pinned HTTPS metadata URL) and RFC 7591 DCR (POST /oauth/register) |
| Token endpoint auth methods | none (public PKCE clients) |
| Resource indicator (RFC 8707) | https://mcp.taicket.xyz/mcp |
| Scope | Capabilities Granted | Typical Tools |
|---|---|---|
| mcp:read | Inspect user profile, manageable servers, guild topology, 29-module config (field-RBAC projected), readiness status, and privacy-safe logs/analytics. | get_user, get_discord_servers, get_server_topology, get_available_features, get_server_configuration, preview_setup, get_setup_status, read_server_logs_and_analytics |
| mcp:write | Apply non-destructive configuration updates across authorized modules subject to live RBAC and 18-surface tier gates. | apply_setup (non-destructive), all configure_* tools (non-destructive updates) |
| mcp:deploy | Post or edit verified Components V2 panels (flags: 32768), dispatch module test messages, and trigger rules ingestion sync. | deploy_discord_panel |
| mcp:destructive | Delete persisted panels, custom commands, component items, or reaction role panels; execute structural Verification/Jail auto-setup. Always paired with browser approval at /oauth/approve-action. | apply_setup (destructive/structural), delete or auto-setup actions on configure_* |
Token and state lifetimes (TTL)
| Artifact | Lifetime / TTL | Storage Collection | Notes |
|---|---|---|---|
| OAuth Transaction | 10 minutes | McpOAuthTransaction | Bound to HttpOnly cookie hash + CSRF token hash |
| Authorization Code | 60 seconds | McpOAuthCode | Single-use, SHA-256 hashed, marked consumedAt on exchange |
| OAuth Access Token | 1 hour (3,600s) | McpAccessToken | SHA-256 hashed, RFC 8707 resource bound |
| OAuth Refresh Token | 30 days | McpRefreshToken | SHA-256 hashed, atomic rotation, replay revokes entire familyId |
| Scoped Personal Access Token | 7d, 30d, or 90d | McpAccessToken | Mandatory expiry; max 10 active PATs per Discord user |
| Setup Preview & Approval Plan | 15 minutes | McpSetupPreview | Single-use confirmationToken + payloadHash binding |
Core OAuth endpoint parameters
| Endpoint | Required Parameters | Optional Parameters |
|---|---|---|
| GET /oauth/authorize | response_type=code, client_id, redirect_uri, code_challenge, code_challenge_method=S256, state, resource | scope (space-delimited subset of supported scopes) |
| POST /oauth/token (auth code) | grant_type=authorization_code, client_id, code, redirect_uri, code_verifier, resource | None |
| POST /oauth/token (refresh) | grant_type=refresh_token, client_id, refresh_token, resource | scope (must be equal to or narrower than grant scopes) |
| POST /oauth/revoke | token | token_type_hint (access_token or refresh_token), client_id |
OAuth 2.1 error codes
| OAuth error | HTTP Status | Condition |
|---|---|---|
| invalid_request | 400 | Missing required parameter, malformed redirect_uri, missing PKCE S256 challenge, or unsupported parameter format. |
| invalid_client | 401 / 400 | Unknown client_id, failed CIMD metadata resolution, or unregistered redirect_uri. |
| invalid_grant | 400 | Expired/consumed authorization code, PKCE verifier mismatch, expired refresh token, or refresh token reuse detected. |
| invalid_scope | 400 | Requested scope is outside [mcp:read, mcp:write, mcp:deploy, mcp:destructive]. |
| invalid_target | 400 | RFC 8707 resource parameter does not match https://mcp.taicket.xyz/mcp. |
| unsupported_grant_type | 400 | Grant type other than authorization_code or refresh_token. |
| access_denied | 302 / 403 | Server manager declined consent or Discord account is blacklisted. |
Well-known discovery JSON payloads
GET /.well-known/oauth-protected-resourcejson
{
"resource": "https://mcp.taicket.xyz/mcp",
"authorization_servers": [
"https://mcp.taicket.xyz"
],
"bearer_methods_supported": [
"header"
],
"scopes_supported": [
"mcp:read",
"mcp:write",
"mcp:deploy",
"mcp:destructive"
],
"resource_documentation": "https://mcp.taicket.xyz/docs/introduction/overview"
}GET /.well-known/oauth-authorization-serverjson
{
"issuer": "https://mcp.taicket.xyz",
"authorization_endpoint": "https://mcp.taicket.xyz/oauth/authorize",
"token_endpoint": "https://mcp.taicket.xyz/oauth/token",
"registration_endpoint": "https://mcp.taicket.xyz/oauth/register",
"revocation_endpoint": "https://mcp.taicket.xyz/oauth/revoke",
"response_types_supported": [
"code"
],
"grant_types_supported": [
"authorization_code",
"refresh_token"
],
"code_challenge_methods_supported": [
"S256"
],
"token_endpoint_auth_methods_supported": [
"none"
],
"scopes_supported": [
"mcp:read",
"mcp:write",
"mcp:deploy",
"mcp:destructive"
],
"client_id_metadata_document_supported": true
}