Tempo MCP Server Configuration
The TalkOps Tempo MCP Server supports single-backend and multi-backend configurations, multi-tenancy via X-Scope-OrgID, and strict TraceQL query guardrails.
Server & Transport Settings
| Variable | Default | Allowed Values | Description |
|---|---|---|---|
MCP_TRANSPORT | stdio | stdio, http, sse, streamable-http | Communication protocol for MCP clients. |
MCP_HOST | 0.0.0.0 | Valid IP Address | Host interface to bind for HTTP/SSE server. |
MCP_PORT | 8768 | Valid TCP Port | Listening port for HTTP/SSE server. |
MCP_PATH | /mcp | URL Path | Base endpoint path for JSON-RPC endpoints. |
MCP_LOG_LEVEL | INFO | DEBUG, INFO, WARNING, ERROR | Server logging verbosity. |
MCP_LOG_FORMAT | json | json, text | Structured JSON or text log formatting. |
MCP_HTTP_TIMEOUT | 300 | Integer (Seconds) | Maximum client request duration before timing out. |
Single Backend Configuration
| Variable | Default | Description |
|---|---|---|
TEMPO_BASE_URL | http://localhost:3200 | Grafana Tempo HTTP API base URL. |
TEMPO_BACKEND_ID | default | Identifier for this backend instance. |
TEMPO_DISPLAY_NAME | (empty) | Human-readable backend name. |
TEMPO_TIMEOUT | 30 | Request timeout per query in seconds. |
TEMPO_VERIFY_SSL | true | Verify SSL certificates for remote endpoints. |
TEMPO_AUTH_HEADER | (empty) | Optional authorization header (e.g. Bearer <token>). |
Multi-Tenancy & Headers
| Variable | Default | Description |
|---|---|---|
TEMPO_MULTI_TENANT | false | Enable multi-tenant header injection. |
TEMPO_DEFAULT_TENANT | (empty) | Default tenant identifier. |
TEMPO_TENANT_HEADER | X-Scope-OrgID | HTTP header name used for tenant identification. |
Query Policies & Guardrails
| Variable | Default | Description |
|---|---|---|
TEMPO_MAX_LOOKBACK | 168h (7 days) | Maximum query lookback window. |
TEMPO_DEFAULT_SEARCH_LIMIT | 20 | Default maximum traces returned per search. |
TEMPO_MAX_SEARCH_LIMIT | 100 | Upper limit on traces returned per query. |
TEMPO_DEFAULT_SPSS | 3 | Default spans per span-set. |
TEMPO_MAX_SPSS | 10 | Maximum spans per span-set. |
TEMPO_LLM_FORMAT | true | Enable LLM-optimized trace format (Tempo 2.9+ application/vnd.grafana.llm). |
TEMPO_MAX_METRICS_DURATION | 3h | Maximum allowed TraceQL metrics query time range. |
Kubernetes Deployment Example
apiVersion: apps/v1
kind: Deployment
metadata:
name: tempo-mcp-server
namespace: monitoring
labels:
app.kubernetes.io/name: tempo-mcp-server
app.kubernetes.io/part-of: talkops
spec:
replicas: 1
selector:
matchLabels:
app: tempo-mcp-server
template:
metadata:
labels:
app: tempo-mcp-server
spec:
containers:
- name: server
image: talkopsai/tempo-mcp-server:latest
imagePullPolicy: IfNotPresent
env:
- name: MCP_TRANSPORT
value: "http"
- name: MCP_PORT
value: "8768"
- name: TEMPO_BASE_URL
value: "http://tempo-query-frontend.monitoring:3200"
- name: TEMPO_MULTI_TENANT
value: "true"
- name: TEMPO_DEFAULT_TENANT
value: "production"
ports:
- containerPort: 8768
name: http-mcp
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi