Dashboards are great when you know which panel to look at. When you don’t know which panel to look at, “is anything wrong right now, and which agent?”, you want to just ask. Phronis exposes its live state through a Model Context Protocol server, so Claude can query the pipeline in natural language.
// 01 — SEVEN TOOLS
The MCP server presents seven tools: current call rates, circuit-breaker history, cost by agent and model, latency stats, token drift, and so on. Each is a thin function that runs a parameterized query against RisingWave (which speaks the PostgreSQL wire protocol, so psycopg2 just works) and returns a formatted result. Claude picks the right tool for the question and composes the answer.
// 02 — DUAL TRANSPORT
The server speaks two transports from one codebase: stdio for local Claude Code integration, and SSE (via Starlette) for the Docker deployment where it runs as an HTTP service. The SSE path is guarded by the same X-API-Key as the kill switch. Two ways in, one set of tools.
// 03 — WHY THIS MATTERS
It collapses the gap between “I have a question about my agents” and “I have an answer.” Instead of remembering which Grafana panel shows token drift, you ask, and Claude queries the materialized views directly. The observability stack becomes conversational, which, for a system whose whole job is watching other AI, is a fitting closing of the loop.
TAKEAWAYS
- An MCP server turns a metrics pipeline into something you can interrogate in plain English. No dashboard archaeology required.
- Because RisingWave speaks the Postgres wire protocol, exposing streaming state to tools is just parameterized SQL over
psycopg2. - Dual stdio + SSE transport from one implementation covers both local-dev and deployed use without forking the code.
NEXT
- Build log 07: shipping the whole stack to Kubernetes.
