How MCP usage is measured
All MCP traffic enters Fusion through the API gateway at the/mcp route.
The gateway records a per-route latency histogram, gateway_request_time_secs, on every request.
The label routeId="mcp-server" isolates MCP traffic from all other gateway routes, providing a clean MCP-only view without touching the MCP server itself.
The histogram carries these labels:
| Label | Meaning |
|---|---|
routeId | Gateway route; mcp-server = MCP traffic |
httpMethod | HTTP method (the MCP server uses POST) |
httpStatusCode | Response status code (200, 202, 404, …) |
outcome | SUCCESSFUL, CLIENT_ERROR, SERVER_ERROR |
status | Spring HTTP status enum (OK, ACCEPTED, …) |
gateway_request_time_secs_count— total number of requestsgateway_request_time_secs_sum— sum of all request durations in secondsgateway_request_time_secs_bucket— histogram buckets that power the latency percentiles
Prerequisites
- Fusion 5.17 or later with Lucidworks MCP Server deployed and serving traffic
- Prometheus (or any Prometheus-compatible TSDB) able to scrape your Fusion cluster
- Grafana with your Prometheus configured as a data source
Set up MCP monitoring
Setup steps
Setup steps
Configure Prometheus to scrape the API gateway.
/actuator/prometheus endpoint on port 6764.
Use whichever method matches your setup:- Prometheus Operator
- Scrape annotations
- Static configuration
ServiceMonitor resource:PodMonitor resources instead of services, use a PodMonitor with the same selector and a podMetricsEndpoints entry on port 6764.Verify the metrics collection.
routeId="mcp-server" once the MCP server has received traffic.
If it’s absent, confirm the scrape target is UP and that MCP requests have actually been made.Import the Grafana dashboard.
- Download mcp-usage-dashboard-portable.json.
- In Grafana, go to Dashboards → New → Import.
- Upload the JSON file.
- When prompted, select your Prometheus data source.
- Click Save.
Dashboard panels
The imported dashboard includes panels organized into three sections: overview metrics, latency analysis, and traffic breakdown.
Overview metrics
| Panel | Description |
|---|---|
| Total MCP Requests | Total MCP calls over the selected range |
| Request Rate | Current throughput in requests per second |
| Error Rate | Percent of MCP requests that failed with 4xx or 5xx status codes; green (less than 1%), yellow (1-5%), red (greater than 5%) |
| Avg Latency | Average MCP response time in milliseconds |
Latency metrics
| Panel | Description |
|---|---|
| MCP Latency Percentiles | p50, p95, and p99 latency distribution from the histogram |
| Average Latency | Average response time over time |
Traffic metrics and errors
| Panel | Description |
|---|---|
| MCP Request Rate by Status Code | Throughput split by HTTP status code |
| Error Rate | Failure percentage over time |
| Requests by Outcome | Success versus client and server error breakdown |
| Total MCP Requests Over Time | Single-line graph showing total request volume trend |
PromQL query examples
Use these queries to build custom dashboard panels or understand what powers each panel in the imported dashboard. Replace$namespace with your Kubernetes namespace or use .* to match all namespaces.
Total requests (over the dashboard range)
Total requests (over the dashboard range)
Total requests over time
Total requests over time
Request rate (req/s)
Request rate (req/s)
Error rate (%)
Error rate (%)
Average latency (ms)
Average latency (ms)
p50 latency (ms)
p50 latency (ms)
p95 latency (ms)
p95 latency (ms)
p99 latency (ms)
p99 latency (ms)
Requests by status code (req/s)
Requests by status code (req/s)
Troubleshooting
No mcp-server series appears
No mcp-server series appears
up{job="fusion-api-gateway"} and check that the /mcp endpoint is in use.Percentile panels are empty
Percentile panels are empty
gateway_request_time_secs_bucket series exist.
Some scrape pipelines drop histogram buckets via a keep/drop relabel rule — make sure _bucket series are retained.Latency values seem wrong
Latency values seem wrong
gateway_request_time_secs is measured in seconds; the dashboard multiplies by 1000 to display milliseconds.Metrics endpoint requires authentication
Metrics endpoint requires authentication
Notes
- This dashboard measures MCP usage at the gateway, which is the cleanest signal for request volume, status, and latency.
It does not break usage down per MCP tool (such as
search_documents,get_document) — that would require additional instrumentation in the MCP server. - The same metric (
spring_cloud_gateway_requests_seconds) is also emitted by the gateway as a Micrometer summary; this guide uses thegateway_request_time_secshistogram because it supports latency percentiles.