OAuth 2.1 Overview
Standards-compliant OAuth 2.1 authentication bridged to Discord OAuth2, plus scoped Personal Access Tokens for headless and custom MCP clients.
Dual Authentication Architecture
Taicket MCP exposes a single protected resource endpoint at https://mcp.taicket.xyz/mcp and supports two bearer authentication flows that converge on the same per-request verification pipeline.
- OAuth 2.1 (Primary):: Authorization Code grant with mandatory PKCE S256, RFC 9728 Protected Resource Metadata, RFC 8414 Authorization Server Metadata, RFC 8707 Resource Indicators, Client ID Metadata Documents (CIMD), RFC 7591 Dynamic Client Registration (DCR), and RFC 7009 Token Revocation. Used by Claude, ChatGPT, Antigravity, Antigravity 2.0, and Gemini.
- Scoped Personal Access Tokens (PAT):: Discord-authenticated bearer tokens prefixed with tmcp_ created in https://mcp.taicket.xyz/account with explicit server allowlists, granular scopes, and mandatory 7, 30, or 90 day expiration. Used by DeepSeek, GLM, Cherry Studio, Cline, Open WebUI, and CLI clients that do not implement interactive MCP OAuth discovery.
Both flows authenticate the human caller against Discord Official OAuth2, store only SHA-256 token hashes in the physically isolated taicket_mcp MongoDB database, and enforce identical guild allowlists, live Discord RBAC checks, 18-surface subscription tier limits, sliding-window rate limits, and tamper-evident audit logging.
Automatic OAuth Discovery (RFC 9728 & RFC 8414)
When an unauthenticated MCP client sends a request to POST /mcp, the server responds with HTTP 401 Unauthorized and a WWW-Authenticate header pointing to the RFC 9728 Protected Resource Metadata document.
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://mcp.taicket.xyz/.well-known/oauth-protected-resource", scope="mcp:read mcp:write"
Content-Type: application/json
{
"error": "unauthorized",
"error_description": "Missing or invalid Bearer token."
}The client fetches /.well-known/oauth-protected-resource to discover the authorization server issuer and supported scopes, then fetches /.well-known/oauth-authorization-server to discover the authorize, token, registration, and revocation endpoints.
{
"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/mcp-reference/endpoint"
}{
"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
}Endpoint Surface
| Method & Path | Standard | Purpose |
|---|---|---|
| GET /.well-known/oauth-protected-resource | RFC 9728 | Declares canonical resource URI and authorization server |
| GET /.well-known/oauth-authorization-server | RFC 8414 | Declares OAuth 2.1 endpoints, PKCE S256, and CIMD support |
| POST /oauth/register | RFC 7591 | Dynamic Client Registration with strict redirect URI validation |
| GET /oauth/authorize | OAuth 2.1 | Initiates PKCE + RFC 8707 transaction and Discord sign-in |
| GET /oauth/discord/callback | Discord OAuth2 | Exchanges upstream Discord code and renders consent screen |
| POST /oauth/consent | OAuth 2.1 | Records server allowlist and scope approval; issues 60s auth code |
| POST /oauth/token | OAuth 2.1 | Exchanges auth code or rotates refresh token for Bearer tokens |
| POST /oauth/revoke | RFC 7009 | Revokes an access token or entire refresh token grant family |
| GET / POST /oauth/approve-action | Taicket MCP | Human browser approval gate for destructive and structural ops |
| GET /account | Taicket MCP | Connected OAuth clients, scoped PAT lifecycle, and audit viewer |
Public clients only (token_endpoint_auth_method: none)
Remote MCP clients operate as public clients using mandatory PKCE S256 and exact redirect URI matching rather than static shared client secrets.