Skip to main content
MCPHub ships three observability surfaces. There is no built-in Prometheus exporter, OpenTelemetry SDK, or alerting pipeline — wire up your own infrastructure tooling against the endpoints below.

Health endpoint

GET /health — public, no authentication.
Sample response:
status is one of: This makes /health suitable for liveness/readiness probes. See src/controllers/healthController.ts.

In-process logs

MCPHub keeps a rolling in-memory log buffer (src/services/logService.ts) that powers the dashboard’s log viewer. The stream emits one data: line per event, including an initial { "type": "initial", "logs": [...] } snapshot. All three endpoints require an authenticated admin (dashboard JWT, bearer key with accessType: all, OAuth token, or Better Auth session). The buffer is process-local. For multi-instance deployments, ship stdout to your log aggregator instead of relying on this endpoint.

Activity log (database mode)

When MCPHub runs against PostgreSQL (see Database Configuration), every MCP request/response is persisted to the mcphub_activity table by src/services/activityLoggingService.ts. The dashboard exposes it through: In file mode these endpoints return 404 and the dashboard hides the Activity page.

Process-level metrics

The dashboard surfaces basic server connection statistics from getServerConnectionStats() (also embedded in /health). To export richer process metrics:
  • Use any Node.js APM agent that wraps http/express automatically.
  • Or scrape /health and /api/activities/stats from your monitoring platform.

See also