Spoor
Spoor is a read-only MCP server that tells an AI agent what changed in your services — and where a failure started — by comparing metrics, logs and traces against a baseline and returning a short, ranked digest.
what_changed— the starting point: a ranked list of changes across metrics, logs and traces for one service or all, with before/after values, onset times, evidence links, a one-paragraph summary and per-signal coverage.new_errors— error log patterns that are new or spiking (messages differing only by IDs count as one), with counts, first-seen time and one redacted example; also flags services whose errors are steady, i.e. not a new problem.trace_diff— span names that got slower or started failing, with p95 and error rate before/after, each span's share of added latency, and an example trace ID.list_services— services active in a window and which signals (metrics, logs, traces) have data for each, so you know what's observable before asking.Cause vs. echo attribution — trace trees identify where failures started, and callers that merely suffer are demoted and labelled (e.g. "originates in payment").
Scoped comparison windows — every tool takes
since/until(RFC 3339 or durations like30m), andbaseline(previous,1d,7d) to define "normal".Bounded, redacted output —
budget_tokens(200–4000, default 800) caps response size; emails, tokens, IPs and generated IDs are scrubbed.Deterministic and safe — no LLM inside, read-only, idempotent, same input yields same output, and only query endpoints are ever called.
Provides tools for investigating service incidents across the VictoriaMetrics observability stack (VictoriaMetrics for metrics via MetricsQL, VictoriaLogs and VictoriaTraces for logs and traces via LogsQL). Enables an agent to ask what changed in a time window and get back a short, ranked digest of changes across metrics, logs and traces — including request/error rates, latency, CPU, memory, consumer lag, new or spiking error-log patterns, and per-span errors — with cause-vs-echo attribution that identifies the service where a failure started and labels affected callers as echoes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Spoor what changed in the last 30 minutes and where did the failure start?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Spoor
Spoor tells an AI agent what changed in your services, and where it started, in a few hundred tokens.
Website: telespoor.com
Spoor is an open-source MCP server and CLI for your observability backends: the VictoriaMetrics stack, Prometheus, Loki, Tempo and New Relic. When something breaks, an agent asks Spoor "what changed in the last 30 minutes?" and gets back a short, ranked answer across metrics, logs and traces, with the service where the failure started at the top and its echoes in other services labelled as such.
Spoor (n.): the track or trail left by an animal. Spoor follows the trail a failure leaves in your telemetry back to where it started.
$ spoor what-changed --since 30m{
"summary": "11 change(s) in 3 services. Strongest: payment — Failures start here, in \"POST /charge\" (100% of 100 failed traces). Also: payment — Span \"POST /charge\" errors 0.2% → 43.7% (229 spans). … Errors not significantly up (not new) in: product-catalog, recommendation, ad.",
"findings": [
{"service": "payment", "signal": "traces", "kind": "error_origin", "score": 0.99, "title": "Failures start here, in \"POST /charge\" (100% of 100 failed traces)"},
{"service": "payment", "signal": "logs", "kind": "new_log_pattern", "score": 0.94, "title": "New error log pattern: \"charge failed: card processor returned <N> for order <N>\""},
{"service": "payment", "signal": "metrics", "kind": "error_rate_up", "score": 0.92, "title": "Error rate up: 0.2% → 40.5%", "onset": "2026-10-16T09:50:00Z"},
{"service": "checkout", "signal": "logs", "kind": "spiking_log_pattern", "score": 0.74, "title": "Error log pattern spiking: \"call to payment.Charge failed with status <N>\" — originates in payment"}
],
"coverage": {"metrics": "ok", "logs": "ok", "traces": "ok"}
}Findings carry evidence links to the query behind them (when the token budget allows), so a human can check the agent's work in one click.
Why use it
In a microservice failure, the broken service and every caller of it all light up. An agent with only raw query tools has to decide what to query, compare against "normal" itself, page through results and work out which service is the cause and which are echoes. It burns tool calls and tokens, and often blames the loudest symptom or an error that was always there.
Spoor does that work in plain, deterministic Go and hands the agent the conclusion's evidence:
Cross-signal: request rate, error rate, latency, CPU, memory and consumer lag; new and spiking errors and error volume from logs; per-span errors and latency, all for the same window against the same baseline.
Built for real logs: messages that differ only by IDs, values, stack traces or log prefixes count as one error; JSON errors are read by their message and code fields; services can use different level fields or put the level in the text;
spoor doctorfinds your fields and writes the config.Cause vs. echo: trace trees show where failures start and where latency is added. Callers that merely suffer are demoted and labelled
— originates in payment.Steady errors called out: errors that were already there are listed as
steady_errors, "not a new problem", so agents stop blaming them.Bounded output: every tool takes
budget_tokens(default 800).Honest about gaps:
coveragesays when a backend failed or had no data, the baseline was empty, the error filter matched nothing, or lines lack a service or level field. "No change" never stands in for "can't see".No LLM inside, read-only, redacted: same input, same output; only query endpoints are ever called; every text field is scrubbed of emails, tokens, IPs and generated IDs before it leaves.
Measured
The benchmark runs Claude Code headless on six incidents (five faults and a no-fault control), five times each, once with the official VictoriaMetrics MCP servers alone and once with Spoor added. On Claude Haiku, 60 isolated sessions:
Official Victoria MCP servers | + Spoor | |
Correct root cause, fault scenarios | 19/25 | 25/25 |
Correct answer, all scenarios incl. "nothing is wrong" | 23/30 | 30/30 |
Median tool calls per investigation | 24 | 10 |
Median time | 55 s | 23 s |
Total cost | $0.60 | $0.19 (−68%) |
Synthetic incidents and one small model, so treat it as a first data point.
On real production logs (about 25 services, mixed formats, read-only replay): the digest was 99.8% smaller than the raw evidence it replaces, with zero candidates against four from v0.1.1, and its baseline counts matched independent queries exactly. It was not faster than four hand-written queries (28 s vs 26 s), and accuracy on real incidents is not yet measured.
Method, per-scenario results, the production replay and caveats: docs/benchmark.md.
Related MCP server: alibi
Quickstart
Requires Go 1.25+, Docker and jq. About five minutes.
git clone https://github.com/asinha07/spoor && cd spoor
make it-up # empty VictoriaMetrics, VictoriaLogs, VictoriaTraces in Docker
make demo-data # six synthetic incidents; ground truth in scenarios/out/
make build
T=scenarios/out/payment-failure.truth.json
./bin/spoor what-changed --since $(jq -r .since $T) --until $(jq -r .until $T) --prettyConnect it to Claude Code:
claude mcp add spoor \
-e SPOOR_METRICS_URL=http://localhost:8428 \
-e SPOOR_LOGS_URL=http://localhost:9428 \
-e SPOOR_TRACES_URL=http://localhost:10428 \
-- "$PWD/bin/spoor" serveRun it from the spoor directory (or add -s user to register it everywhere), then ask Claude: "Something is
failing in the shop. What changed, and where did it start?"
On your own backends, start with spoor doctor --since 15m: it checks what Spoor can see and suggests config.
Other clients, Grafana-only access and the rest: Getting started.
Backends
Each signal picks its backend with type:, and you can mix them:
Metrics | Logs | Traces | |
VictoriaMetrics stack | VictoriaMetrics | VictoriaLogs | VictoriaTraces |
Grafana stack | Prometheus, Mimir, Thanos | Loki | Tempo |
New Relic | Transaction events (NRQL) | Log events | Span events |
metrics: {type: prometheus, url: http://prometheus:9090}
logs: {type: loki, url: http://loki:3100}
traces: {type: tempo, url: http://tempo:3200}Setup and what differs per backend (Tempo statistics are sampled; New Relic span changes need the service's metrics to agree): Backends.
Tools
Tool | Returns |
| Ranked changes across all signals, with cause/echo attribution, for one service or all. Start here. |
| Error log patterns that are new or spiking, with counts, first-seen time and a redacted example. |
| Span names that got slower or started failing, with an example trace ID. |
| Services in the window and which signals have data for each. |
Inputs: service, since, until, baseline (previous, 1d, 7d), budget_tokens.
Full reference: docs/tools.md.
How it works
flowchart LR
Agent[AI agent / CLI] -->|MCP| S[Spoor]
S -->|"PromQL / NRQL"| M[(VictoriaMetrics, Prometheus, New Relic)]
S -->|"LogsQL / LogQL / NRQL"| L[(VictoriaLogs, Loki, New Relic)]
S -->|"LogsQL / TraceQL / NRQL"| T[(VictoriaTraces, Tempo, New Relic)]
S -->|"ranked digest ≤ budget"| AgentFor a window and a baseline (by default, the six windows just before it), Spoor scores every metric with a robust z-score, compares error-log patterns with a Poisson test, compares span error rates and p95s, walks failed traces to the span where each failure started, boosts changes confirmed by more than one signal, and trims the result to the token budget. Details: architecture · scoring and attribution.
Run it for a team
spoor serve --http :8080 --auth-token … serves MCP over streamable HTTP with bearer-token auth, /healthz and
Prometheus /metrics. Ready-made, hardened manifests:
Kubernetes (Kustomize):
deploy/kubernetes/Docker Compose:
deploy/docker/systemd:
deploy/systemd/
Security, sizing, monitoring and upgrades: Production guide.
Verified on the OpenTelemetry Demo
On the OpenTelemetry Demo v3.1.0 (about 20 real
services), a 50% payment failure came back as "payment: failures start here, in charge", with checkout and
frontend errors labelled "originates in payment" (732 tokens); the adHighCpu fault came back as the single
finding "ad: CPU up 0.07 → 3.97 cores" (192 tokens). Reproduce it: deploy/demo/.
Documentation
Install, try, connect an agent | |
Kubernetes, Docker, systemd, security, monitoring | |
VictoriaMetrics stack, Prometheus, Loki, Tempo, New Relic | |
Every option and recipes for common setups | |
Inputs and response format | |
Design and scoring | |
Why use it, and what else exists | |
When something looks wrong |
Status and limitations
Early (pre-1.0). Tool output fields may still change between minor versions; see the changelog.
The scoring was developed and benchmarked on the VictoriaMetrics stack. Prometheus, Loki and Tempo pass the same scenario tests against real containers; New Relic was checked on one real account. Tempo statistics are sampled, and New Relic span changes are reported only when service metrics agree; see backends.
Cause/echo attribution needs traces; without them Spoor still ranks metric and log changes.
Attribution reads at most 50,000 span rows per read; on very busy systems a trace can be cut.
The benchmark uses synthetic incidents written by the author and one model; treat it as a first data point, and replay your own past incidents with
bench/replay.pybefore relying on it.Metrics and traces are queried per service; on large estates pass
servicewhen you know it.
More in how-it-works.md.
Roadmap
Next: accuracy on labelled real incidents, "since the last deploy" windows, Datadog and Elasticsearch backends, exact Tempo statistics through TraceQL metrics. The full list, and what is deliberately out of scope: docs/roadmap.md.
Contributing
Issues and pull requests are welcome. make test needs nothing but Go; see CONTRIBUTING.md.
Security issues: SECURITY.md.
License
Apache-2.0. See LICENSE.
Available Tools
4 toolslist_servicesList servicesBRead-onlyIdempotent
Services seen in the window and which signals (metrics, logs, traces) have data for each.
Inputs: since, until.
new_errorsNew errorsARead-onlyIdempotent
Error logs compared with a baseline: errors that are new or spiking (messages that differ only by IDs count as one error), services whose error volume rose beyond their traffic, each with counts, first-seen time and one redacted example line, plus services whose errors are steady.
Inputs: since, until, service, baseline, +1 more.
trace_diffTrace diffARead-onlyIdempotent
Span names that got slower or started failing compared with a baseline: p95 and error rate before/after, each span's share of the added latency, and an example trace ID.
Inputs: since, until, service, baseline, +2 more.
what_changedWhat changedARead-onlyIdempotent
Ranked list of what changed in a service (or all services) across metrics, logs and traces, compared with a baseline. Returns a one-paragraph summary, findings with before/after values, onset times and evidence links, and per-signal coverage. Start here.
Inputs: since, until, service, baseline, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool maps to a distinct signal scope: list_services inventories services, new_errors is log-specific, trace_diff is trace-specific, and what_changed is the cross-signal ranked entry point. The only soft overlap is that what_changed subsumes findings from new_errors and trace_diff, but its 'start here' framing and ranked-summary output keep the boundary workable.
All names use snake_case casing, but the conventions are mixed: list_services is verb_noun, new_errors is adjective_noun, trace_diff is noun_noun, and what_changed is a question-phrase. Readable and memorable, but there is no predictable verb_noun pattern an agent can rely on.
Four tools for a baseline-diffing observability server is well-scoped: one inventory, one per signal (logs, traces), and one aggregator. Each tool clearly earns its place with no gratuitous or redundant entries.
The surface covers service inventory, log errors, trace regressions, and a unified change ranking, which handles the core diagnostic workflow. Gaps are minor: no metric-specific diff tool (metrics only surface inside what_changed), no raw log/span search, and no way to configure the comparison window or baseline.
Maintenance
Related MCP Connectors
Query your AI agent traces, root-cause verdicts and issues, and run investigations, from your agent.
AI SRE: investigate production incidents across your observability stack.
Causal reasoning for reliability: root cause, blast radius, and service health for agents.
Finds what's broken in your product, explains why, and fixes it from your agent.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables users to investigate infrastructure incidents in plain English, correlate observability and deploy data with runbooks, and get evidence-backed root-cause proposals with approval-gated remediation.5-
- AlicenseAqualityBmaintenanceEnables diagnosing long AI-agent traces by identifying the most likely root-cause steps, so users can quickly find where an agent run went wrong.165 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to trace upstream dependencies and downstream blast radius across a Neo4j-modeled service topology, rank root-cause hypotheses, and score composite risk from graph, temporal, git-diff, and trace signals. It also stages rollback-ready remediation plans that execute only after human approval and the required scope.Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI agents to search service logs, group errors by signature, compare a candidate run against a baseline for regressions, and correlate which problems from other services appear before or after an error. All results are computed by the tools rather than the language model, so agents can only explain findings the code produced.5MIT