Ask 'why is SQL Server slow?' and get wait stats, blocking chains, and plan analysis in plain English via Erik Darling's MCP.
PerformanceMonitor is Erik Darling's free SQL Server monitoring app with an embedded MCP server. It exposes 50+ read-only diagnostic tools (wait stats, blocking, deadlocks, plan analyzer, tempdb, memory) over localhost HTTP, letting an AI agent do the first-pass triage on a slow or stuck server.
👤 DBAs, SREs on call for database issues⏱ ~5 minintermediate
Wann einsetzen: Users are reporting timeouts and you need to know what's blocking whom in the next 60 seconds.
Voraussetzungen
PerformanceMonitor app installed and connected to target server — Download from the GitHub releases and point it at your monitoring DB
Target login has VIEW SERVER STATE — GRANT VIEW SERVER STATE TO [monitor_login]
MCP registered with your client — claude mcp add --transport http --scope user sql-monitor http://localhost:5151/
Ablauf
Get the health overview
Run the health check — any red flags on waits, blocking, or memory pressure right now?✓ Kopiert
→ Short list of elevated metrics
Drill into the top offender
If blocking is the top issue, show me the head blocker chain and the SQL text of the blocking session.✓ Kopiert
→ Specific SPID + query text
Get a recommendation
Should I kill that SPID, wait it out, or is there a missing index that would prevent this? Be specific.✓ Kopiert
→ One clear recommended action with rationale
Ergebnis: A diagnosed incident with a specific next action — kill, wait, index, or escalate — in under 5 minutes.
Fallstricke
Killing a blocker that was about to commit can cause more damage — Always ask for how long it's been running and whether it holds an open transaction before killing
Metrics from the monitoring DB lag the real server by the collector interval — For live view, use the 'current state' tools rather than aggregated history