Guide
How to monitor an MCP server
An MCP server can go wrong in two ways: it stops answering, or it keeps answering with different tools. Both break the assistants that use it, and the second does it quietly. Here's how to watch for both, by yourself or with BadgerBell.
What breaks
- It stops answering. The server is down, its address changed, or a deploy left it failing. Assistants that use it get an error, or leave it out.
- Sign-in breaks. A token runs out or is revoked, and every call gets a 401.
- A tool changes. A tool is renamed or removed, or its description or its inputs change. The server still answers, so a check that only asks "is it up?" sees nothing wrong. An assistant that relied on the old tool fails, or picks another one, and nobody is told.
Check it yourself
A check that catches all three does what an assistant does when it connects: it sends initialize, then tools/list, and keeps the tool list to compare with next time. This script does that for a server that speaks MCP over HTTP (the Streamable HTTP transport, protocol version 2025-06-18), with curl and nothing else.
set -eo pipefail URL=https://example.com/mcp H=(-H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' -H 'MCP-Protocol-Version: 2025-06-18') # 1. initialize, keeping the session id if the server gives one SID=$(curl -fsS -D - -o /dev/null "${H[@]}" "$URL" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-check","version":"1"}}}' \ | awk 'tolower($1)=="mcp-session-id:"{print $2}' | tr -d '\r') [ -n "$SID" ] && H+=(-H "Mcp-Session-Id: $SID") curl -fsS "${H[@]}" "$URL" -d '{"jsonrpc":"2.0","method":"notifications/initialized"}' # 2. tools/list, compared with the list from last time curl -fsS "${H[@]}" "$URL" -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \ | sed -n 's/^data: //p; /^{/p' > tools-now.json [ -f tools-last.json ] && ! cmp -s tools-last.json tools-now.json && echo "The tools changed" mv tools-now.json tools-last.json
- Run it from cron every few minutes. When the server doesn't answer, curl fails and so does the script. When the tools change, it prints "The tools changed". Cron emails you what a job prints, if the machine can send mail.
- For a server that needs sign-in, add a read-only token:
H+=(-H "Authorization: Bearer $TOKEN"). - The answer comes as plain JSON or as an event stream (lines that start with
data:). Thesedline keeps the JSON either way. - A server with many tools can split the list into pages (
nextCursor). This script reads the first page only. - It checks from one machine, so a network blip there looks like an outage. Run it from a second machine before you trust its alerts at night.
With BadgerBell
An MCP monitor does the same handshake, initialize and then tools/list with every page, from BadgerBell's three probes.
- How often: every minute on paid plans, every 5 minutes on Free. It's on every plan, Free included.
- When it stops answering: a failed check is asked again within seconds from the two other places, of San Francisco, Frankfurt and Singapore. You're alerted only if 2 of 3 agree.
- When a tool changes: you're alerted when a tool is added, removed or renamed, or its description or inputs change. The alert says what changed. A change of tools never counts as downtime, and you can mark it as expected.
- Servers that need sign-in: give the monitor a bearer token, and it sends it with every request. Without one, a 401 counts as "up, needs sign-in": BadgerBell knows the server answers, but can't list its tools. BadgerBell signs in only with a token you paste, never through a browser, so a server whose only sign-in is in a browser can be watched for up and down, not for its tools.
- Alerts go by email, Slack and webhooks on every plan, and by text on paid plans.
Set it up with your assistant
Connect BadgerBell, paste one prompt, and your assistant proposes your monitors.
claude mcp add --transport http badgerbell https://app.badgerbell.com/mcp
Anything public or destructive waits for you in BadgerBell.