Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion reference/mcp/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ mcp:
```javascript
// resources.js
const DAILY_LIMIT = 100;
export class McpQuota extends tables.QuotaCounter {
class McpQuota extends tables.QuotaCounter {
static async allowMcpCall({ identity, tool, user, profile, sessionId }) {
const id = identity ?? 'unknown';
const existing = await McpQuota.get(id);
Expand All @@ -164,6 +164,12 @@ export class McpQuota extends tables.QuotaCounter {
return true;
}
}

// Register the class so the quota hook can resolve it by name — WITHOUT
// module-exporting it, which would surface update_/delete_McpQuota MCP tools
// and a REST endpoint that let a permitted client reset its own counter.
// exportTypes gates each transport independently (see the HTTP API reference).
server.resources.set('McpQuota', McpQuota, { mcp: false, rest: false });
```

### `mcp.<profile>.quota.resource`
Expand Down