Overview
Keeps tabs on the MCP servers your agents depend on. Pings each registered MCP endpoint every 2 minutes, runs a cheap list_tools probe, measures latency, and alerts when availability drops below threshold. Critical when your agent stack spans 5-10 third-party MCP servers.
Trigger
Cron schedule (every 2 minutes)
Schedule
Every 2 minutes
Workflow Steps
Load MCP server registry
Read list of tracked MCP endpoints from config (HTTP URLs and stdio commands).
Probe list_tools
Send JSON-RPC list_tools request to each MCP server with 5-second timeout.
Measure latency
Record P50 and P99 latency per server over rolling 1-hour window.
Detect failures
Any timeout, non-200, or RPC error counts as a failure for that tick.
SLO budget tracking
Emit to Prometheus: mcp_availability{server=X} and mcp_latency_ms{server=X}.
Alert on SLO burn
Page when 5 consecutive probes fail or availability <99% over 1 hour.
Python Implementation
import os, time, requests
SERVERS = [
{"name": "scavio", "url": "https://mcp.scavio.dev/v1/rpc"},
{"name": "third-party", "url": "https://example.com/mcp"}
]
PAYLOAD = {"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
def probe(s):
start = time.time()
try:
r = requests.post(s["url"], json=PAYLOAD, timeout=5)
return {"name": s["name"], "ok": r.ok, "latency_ms": (time.time()-start)*1000}
except Exception as e:
return {"name": s["name"], "ok": False, "error": str(e)}
for s in SERVERS:
print(probe(s))JavaScript Implementation
const SERVERS = [
{ name: "scavio", url: "https://mcp.scavio.dev/v1/rpc" },
{ name: "third-party", url: "https://example.com/mcp" }
];
const PAYLOAD = { jsonrpc: "2.0", id: 1, method: "tools/list" };
async function probe(s) {
const start = Date.now();
try {
const r = await fetch(s.url, {
method: "POST", headers: { "content-type": "application/json" },
body: JSON.stringify(PAYLOAD),
signal: AbortSignal.timeout(5000)
});
return { name: s.name, ok: r.ok, latencyMs: Date.now() - start };
} catch (e) {
return { name: s.name, ok: false, error: e.message };
}
}
for (const s of SERVERS) console.log(await probe(s));Platforms Used
Web search with knowledge graph, PAA, and AI overviews