Route Categories
OAuth Discovery Endpoints
These endpoints support OAuth 2.0 Resource Server metadata discovery and anonymous authentication:/.well-known/oauth-protected-resource- OAuth Protected Resource metadata/.well-known/oauth-authorization-server- OAuth Authorization Server metadata (proxy)/.well-known/jwks.json- JSON Web Key Set for anonymous tokens/auth/anonymous/token- Anonymous authentication token issuance
MCP Protocol Endpoints
Model Context Protocol endpoints for authenticated and anonymous access:/v1/mcp(POST, GET, DELETE) - Authenticated MCP endpoint/mcp(POST, GET, DELETE) - Legacy authenticated MCP endpoint/v1/mcp/anonymous(POST, GET, DELETE) - Anonymous MCP with API key auth/mcp/anonymous(POST, GET, DELETE) - Legacy anonymous MCP endpoint
workspaceId query parameter.
Webhook Endpoints
Third-party service webhooks handled by Executor:/stripe/webhook- Stripe payment webhooks- WorkOS AuthKit webhooks - Dynamically registered by
@convex-dev/workos-authkit
Authentication Methods
OAuth 2.0 Bearer Tokens
MCP endpoints (/v1/mcp, /mcp) require OAuth 2.0 bearer tokens:
MCP_AUTHORIZATION_SERVERMCP_AUTHORIZATION_SERVER_URLWORKOS_AUTHKIT_ISSUERWORKOS_AUTHKIT_DOMAIN
API Key Authentication
Anonymous MCP endpoints (/v1/mcp/anonymous, /mcp/anonymous) use API key authentication:
Anonymous JWT Tokens
The/auth/anonymous/token endpoint issues short-lived JWT tokens for anonymous access:
iss- Issuer (deployment URL)sub- Anonymous account IDaud- Audience (alwaysexecutor-anonymous)provider- Always"anonymous"
Rate Limiting
All HTTP endpoints enforce rate limiting based on IP address and user agent:MCP endpoints: 120 requests per minute (capacity: 120)
Anonymous token endpoint: 30 requests per minute (capacity: 30)
Global bootstrap: 180 requests per minute (capacity: 180)
Per-key bootstrap: 24 requests per minute (capacity: 24)
429 and a Retry-After header (in seconds).
Error Responses
401 Unauthorized
Returned when authentication is required but not provided or invalid:WWW-Authenticate header:
403 Forbidden
Returned when authentication succeeds but authorization fails:404 Not Found
Returned when OAuth is not configured in self-hosted deployments:429 Too Many Requests
Returned when rate limits are exceeded:503 Service Unavailable
Returned when required configuration is missing in cloud deployments:Source Files
HTTP routes are defined in:executor/packages/database/convex/http.ts:12-38- Route registrationexecutor/packages/database/convex/http/oauth_handlers.ts- OAuth discoveryexecutor/packages/database/convex/http/anonymous_auth.ts- Anonymous authexecutor/packages/database/convex/http/mcp_handler.ts- MCP protocolexecutor/packages/database/convex/http/mcp_auth.ts- MCP authenticationexecutor/packages/database/convex/http/rate_limit.ts- Rate limitingexecutor/packages/database/convex/auth.ts- WorkOS AuthKit integration