MCP Directory

Grafana Tempo MCP Server

Query distributed traces in Grafana Tempo with TraceQL (archived; Tempo now has embedded MCP).

Unverified
stdio (local)
No auth
Go

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
docker run -i --rm -e TEMPO_URL grafana/tempo-mcp-server

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "grafana-tempo-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TEMPO_URL",
        "grafana/tempo-mcp-server"
      ],
      "env": {
        "TEMPO_URL": "<your-tempo-query-endpoint>"
      }
    }
  }
}

Requires Docker to be installed and running.

Before you start

  • A running Grafana Tempo instance reachable at TEMPO_URL (defaults to http://localhost:3200)
  • Go 1.21+ to build from source, or Docker / Docker Compose to run it
  • No credential required by the server itself; optional basic-auth or bearer token if your Tempo endpoint is protected
  • An MCP client (Claude Desktop, Cursor, etc.) configured to launch the server over stdio

About Grafana Tempo MCP Server

Tempo MCP Server is a small Go server that lets AI assistants query distributed traces in Grafana Tempo using TraceQL. It exposes a single tool, tempo_query, which takes a TraceQL expression (for example {service.name="frontend"} or {duration>1s}) and returns matching traces from your Tempo backend.

Important: this repository is archived. Tempo now ships an embedded MCP server in the main project, so for new setups you should prefer Tempo's native MCP rather than this standalone server. This repo remains a working reference for the stdio/SSE pattern.

It can run two ways: standard stdio for MCP clients, or as an HTTP server with Server-Sent Events on a configurable port. No authentication is required by the server itself; it talks to a Tempo endpoint set via TEMPO_URL (default http://localhost:3200), with optional basic-auth/bearer-token support for the upstream Tempo.

Tools & capabilities (1)

tempo_query

Query Tempo for distributed traces using a TraceQL expression

When to use it

  • Use it when you want an agent to fetch traces by service, e.g. {service.name="frontend"}
  • Use it when filtering traces by latency, e.g. {duration>1s}, to find slow requests
  • Use it when isolating error traces, e.g. {http.status_code=500}
  • Use it when you want trace lookups in chat without opening the Grafana/Tempo UI
  • Use it as a reference for wiring stdio or HTTP/SSE MCP transport to a Tempo backend

Quick setup

  1. 1Note this repo is archived — prefer Tempo's embedded MCP server for new setups
  2. 2Build with Go 1.21+ or pull/run the Docker image
  3. 3Set TEMPO_URL to your Tempo endpoint (default http://localhost:3200)
  4. 4Choose a transport: stdio for MCP clients, or HTTP/SSE (default port 8080, override with SSE_PORT)
  5. 5Add the server to your MCP client config and restart the client
  6. 6Verify by asking the agent to run a tempo_query like {service.name="frontend"}

Security notes

This repo is archived and superseded by Tempo's embedded MCP server, so prefer that for new work. Trace data can contain sensitive request attributes and IDs, so restrict the Tempo endpoint to trusted networks and add auth credentials when querying Grafana Cloud Tempo.

Grafana Tempo MCP Server FAQ

Is this an official Grafana project?

No. It lives under a cold-storage org and is archived; Tempo's native/embedded MCP server in the main grafana/tempo repo is the official path.

Should I still use this server?

For new setups, prefer Tempo's embedded MCP server. This standalone server still works but is no longer maintained.

Does it need authentication?

The server itself requires no auth. It connects to Tempo via TEMPO_URL and optionally supports basic-auth or a bearer token for a protected Tempo endpoint.

What query language does it use?

TraceQL, e.g. {service.name="frontend"}, {duration>1s}, or {http.status_code=500}.

Can it run over HTTP instead of stdio?

Yes — it supports an HTTP server with Server-Sent Events on a configurable port (default 8080, set via SSE_PORT), in addition to stdio.

Alternatives to Grafana Tempo MCP Server

Official Elastic server: list indices, read mappings, and search with Query DSL.

Verified
stdio (local)
API key
TypeScript
5 tools
Updated 4 months agoRepo

Official PostHog server: product analytics, feature flags, experiments, error tracking and SQL.

Verified
stdio (local)
API key
TypeScript
12 tools
Updated 4 months agoRepo

Run PromQL queries and analyze Prometheus metrics from any MCP client.

Verified
stdio (local)
No auth
Python
6 tools
Updated 1 month agoRepo