Skip to main content
GET
/
wp-json
/
getmcp
/
v1
/
health
curl --silent https://yoursite.com/wp-json/getmcp/v1/health
{
  "status":      "ok",
  "version":     "1.0.0",
  "db_version":  "1.12",
  "checks": {
    "db":             { "status": "ok", "latency_ms": 2 },
    "sodium":         { "status": "ok" },
    "rest":           { "status": "ok" },
    "active_servers": { "status": "ok", "count": 3 },
    "license":        { "status": "ok", "tier": "pro" }
  },
  "uptime_seconds": 1845200,
  "checked_at":     "2027-05-13T10:42:18Z"
}
The health endpoint returns the runtime state of GetMCP and its dependencies. It’s public — no API key, nonce, or login required — so you can wire it into UptimeRobot, Pingdom, status pages, Kubernetes liveness probes, or whatever monitoring tool you use. It’s rate-limited to 60 requests per minute per IP to discourage abuse, and emits Cache-Control: no-store so monitors always read fresh state.

Authentication

None. The endpoint deliberately exposes only non-sensitive runtime data — no license keys, no API tokens, no server credentials.

Response Body

{
  "status":      "ok",
  "version":     "1.0.0",
  "db_version":  "1.12",
  "checks": {
    "db":              { "status": "ok",   "latency_ms": 3 },
    "sodium":          { "status": "ok" },
    "rest":            { "status": "ok" },
    "active_servers":  { "status": "ok",   "count": 3 },
    "license":         { "status": "ok",   "tier": "pro" }
  },
  "uptime_seconds": 1845200,
  "checked_at":     "2027-05-13T10:42:18Z"
}
status
string
Overall health: ok, degraded, or fail. Aggregated from the per-check statuses below.
version
string
GetMCP plugin version (matches getmcp.php header).
db_version
string
Internal schema version. Bumped on each migration.
checks
object
Per-dependency status. Each check has its own status (ok | warn | fail) plus check-specific extras like latency_ms or count.
uptime_seconds
integer
Seconds since the plugin was first activated on this site (or since the install was first observed by the health endpoint, whichever is earlier).
checked_at
string
ISO 8601 timestamp when the response was generated.

Status Aggregation

The top-level status rolls up from the per-check statuses:
Per-check statesTop-level statusHTTP status
All okok200 OK
At least one warndegraded200 OK
At least one failfail503
Rate limit exceeded(no body)429
Pick the right HTTP-status interpretation based on your monitor:
  • Strict probes (Kubernetes, AWS ALB) — treat 200 as healthy, anything else as down. degraded will still show as up, which is usually correct because the API works but something deserves attention.
  • Status pages (Statuspage, Better Uptime) — parse the JSON body and surface status directly so you can show “degraded” without flipping to red.

Status Codes

CodeMeaning
200All checks passed (ok) or the system is up but degraded (degraded).
429Rate limit exceeded for this IP — wait one minute.
503At least one check failed. The body still includes the check details.

Built-in Checks

CheckWhat it verifiesPass when
dbDB is reachable and responsive (SELECT 1 round-trip)Query completes within ~100ms
sodiumlibsodium PHP extension is loadedextension_loaded( 'sodium' )
restREST API is dispatching requestsAlways — implicitly true if you got this response
active_serversAt least one MCP server is set to Activecount > 0
licenseLicense is in good standing (paid, trial, or unlicensed)Not expired (paid). warn for expired trial.

Rate Limiting

60 requests per minute per IP, evaluated against a sliding-window transient. Exceeded requests get:
HTTP/1.1 429 Too Many Requests
Cache-Control: no-store

{ "error": "rate_limited" }
The IP is resolved in this order:
  1. CF-Connecting-IP (set by Cloudflare)
  2. X-Forwarded-For (set by reverse proxies)
  3. X-Real-IP
  4. REMOTE_ADDR
If none of these resolve to a valid IP the rate limit fails open (the request is allowed) so requests behind aggressive proxies aren’t blackholed.
curl --silent https://yoursite.com/wp-json/getmcp/v1/health
{
  "status":      "ok",
  "version":     "1.0.0",
  "db_version":  "1.12",
  "checks": {
    "db":             { "status": "ok", "latency_ms": 2 },
    "sodium":         { "status": "ok" },
    "rest":           { "status": "ok" },
    "active_servers": { "status": "ok", "count": 3 },
    "license":        { "status": "ok", "tier": "pro" }
  },
  "uptime_seconds": 1845200,
  "checked_at":     "2027-05-13T10:42:18Z"
}

This endpoint is intentionally lightweight — it does not run the deeper “is every active server’s MCP endpoint reachable” probe that lives behind POST /wp-json/getmcp/v1/settings/health-check (which is admin-only and runs parallel pings). Use health for liveness / external monitoring, and settings/health-check from the admin UI for an in-depth diagnostic.