概览
What is Tempo MCP Server?
A Go-based server that implements the Model Context Protocol (MCP) to allow AI assistants to query and analyze distributed tracing data from Grafana Tempo. It is designed for developers and operators using AI clients like Claude Desktop, Cursor, or n8n.
How to use Tempo MCP Server?
Build with go build -o tempo-mcp-server ./cmd/server and run via stdin/stdout or as an HTTP/SSE server (default port 8080, configurable via SSE_PORT). Configure a client (e.g., Claude Desktop) by adding the server’s command or Docker image to its MCP configuration, then invoke the tempo_query tool with a Tempo query string and optional parameters.
Key features of Tempo MCP Server
- Provides a
tempo_querytool for querying Grafana Tempo traces - Supports stdin/stdout and HTTP/SSE transport modes
- Configurable Tempo URL via
TEMPO_URLenvironment variable - Optional authentication: basic auth (username/password) or bearer token
- Query parameters: start, end, limit, and custom query string
- Docker and Docker Compose support for containerized deployment
Use cases of Tempo MCP Server
- AI assistant performs ad‑hoc distributed trace analysis during incident response
- Automated monitoring workflows query Tempo for error traces with specific status codes
- Integrate tracing data into AI‑powered chat interfaces like Claude Desktop or Cursor
- Connect MCP Client Tool nodes in n8n to fetch Tempo data for downstream automation
FAQ from Tempo MCP Server
What authentication methods does the server support?
Basic authentication (username/password) and bearer token, both optional per request.
What transport modes are available?
Standard input/output (stdin/stdout) following MCP, and an HTTP server with SSE endpoint for tools like n8n.
What are the runtime requirements?
Go 1.21 or higher; Docker and Docker Compose for local testing are optional.
Where does the data live and how is it accessed?
The server connects to a Grafana Tempo instance specified via the TEMPO_URL environment variable or the url parameter in each query. No local data is stored.
What is the default query time range?
If not specified, start defaults to 1 hour ago and end defaults to the current time.