All guides

Tutorial

Monitor MCP Server Health

Four Signals, Not One

A server that reports itself healthy because it answered a ping is the most common monitoring mistake. A ping proves the process is running. It says nothing about whether a client can discover a tool, whether a tool call completes, or whether the system behind the server is answering.

Four signals cover the operational surface, and each answers a different question.

  • Connectivity. Can a client open a session at all?
  • Discovery success. Does the session produce a tool list?
  • Tool latency. How long does a real call take, per tool?
  • Upstream errors. Is the system behind the server failing?

Together they distinguish a server problem from a dependency problem, which is the first question in every incident.

Connectivity

Measure it the way a client does: open a session, complete the handshake, close it. A TCP check is not enough, because a server can accept connections while its initialization is broken.

One probe every minute is plenty, from outside the network the server runs in. A probe that runs on the same host proves the process, not the path.

Watch for a pattern rather than a single failure: one missed probe is noise, and three in a row is an incident.

Discovery Success

This is the signal teams skip, and it catches the failure that looks like health.

Discovery should return the expected number of tools for a known subject. Alert when the count drops, because a list that shrank is a client that lost a capability without any error appearing anywhere.

Also record discovery latency. A tool list that takes four seconds to return is a server whose upstream is slow, and the first tool call will be slow for the same reason.

Tool Latency by Tool

Aggregate latency hides the problem. A server whose lookups take two hundred milliseconds and whose searches take nine seconds has a healthy average and one unusable tool.

Measure per tool, with percentiles rather than a mean. The ninety-fifth percentile is where the experience lives, and the mean will be dominated by the fast path.

Segment by caller where possible. A single client with a slow query pattern will otherwise look like a server-wide degradation, and the fix is in the client.

Upstream Errors

Every tool call that fails because the system behind the server failed should be counted separately from a call that failed because the request was invalid.

Three buckets are enough. Client errors, which are the caller's problem. Upstream errors, which are the dependency's. And server errors, which are yours. A rising upstream count with flat server errors points away from your code, and that is the sentence an incident channel needs in the first minute.

A Dashboard of Four Panels

Four panels, one per signal, is enough for a first version. Resist adding a fifth before the fourth is trusted.

Each panel shows a day, with the same time axis, so a spike in one can be read against the others. The most useful thing a dashboard does is let a person see that upstream errors rose two minutes before tool latency did.

Add a fifth panel only when a question cannot be answered from the four. Call volume per client is usually the first addition, and it answers who is affected rather than what broke.

Thresholds That Do Not Cry Wolf

An alert that fires weekly gets muted, and a muted alert is worse than none.

Set thresholds from a week of observed data, not from an aspiration. If discovery normally takes eighty milliseconds, alert at five hundred rather than at one hundred. If the tool count is eleven for the default subject, alert on a change rather than on an absolute number.

Two alert classes are worth distinguishing. Something is broken, which pages a person. Something is degrading, which opens a ticket. Mixing them is how a pager gets ignored.

What Is Not Worth Monitoring

Process memory, unless the server has leaked before. Container restarts, unless they correlate with an incident. And any metric nobody has looked at in a month.

Monitoring has a maintenance cost, and every panel nobody reads is a panel somebody updates eventually for no reason. Delete it.

Instrument First, Then Alert

Two hours of instrumentation is worth more than a week of threshold tuning.

Record every call with the tool name, the subject, the outcome and the duration. Record discovery with the tool count and the duration. Record upstream failures with the upstream name rather than a generic error.

Then read a day of that data before setting a single alert. The thresholds that come from observation are the ones that survive contact with a quiet weekend, and the ones invented from expectation are the ones that get muted in the first month.

What a Good Alert Says

An alert that says the server is down is not actionable. One that says discovery has returned nine tools instead of eleven for ten minutes is.

Aim for three pieces in every message: what changed, since when, and where to look first. The third is what separates a useful alert from a notification, and it costs one line of configuration to include.

Next step

Read rate limiting across clients for the signal that explains a latency spike, or contact us to set up monitoring for a server that has none.

FAQ

Question: Can we monitor with the same probe the clients use?

Yes, and it is the best option when available, because it exercises the real path. Keep one synthetic probe as well, so a client-side change cannot silently remove your coverage.

Question: How long should metrics be kept?

Ninety days at full resolution covers incident review and capacity questions. Beyond that, keep daily aggregates rather than raw points.

Question: Is a health endpoint enough for an uptime check?

For an uptime check, yes. For operations, no: it proves the process answers, and every other signal in this article is about whether the answer is useful.

Next step

Talk to us about the work.

Tell us what you want an agent to run. We come back with a scope, not a slide deck.