Get MCP server usage by pull request
Changed onReturns one JSON row per merged, reviewed pull request that used MCP, with MCP servers and tools nested under servers. Join to GET /v1/metrics/reviews on pr_url. Counts are best-effort usage telemetry. Access is controlled by an organization-scoped feature flag. Pagination is in write order rather than by merge date, so a pull request written after your cursor already passed its merge date (a backfill) still appears on a later page instead of being silently skipped. Each page request consumes one token when admitted by the request rate limiter. Reviews, review comments, and MCP share the Metrics quota for the configured quota owner. With verified owner scope, coordinate calls across API keys for the same organization, workspace, or Git-provider instance; changing an organization selector does not add quota.
Request
- Base URLhttps://api.coderabbit.ai
- AuthAPI key in header x-coderabbitai-api-key
Query parameters
Workspace API keys only; scopes the request to one provider organization.
Comma-separated provider organization IDs. Self-hosted only; maximum 10.
Comma-separated provider repository IDs; maximum 10.
Comma-separated provider PR-author IDs; maximum 10.
Opaque next_cursor from the previous response.
Headers
Response
MCP server usage for merged pull requests
Changes
- info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status
- info
- info
added the non-success response with the status
- info