Skip to main content
Ecosystem & Marketplaces›Open-Source MCP Servers (10)›Tempo MCP Server

Tempo MCP server

The Tempo MCP Server is a Model Context Protocol server for distributed tracing and microservice root-cause analysis with Grafana Tempo. It exposes 16 tools, 11 tempo:// resources, and 5 guided tracing prompts supporting TraceQL search, critical-path waterfall summarization (application/vnd.grafana.llm), TraceQL RED metrics, service dependency graphs, and log-to-trace / metric-to-trace cross-pillar pivots.

Core capabilities​

Capability DomainWhat the Server Provides
TraceQL Search & K8s MappingTranslates Kubernetes metadata (namespace, service, deployment, pod) into canonical OpenTelemetry TraceQL attributes with enforced time bounds and result limits.
Critical-Path SummarizationNegotiates Tempo 2.9+ LLM format (application/vnd.grafana.llm), extracts the synchronous critical path, isolates root-cause error spans, and performs time-gap analysis.
TraceQL RED MetricsExecutes instant and range TraceQL metric queries (rate(), count_over_time(), quantile_over_time()) to evaluate request rate, error rate, and P95/P99 latency trends before fetching individual traces.
Cross-Pillar CorrelationPivots directly from Loki log lines containing trace IDs (tempo_get_trace_from_log) or extracts exemplar trace IDs from metric spikes (tempo_get_exemplar_traces).
Service Topology & DiagnosticsMaps live service dependency graphs from Tempo metrics-generator series and inspects Tempo ring members, ingesters, and compactors.

Position in the TalkOps observability stack​

Architecture​

Tool summary​

ToolCategoryDescription
tempo_traceql_searchSearchSearch traces using raw TraceQL or structured Kubernetes service/duration/status filters
tempo_get_traceRetrievalRetrieve a single trace by ID in LLM-optimized waterfall format
tempo_summarize_traceAnalysisExtract critical path latency breakdown, root-cause error spans, and unexplained time gaps
tempo_compare_tracesAnalysisCompare baseline vs. degraded traces across span count, duration, errors, attributes, and critical path
tempo_find_related_tracesCorrelationFind correlated traces via same_service_errors, same_endpoint, or temporal_neighbors
tempo_traceql_metrics_rangeMetricsExecute TraceQL metric range queries for RED trends and SLO evaluation
tempo_traceql_metrics_instantMetricsExecute instant TraceQL metric snapshots
tempo_get_exemplar_tracesPivotsExtract exemplar trace IDs from TraceQL metric spikes
tempo_get_trace_from_logPivotsParse a trace ID from a log message and return the summarized trace
tempo_get_service_dependenciesTopologyMap live service dependency graphs with per-edge call rates and error percentages
tempo_get_attribute_namesSchemaDiscover indexed attribute names across resource, span, and intrinsic scopes
tempo_get_attribute_valuesSchemaEnumerate distinct values for a trace attribute
tempo_get_k8s_attribute_mapSchemaReturn canonical mapping between Kubernetes labels and OTel trace attributes
tempo_list_backendsDiagnosticsList configured Tempo backends with health status
tempo_get_diagnosticsDiagnosticsInspect Tempo backend build info, ring status, and component health
tempo_generate_alerting_expressionAlertingGenerate PromQL alerting rules from observed trace latency or error patterns

Quickstart​

1
Start the Tempo MCP Server container

Point TEMPO_BASE_URL to your Grafana Tempo query-frontend or distributor endpoint:

docker run --rm -it \
-p 8768:8768 \
-e MCP_TRANSPORT=http \
-e TEMPO_BASE_URL=http://tempo.monitoring:3200 \
talkopsai/tempo-mcp-server:latest
2
Connect your MCP client

Register the HTTP endpoint or launch via uvx over stdio:

mcp.json
{
"mcpServers": {
"tempo": {
"url": "http://localhost:8768/mcp",
"description": "TalkOps Tempo MCP Server for Distributed Tracing"
}
}
}

Security and payload guardrails​

  • LLM context protection: Enforces TEMPO_MAX_SEARCH_LIMIT=100 and compresses multi-megabyte OTLP span trees into concise critical-path summaries so raw traces never overflow the agent's context window.
  • Multi-tenant isolation: Configure TEMPO_MULTI_TENANT=true and TEMPO_DEFAULT_TENANT to scope all queries with X-Scope-OrgID.