MCP Health Check: Monitoring Your MCP Server

I built 10 MCP servers. I experienced many production outages.

The hardest part is not building the server. It is keeping the server running when you are not watching it.

I used to think monitoring was only for big companies. I was wrong. Even for side projects, you need it.

MCP is a proxy protocol. It lives between three systems:

  • AI Client
  • LLM Proxy
  • Your MCP Server
  • Your Database

Each step can fail. Your server might be up, but your database could be down. Or your server is fine, but the LLM uses a tool name that does not exist.

I learned this the hard way. My server process was running, but my database connection pool was empty. My generic health check said everything was fine. Everything was not fine.

You need health checks that test everything an MCP server uses:

  • Application level: Is the app handling requests?
  • Database: Can you run a simple query?
  • Dependencies: Are Redis or cloud storage working?
  • MCP specific: Can you list and call tools?
  • Logging: Is the disk full?

I use Spring Boot. I do not use complex tools. I use three simple endpoints:

  • /health/liveness: Tells the system if the app is running.
  • /health/readiness: Tells the system if all dependencies are ready.
  • /health/mcp: A full test of MCP functions.

Here are the mistakes you should avoid:

  • Security errors: Do not lock your health endpoints behind authentication. Your monitoring system will fail to check them.
  • Heavy checks: Do not run massive database searches in a health check. It wastes resources. Run a simple query instead.
  • Data leaks: Do not put API keys or passwords in your health check details.
  • Disk space: A full disk causes weird failures. Use tools that check disk space automatically.

Adding this takes a few hours. It is worth it. It catches problems before your users do.

You do not need a massive monitoring team. You can get most of the value using simple tools and custom indicators.

Have you built an MCP server? How do you monitor your projects?

Source: https://dev.to/kevinten10/mcp-health-check-building-production-monitoring-for-your-mcp-server-what-i-learned-after-84-4ein

Optional learning community: https://t.me/GyaanSetuAi