Identity & auth
mcp_rate_limits
Fixed-window rate limits for /mcp and the OAuth endpoints: one row per key (token grant or client IP hash) per window. Old windows are pruned as we go.
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| key | text | no | — | |
| window_start | timestamp | no | — | |
| count | integer | no | 0 |
Value lists come from .$type<'a' | 'b'>() in the schema — enforced in TypeScript only, not by the database.
Keys, constraints & indexes
Unique
None besides the primary key.
Indexes
- (key, window_start)uniquemcp_rate_limits_key_window_uidx
Foreign keys
None.
Used by
Code that reads or writes this table, found by static analysis of the tRPC routers and API handlers (including helpers they call).
tRPC procedures
No public or signed-in procedure.
REST & webhooks
- ANY /mcp
- ANY /mcp/public
- ANY /oauth/register
- ANY /oauth/revoke
- ANY /oauth/token
Relations
Rendering diagram…
Diagram source
erDiagram
mcp_rate_limits {
} Defined at server/database/schema.ts:1427 as mcpRateLimits.