Skip to main content
You can track MCP server usage using metrics exposed by the Fusion API gateway. You only need to scrape a metrics endpoint and import the provided dashboard.
New to Lucidworks MCP? See the MCP Server overview for setup instructions and configuration details.

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: The histogram exposes three series families:
  • gateway_request_time_secs_count — total number of requests
  • gateway_request_time_secs_sum — sum of all request durations in seconds
  • gateway_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
The API gateway exposes Prometheus metrics at port 6764, path /actuator/prometheus.

Set up MCP monitoring

1

Configure Prometheus to scrape the API gateway.

Configure Prometheus to scrape the gateway’s /actuator/prometheus endpoint on port 6764. Use whichever method matches your setup:
Create a ServiceMonitor resource:
If your Prometheus Operator selects PodMonitor resources instead of services, use a PodMonitor with the same selector and a podMetricsEndpoints entry on port 6764.
Cardinality note: gateway_request_time_secs is a histogram across all gateway routes. If you only want MCP metrics and wish to limit series, add a metric_relabel_configs keep rule for gateway_request_time_secs.* where routeId="mcp-server". Otherwise you will also collect percentiles for every other gateway route.
2

Verify the metrics collection.

In Prometheus (or Grafana Explore), run:
You should see a series with 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.
3

Import the Grafana dashboard.

  1. Download mcp-usage-dashboard-portable.json.
  2. In Grafana, go to DashboardsNewImport.
  3. Upload the JSON file.
  4. When prompted, select your Prometheus data source.
  5. Click Save.
The dashboard has a data source dropdown and a Namespace filter at the top so you can scope it to your environment.Alternatively, build your own dashboard using the reference PromQL queries below.

Dashboard panels

The imported dashboard includes panels organized into three sections: overview metrics, latency analysis, and traffic breakdown.
Imported Grafana dashboard showing MCP server usage metrics

Overview metrics

Latency metrics

Traffic metrics and errors

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.

Troubleshooting

The scrape target may not be up, or no MCP traffic has occurred yet. Verify with up{job="fusion-api-gateway"} and check that the /mcp endpoint is in use.
Confirm 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.
gateway_request_time_secs is measured in seconds; the dashboard multiplies by 1000 to display milliseconds.
If you have locked down the actuator endpoint, ensure your Prometheus scrape provides the necessary credentials.

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 the gateway_request_time_secs histogram because it supports latency percentiles.