Hi all!
I’ve been working on an open-source project that bridges two worlds I think many of you live in: distributed tracing and AI agent observability.
What is Heimdall?
Heimdall is a transparent proxy that wraps any MCP server (the protocol AI assistants like Claude Desktop use to call tools). It intercepts every JSON-RPC message, creates an OpenTelemetry span for each tool call, and lets you choose where to send them:
-
SQLite / Postgres / MySQL: queryable local or shared DB
-
Grafana Tempo (or any OTLP endpoint): live trace streaming via
--otlp
The span schema is native OTel: BIGINT nanosecond timestamps, integer SpanKind and SpanStatusCode values, resource_attributes via @opentelemetry/semantic-conventions. It drops cleanly into a standard Tempo to Grafana dashboard.
Setup (one line change in mcp.json):
{
"mcpServers": {
"filesystem": {
"command": "heimdall",
"args": [
"--store", "sqlite://~/.heimdall/traces.db",
"--otlp", "http://localhost:4318/v1/traces",
"--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp"
]
}
}
}
Point --otlp at your Grafana Cloud OTLP endpoint (or local Tempo) and every agent tool call shows up as a trace in Explore in Tempo.
Why it matters for the Grafana stack:
If you’re already running Grafana + Tempo for your backend services, this gives you the same trace visibility for your AI agent layer, with zero changes to the MCP server itself. Correlate agent behavior with your infra traces in a single Grafana instance.
Config Policies (new feature): beyond observability, Heimdall now also lets you define allow/deny rules per tool per server; so you can restrict what an agent is actually allowed to call, globally or per project.
Docs: https://stack.cardor.dev/heimdall
Repo: https://github.com/enmanuelmag/heimdall-mcp
Would love feedback from anyone running OTLP pipelines, especially on the Tempo integration and span schema!