Production Metrics as Agent Work Orders
PlanetScale's MCP loop maps production database telemetry to reviewable agent PRs, which rhymes with joelclaw's telemetry-driven workload loops.
PlanetScale launched a hosted Model Context Protocol server that lets tools like Claude, Cursor, Notion, OpenCode, Claude Code, and Codex talk to PlanetScale data through an authenticated HTTP MCP endpoint.
The boring version is “AI can inspect your database.” The useful version is production metrics become agent work orders. PlanetScale Insights and Schema Recommendations point at slow queries or schema issues, then an agent can find the relevant app code, make one change, benchmark it, and open a GitHub pull request.
The clever bit is the boundary. OAuth controls access, the server works from any HTTP-hosted MCP client, query execution uses short-lived credentials, and there is an insights-only endpoint that excludes read/write query tools. That is the non-bullshit shape for database agents: give them telemetry and recommendations first, then make dangerous execution a deliberate permission.
For joelclaw, this is mostly a pattern note. We already care about OpenTelemetry, Typesense, Inngest, and Restate as the substrate for agent work. The useful move here is packaging operational evidence as an MCP surface that agents can turn into small, reviewable fixes instead of vague “optimize the system” sludge.
Key Ideas
- PlanetScale exposes organizations, databases, branches, schema, and Insights through a hosted MCP server.
- OAuth scopes let users grant no access, read-only access, or full access at organization or per-database levels.
- The insights-only MCP endpoint,
https://mcp.pscale.dev/mcp/planetscale-insights-only, removesplanetscale_execute_read_queryandplanetscale_execute_write_queryfrom the tool surface. - PlanetScale frames the workflow as a self-improving loop: inspect production Insights, find the code, make one fix, benchmark, and open a GitHub PR.
- Cursor Automations are called out as a way to run the loop on a schedule, which makes this feel less like a demo and more like recurring maintenance work.
- The guardrail that matters: one query or recommendation at a time, with before/after benchmarks and human review before merge.
Links
- PlanetScale launch post on X
- PlanetScale Model Context Protocol docs
- PlanetScale self-improving database docs
- PlanetScale CLI
mcpcommand docs - PlanetScale docs index for agents
- PlanetScale
- Model Context Protocol
- Cursor Automations
- Claude Connectors Directory: PlanetScale
- PlanetScale Claude Code plugin