curl --request GET \
--url https://api.coderabbit.ai/v1/metrics/mcp \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/metrics/mcp"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/metrics/mcp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"pr_url": "<string>",
"organization_id": "<string>",
"repository_id": "<string>",
"author_id": "<string>",
"merged_at": "2023-11-07T05:31:56Z",
"servers": [
{
"server_name": "<string>",
"insight_count": 123,
"tools": [
{
"tool_name": "<string>",
"call_count": 123
}
]
}
]
}
],
"next_cursor": "<string>"
}{
"errors": [
{
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "METRICS_PREPARING",
"message": "<string>"
}
]
}Get MCP server usage by pull request
Returns 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.
curl --request GET \
--url https://api.coderabbit.ai/v1/metrics/mcp \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/metrics/mcp"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/metrics/mcp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"pr_url": "<string>",
"organization_id": "<string>",
"repository_id": "<string>",
"author_id": "<string>",
"merged_at": "2023-11-07T05:31:56Z",
"servers": [
{
"server_name": "<string>",
"insight_count": 123,
"tools": [
{
"tool_name": "<string>",
"call_count": 123
}
]
}
]
}
],
"next_cursor": "<string>"
}{
"errors": [
{
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "METRICS_PREPARING",
"message": "<string>"
}
]
}- CLI Tool
- MCP Server
coderabbit api request "/metrics/mcp?start_date=$START_DATE&end_date=$END_DATE"
Authorizations
See Authentication for the key types and where to create a key.
Query Parameters
Was this page helpful?