---
title: "Get MCP cost histogram"
method: GET
path: "/api/mcp-logs/histogram/cost"
tags: ["Logging"]
---

# Get MCP cost histogram

`GET /api/mcp-logs/histogram/cost`

Returns time-bucketed MCP tool call cost data.

## Query parameters

- `tool_names` string
- `server_labels` string
- `status` string
- `virtual_key_ids` string
- `llm_request_ids` string
- `start_time` string, date-time
- `end_time` string, date-time
- `min_latency` number
- `max_latency` number
- `content_search` string

## Response `200`

MCP cost histogram retrieved successfully

- object — Time-bucketed MCP cost histogram
  - `buckets` object[]
    - `timestamp` string, date-time
    - `total_cost` number
  - `bucket_size_seconds` integer

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
