Repository navigation
observer-mcp: a read-only MCP server - #57
Merged
Merged
Conversation
Eleven read-only tools over the HTTP API (overview, traces, failed traces with reasons, one trace with spans/tools/provider chain/scores, alerts, datasets, runs, comparison, metrics query). Trace and span input/output are never returned unless OBSERVER_MCP_CONTENT=1. A test fails if the reader can use anything but GET or the metrics query. Optional extra 'mcp'. Roadmap step 6 done.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 6 of docs/roadmap.md.
observer-mcp(app/ops/mcp_server.py): MCP over stdio, talks to a running Observer via its HTTP API. Optional extramcp(also indevso CI tests it).readOnlyHint:observer_overview,list_traces,list_failed_traces(status error + health below a threshold, with reasons),get_trace(spans, tools, provider chain, scores),list_alerts,list_datasets,get_dataset,list_runs,compare_runs,metrics_schema,query_metrics.input/outputare never returned unlessOBSERVER_MCP_CONTENT=1; lists are capped.GETplus the metrics query (aPOSTthat computes, writes nothing); a test fails on any other method or write path. stdio only, no listening port.docs/mcp.md(setup for Claude Code, tools, privacy), README, roadmap.Tests (7): tool list and annotations, content omitted, failed traces, datasets/runs/comparison/metrics through an in-memory MCP client, clean errors, read-only guard. Backend 201 passed on this branch (it does not include the OTLP PR #56), ruff clean. Verified over real stdio with an MCP client against a synthetic Observer: an OTLP-ingested trace with its tool span was listed and read.
Closes roadmap steps 1–6; 'Later' (per-project capture modes, ingestion reliability) remains.
Merge order: this branch is based on
mainwithout #56; both append todocs/roadmap.md, so merge #56 first and I will rebase this one (the roadmap log lines would conflict otherwise).