Skip to content

talkops-ai/tempo

v0.2.1Apache-2.0

Grafana Tempo 2.x/3.x and Tempo Operator (v1alpha1) plugin for TalkOps: TraceQL search, TraceQL Metrics (RED & compare() cohorts), cross-pillar exemplar/log trace pivots, service topology, per-tenant /api/overrides, and Kubernetes TempoStack/TempoMonolithic management.


Let your AI assistant explore distributed traces in Grafana Tempo: search with TraceQL, find slow or failing spans, compare traces, map service dependencies, and jump from a log line or metric to the trace behind it.

What you get

  • 18 MCP tools (16 read-only) that work against your live Grafana Tempo setup
  • 10 resources your assistant can read for context, under tempo://
  • 6 Agent Skills: step-by-step playbooks that teach your assistant how to use the tools well
  • Safe by default: only read-only tools are loaded until you turn on writes, and changes are previewed or confirmed before they happen

Quick start

You'll need:

  • Python 3.12+ and uv, or Docker
  • A Tempo URL
  • Optional: Prometheus (for service graphs) and Kubernetes access (for the Tempo Operator)

1. Add the server to your MCP client. For Claude Desktop, Cursor, Windsurf, and most other clients, add this to your MCP config file:

{
  "mcpServers": {
    "tempo": {
      "command": "uvx",
      "args": [
        "--from",
        "talkops-tempo-mcp-server",
        "tempo-mcp-server"
      ],
      "env": {
        "TEMPO_URL": "http://localhost:3200"
      }
    }
  }
}

Using Claude Code? Run this instead:

claude mcp add tempo -e TEMPO_URL=http://localhost:3200 -- uvx --from talkops-tempo-mcp-server tempo-mcp-server

uvx downloads talkops-tempo-mcp-server from PyPI and runs it, so there's nothing else to install. Prefer a normal install? Run pip install talkops-tempo-mcp-server and use tempo-mcp-server as the command.

Prefer Docker? Pull talkopsai/tempo-mcp-server from Docker Hub—no Python setup needed:

{
  "mcpServers": {
    "tempo": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_TRANSPORT=stdio",
        "-e",
        "TEMPO_BASE_URL",
        "talkopsai/tempo-mcp-server:latest"
      ],
      "env": {
        "TEMPO_BASE_URL": "http://host.docker.internal:3200"
      }
    }
  }
}

2. Restart your client and try asking:

  • "Show me the slowest traces for checkout in the last hour."
  • "Why did p99 latency for payments jump today?"
  • "Which services does frontend call, and which one is failing?"

Allowing changes

Out of the box the server is read-only. To let your assistant make changes (changing per-tenant overrides and applying Tempo Operator resources), add "--allow-write" to args (or pass -e MCP_ALLOW_WRITE=true to docker run). Even then, changes are previewed first and destructive actions ask for confirmation.

Configuration

Set these as environment variables (the env block in your client config, or -e with docker run) or pass the matching flag.

VariableFlagDefaultWhat it does
TEMPO_URL / TEMPO_BASE_URL--tempo-urlhttp://localhost:3200Your Tempo URL
TEMPO_DEFAULT_TENANT--tenantnoneTenant (X-Scope-OrgID) for multi-tenant Tempo
TEMPO_AUTH_HEADER—noneAuthorization header, e.g. Bearer <token>
PROMETHEUS_URL—nonePrometheus for service-graph metrics (optional)
MCP_ALLOW_WRITE--allow-writefalseEnable tools that change Tempo
MCP_TOOLSETS--toolsetsallLimit tools: search, metrics, diagnostics, overrides, operator, readonly
K8S_ENABLED--k8s-enabledfalseTurn on Tempo Operator (Kubernetes) features
MCP_TRANSPORT--transportstdiostdio or http
MCP_PORT—8768Port when using HTTP

Run uvx --from talkops-tempo-mcp-server tempo-mcp-server --help to see every option.

Running over HTTP

To share one server between several clients or run it remotely, start it in HTTP mode with Docker or uvx:

# With Docker (starts in HTTP mode by default)
docker run --rm -p 8768:8768 \
  -e TEMPO_BASE_URL=http://host.docker.internal:3200 \
  talkopsai/tempo-mcp-server:latest

# Or with uvx
MCP_TRANSPORT=http MCP_PORT=8768 uvx --from talkops-tempo-mcp-server tempo-mcp-server

Then point your client at http://localhost:8768/mcp:

{
  "mcpServers": {
    "tempo": {
      "url": "http://localhost:8768/mcp"
    }
  }
}

Agent Skills

Skills live in skills/. Each one is a SKILL.md playbook (plus optional references/ and offline scripts/) that teaches your AI assistant how to do a job safely, while the MCP server does the actual work. Tools are the hands, skills are the know-how.

To use them, copy the folders into your assistant's skills directory, for example:

git clone https://github.com/talkops-ai/talkops-mcp.git
cp -r talkops-mcp/src/tempo-mcp-server/skills/* ~/.claude/skills/

This folder is also a portable Agent Plugin (plugin.json + mcp.json + skills/), so plugin-aware clients can load the server and skills together.

SkillUse it to
authoring-traceql-and-metrics-queriesWrite correct TraceQL searches and TraceQL metrics queries.
triaging-tempo-service-errorsTriage failing services and jump between metrics, logs, and traces.
investigating-tempo-latency-regressionsFind the spans behind a latency regression.
diagnosing-tempo-ingestion-and-healthFind out why traces are missing and check Tempo's health.
mapping-tempo-topology-and-alertsMap service dependencies and generate span-metrics alerts.
operating-tempo-deployments-and-tenantsManage tenant overrides and Tempo Operator resources.

Reference

All 18 tools

ToolAccessWhat it does
tempo_analyze_service_redReadCompute factual Rate, Error rate, and P50/P95/P99 latency metrics, optional baseline deltas, and exemplar IDs.
tempo_apply_operator_crWrite (destructive)Validate and apply a TempoStack or TempoMonolithic custom resource manifest.
tempo_compare_span_cohortsReadExecute a TraceQL compare() instant query to rank attribute values differentiating selection vs baseline spans.
tempo_compare_tracesReadCompute a 5-axis structural, span-count, timing, error, and attribute diff between two traces.
tempo_find_related_tracesReadFind traces correlated with a seed trace by error origin, endpoint, time, or cascade.
tempo_get_attribute_namesReadDiscover trace attribute names grouped by scope from a Tempo backend.
tempo_get_attribute_valuesReadRetrieve distinct values for a trace attribute on a Tempo backend.
tempo_get_diagnosticsReadCollect factual health, version (2.x/3.x), ring, discarded-span, config, and Operator CR observations.
tempo_get_exemplar_tracesReadExtract exemplar trace IDs from a TraceQL metrics range query.
tempo_get_service_dependenciesReadDiscover service nodes and client->server call edges via Prometheus service-graphs, TraceQL metrics, or trace DAG sampling.
tempo_get_traceReadRetrieve a trace by ID with optional span-count slicing and time bounds.
tempo_get_trace_from_logReadExtract a trace ID (W3C traceparent, JSON, logfmt, or hex32) from text and summarize the trace.
tempo_patch_tenant_overridesWrite (destructive)Preview or apply an RFC 7386 JSON merge patch to Tempo's /api/overrides endpoint for a tenant.
tempo_query_a2uiReadRetrieve a trace structured and DAG-pruned for A2UI trace timeline rendering.
tempo_summarize_traceReadExtract factual summary of a trace: critical path, self-time hotspots, errors, and K8s context.
tempo_traceql_metrics_instantReadExecute a point-in-time TraceQL metrics instant query (vector format).
tempo_traceql_metrics_rangeReadExecute a TraceQL metrics range query returning time-series points and per-series stats.
tempo_traceql_searchReadSearch traces using raw TraceQL and/or structured SearchFilters.

All 10 resources

ResourceWhat it returns
tempo://deployment/overviewDeployment topology: configured backends and Kubernetes-discovered Tempo installs
tempo://server/capabilitiesServer capabilities, write gate status, active toolsets, query guardrails, and detected backend features
tempo://system/backendsAll configured Tempo backends with live health status
tempo://operator/crd-schema/{kind}Installed CRD OpenAPI v3 spec schema for TempoStack or TempoMonolithic
tempo://operator/crs/{namespace}Inventory of TempoStack and TempoMonolithic CRs in a namespace (use '_all' for cluster-wide)
tempo://operator/manifests/{kind}/{namespace}/{name}Sanitized and secret-redacted TempoStack or TempoMonolithic manifest
tempo://overrides/{backend_id}/{tenant}Merged user-configurable overrides and current ETag for a Tempo tenant
tempo://schema/{backend_id}/attributesLive trace attribute presence and detected OTel Semantic Conventions for a backend
tempo://system/backends/{backend_id}Detailed live profile for a specific Tempo backend
tempo://traces/{backend_id}/{trace_id}Compact trace summary and bounded spans for a trace ID

Development

git clone https://github.com/talkops-ai/talkops-mcp.git
cd talkops-mcp/src/tempo-mcp-server
uv sync --dev
uv run pytest
uv run tempo-mcp-server --help

Get help

License

Apache 2.0. See LICENSE.