Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix I: Dashboard and Monitoring Templates

A dashboard for an MCP server has to answer four questions quickly: is the service healthy, what is failing or slowing down, who is affected, and what changed?

Core Panels

PanelWhy it matters
Requests per minute by toolShows whether the issue is broad or isolated
Error rate by outcomeSeparates validation, auth, policy, dependency, and timeout failures
p95 and p99 latency by toolHighlights which operations are actually unusable in conversation
Top tenants or workspaces by trafficExposes noisy-neighbor and abuse patterns
Dependency health and latencyShows whether the server is the problem or an upstream system is
Long-running task backlog and ageStops asynchronous work from becoming an invisible outage
Selection share by catalog_versionCatches a description change that shifted model behavior with no errors
Recent rollouts, flags, and client versionsConnects incidents to changes quickly

Alert Rules

AlertExample thresholdImmediate question to ask
High error rateMore than 5 percent for 5 minutes on a core tool familyIs this auth, schema drift, or dependency failure?
Tail-latency regressionp95 or p99 exceeds its budget for 10 minutesWhich dependency or workflow changed?
Auth failure spikeSudden jump in 401 or 403Did issuer, audience, scopes, or tenant mapping change?
Dependency outageCritical dependency unavailable or timing outWhich tool families should degrade or be disabled?
Task backlog growthQueue age or backlog size above its normal bandAre callbacks, workers, or downstream systems stuck?
Model loop4+ identical calls (same args_hash) in 5 minutesIs an error telling the model to retry when nothing will change?
Cost spikeSudden jump in usage, retries, or token estimatesIs a workflow looping or a tenant misconfigured?

Metric Names and Labels

Derive the metrics from the one event per tool call in Chapter 23 §One Event Per Tool Call. Use the same field names, so a dashboard label and a log field never disagree:

mcp_tool_calls_total{tool, outcome, tenant, client_name, catalog_version, approval}
mcp_tool_duration_seconds{tool, outcome}               # histogram
mcp_auth_failures_total{status, token_aud}              # 401 / 403
mcp_tool_retries_total{tool, client_name}               # calls with retry_count > 0

outcome is the closed set from Chapter 23 (success, empty, validation_error, auth_error, policy_denied, dependency_error, timeout). approval is required or none, because approval-gated paths have different latency and failure profiles. Keep principal and args_hash in logs, not in metric labels. Their cardinality is unbounded.

Error rate by outcome, per tool, over five minutes:

sum by (tool, outcome) (rate(mcp_tool_calls_total{outcome!~"success|empty"}[5m]))
  / ignoring(outcome) group_left
sum by (tool) (rate(mcp_tool_calls_total[5m]))

Trace Context

2026-07-28 reserves traceparent, tracestate and baggage in a request’s _meta for W3C trace context. Continue the client’s trace from _meta.traceparent when it is well formed, fall back to the HTTP traceparent header, and otherwise start a new trace. Put the trace_id on the event, so one click goes from a dashboard spike to the calls behind it. Never use baggage for authorization. → ch23 §Tracing Crosses the Client Hop

Starting SLOs

  • availability: 99.9 percent for core read paths
  • latency: p95 under 2 seconds for common read-oriented tools
  • turn-level latency: every tool call the model makes to answer one user message, end to end, within 10 seconds at p95. The user waits for the whole chain, not for one call
  • error rate: under 1 percent for high-volume stable tools
  • task freshness: backlog age below your agreed user-visible threshold

Write-heavy or approval-heavy paths deserve their own targets. Don’t pretend all tool families are equivalent.

Drill Questions

  1. Can an on-call engineer identify the failing tool family within two minutes?
  2. Can they see whether one tenant or all tenants are affected?
  3. Can they tell whether auth, dependency health, or schema drift is the likeliest cause?
  4. Can they see what changed recently, including catalog_version and client versions, without opening a separate system?