> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmcp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Health Check

> Ping every active MCP server in parallel and return the health status of each.

Sends a JSON-RPC `ping` to every server with `status = active` and reports back which ones answered. Probes run in **parallel** via `curl_multi_init` (with a sequential `wp_remote_post` fallback when curl multi isn't available), so latency is dominated by the slowest server, not the sum.

<Note>
  This is **distinct from** the public [`/health` endpoint](/api-reference/health/check) — `/health` reports on the plugin itself and is unauthenticated. This endpoint is admin-only and reaches out to each MCP server to confirm the JSON-RPC transport is responsive.
</Note>

<Note>
  Each per-server probe has a 5-second timeout and a 3-second connect timeout. Servers that exceed these limits are reported with `status: "error"` and the curl error string.
</Note>

## Body

No body. Send an empty `POST`.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
       --url https://yoursite.com/wp-json/getmcp/v1/settings/health-check \
       --header 'Authorization: Bearer gmcp_your_api_key' \
       --header 'content-type: application/json'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://yoursite.com/wp-json/getmcp/v1/settings/health-check",
      headers={
          "Authorization": "Bearer gmcp_your_api_key",
          "Content-Type": "application/json",
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://yoursite.com/wp-json/getmcp/v1/settings/health-check",
    {
      method: "POST",
      headers: {
        "Authorization": "Bearer gmcp_your_api_key",
        "Content-Type": "application/json",
      },
    }
  );
  const data = await response.json();
  ```

  ```php PHP theme={null}
  $response = wp_remote_post(
      "https://yoursite.com/wp-json/getmcp/v1/settings/health-check",
      [
          "headers" => [
              "Authorization" => "Bearer gmcp_your_api_key",
              "Content-Type"  => "application/json",
          ],
      ]
  );
  $data = json_decode( wp_remote_retrieve_body( $response ), true );
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "results": [
      {
        "server": "My Weather Tools",
        "status": "healthy",
        "code": 200
      },
      {
        "server": "Stripe Payments",
        "status": "healthy",
        "code": 200
      },
      {
        "server": "Internal Reporting",
        "status": "error",
        "code": 502
      },
      {
        "server": "Legacy Webhook Bridge",
        "status": "error",
        "message": "Operation timed out after 5001 milliseconds with 0 bytes received"
      }
    ]
  }
  ```

  ```json 200 OK — no active servers theme={null}
  {
    "results": []
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "code": "rest_forbidden",
    "message": "Permission denied.",
    "data": { "status": 403 }
  }
  ```
</ResponseExample>

## Response Fields

<ResponseField name="results" type="array">
  One entry per active server. Empty when no servers are active.
</ResponseField>

<ResponseField name="results[].server" type="string">
  Server name (the human-readable label, not the slug or UUID).
</ResponseField>

<ResponseField name="results[].status" type="string">
  `healthy` when the server returned an HTTP status \< 400. `error` for any non-2xx/3xx status or transport failure.
</ResponseField>

<ResponseField name="results[].code" type="integer">
  HTTP status returned by the server. Present on every probe that completed at the HTTP layer (even errors like `502`).
</ResponseField>

<ResponseField name="results[].message" type="string">
  Transport-level error message — only present when the probe failed before getting an HTTP response (DNS, connection refused, timeout, TLS).
</ResponseField>
