Skip to content

Update enabling tempo mcp and docs#1385

Merged
zeitlinger merged 8 commits into
grafana:mainfrom
tiffanyfay:tempo-mcp
Jun 12, 2026
Merged

Update enabling tempo mcp and docs#1385
zeitlinger merged 8 commits into
grafana:mainfrom
tiffanyfay:tempo-mcp

Conversation

@tiffanyfay

@tiffanyfay tiffanyfay commented May 12, 2026

Copy link
Copy Markdown
Contributor

Blocked by #1392

Tempo's MCP server is intentionally disabled by default in Tempo itself. Updating docs and config to start disabled, but give the user the ability to enable it instead of how the current config enables it for everyone. I added a flag for this to Tempo, which resulted in release 2.10.4.

To verify it enabled it use curl:

curl -s http://localhost:3200/status/config | grep -A 1 "mcp"
    mcp_server:
        enabled: true

Additionally, the Grafana MCP server has tools for Pyroscope, so I removed the section saying there's no MCP server. See the README in the MCP server GH.

@tiffanyfay tiffanyfay requested a review from a team as a code owner May 12, 2026 04:29
@cla-assistant

cla-assistant Bot commented May 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

This comment has been minimized.

@zeitlinger

Copy link
Copy Markdown
Member

Great! Did you test that an agent can figure it out based on the instructions given during start?

@tiffanyfay

tiffanyfay commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Added info to the run script for Tempo's MCP server and made it so what is added is different depending on whether it's enabled or not and also if the SA was made successfully or not.

./run-lgtm.sh latest true
Starting grafana/otel-lgtm latest
Running Grafana v13.0.1 logging=false
Running OpenTelemetry Collector v0.151.0 logging=false
Waiting for the OpenTelemetry collector and the Grafana LGTM stack to start up...
Running Prometheus v3.11.3 logging=false
Running Tempo v2.10.5 logging=false
Running Loki v3.7.1 logging=false
Running Pyroscope v2.0.2 logging=false
Prometheus is up and running. Startup time: 2 seconds
Otelcol is up and running. Startup time: 2 seconds
Grafana is up and running. Startup time: 3 seconds
Loki is up and running. Startup time: 3 seconds
Tempo is up and running. Startup time: 3 seconds
Pyroscope is up and running. Startup time: 4 seconds
Total startup time: 4 seconds

Startup Time Summary:
---------------------
Grafana: 3 seconds
Loki: 3 seconds
Prometheus: 2 seconds
Tempo: 3 seconds
Pyroscope: 4 seconds
OpenTelemetry collector: 2 seconds
Total: 4 seconds
The OpenTelemetry collector and the Grafana LGTM stack are up and running. (created /tmp/ready)

AI Tool Integration (MCP):
  Tempo MCP:    server enabled at http://localhost:3200/api/mcp
  Grafana MCP:  server enabled with service account token
  Claude Code:  bash <(docker exec lgtm cat /etc/lgtm/claude-mcp-setup.sh)
  Other tools:  docker exec lgtm cat /etc/lgtm/mcp.json
  Docs:         https://github.com/grafana/docker-otel-lgtm/blob/vlatest/docs/mcp-integration.md

Open ports:
 - 4317: OpenTelemetry GRPC endpoint
 - 4318: OpenTelemetry HTTP endpoint
 - 3000: Grafana (http://localhost:3000). User: admin, password: admin
 - 3200: Tempo endpoint (MCP at http://localhost:3200/api/mcp)
 - 4040: Pyroscope endpoint
 - 9090: Prometheus endpoint

If it isn't enabled, it instead says

Tempo MCP:    server disabled; enable with TEMPO_EXTRA_ARGS=--query-frontend.mcp-server.enabled=true

@zeitlinger

Copy link
Copy Markdown
Member

Looks great - I just want to wait until #1392 is merged and then extend that test suite to have the now logic covered as well.

@zeitlinger

Copy link
Copy Markdown
Member

@tiffanyfay can you add tests like in #1392 now (just merged)

tiffanyfay and others added 6 commits June 8, 2026 15:23
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger

Copy link
Copy Markdown
Member

@tiffanyfay can you add tests like in #1392 now (just merged)

I added that now

zeitlinger added a commit that referenced this pull request Jun 11, 2026
## What changed
- add `docker/mcp-bootstrap-spec.py` as a small Python spec for the MCP
bootstrap behavior
- refactor `docker/run-all.bats` to compare `run-all.sh` output and
generated artifacts against that spec
- keep the existing docs/path checks while replacing the repetitive MCP
matrix assertions with spec-based checks

## Why it changed
The MCP bootstrap behavior in `docker/run-all.sh` is easy to drift as
the matrix grows. This keeps the runtime implementation in shell, but
moves the expected behavior model into a compact, testable Python script
that acts as a second implementation for the tests.

## User impact
No runtime behavior change. This only strengthens tests for the
Tempo/Grafana MCP bootstrap combinations.

## Validation
- `python3 -m py_compile docker/mcp-bootstrap-spec.py`
- `bats docker/run-all.bats`
- `bats docker/run-otelcol.bats docker/run-all.bats`

Stacked on top of #1385 via base branch `tempo-mcp`.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@martincostello

Copy link
Copy Markdown
Member

@zeitlinger I don't have the permission to do it anymore - the lint required check needs to be removed and ci added.

@zeitlinger zeitlinger merged commit 6f2ea17 into grafana:main Jun 12, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants