APIMCPs

Get MCP health

Whether users can reach an MCP right now: a broken setup, a problem limited to some users, or nothing to report. Computed from the last 24 hours of audit events, so it needs the audit permission and names users.

GET
/mcps/{mcp_id}/health

Whether users can reach an MCP right now: a broken setup, a problem limited to some users, or nothing to report. Computed from the last 24 hours of audit events, so it needs the audit permission and names users.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

view_audit

Path Parameters

mcp_id*string
Formatuuid

Response Body

The request has succeeded.

application/json
  1. response

Who can and cannot reach an MCP over the last 24 hours, judged per user by their latest failure or success.

state*McpHealthState

Whether users can reach an MCP.

Value in"ok""partial""broken"
working_user_count*integer

Users whose latest attempt succeeded: a tool call or a first connection.

Formatint32
failure_groups*array<>

The failing users grouped by reason and error code, largest group first, then newest.

first_failure_at?string

The earliest failure in the last 24 hours.

Formatdate-time
last_worked_at?string

The most recent tool call or first connection on the MCP, by any user, in the last 24 hours.

Formatdate-time
Example Request
curl -X GET 'https://your-org.aisecurity.services.us.connect.secureauth.com/api/v1/mcps/497f6eca-6276-4993-bfeb-53cbbbba6f08/health'
Example Response
{  "state": "ok",  "working_user_count": 0,  "failure_groups": [    {      "user_count": 0,      "latest_at": "2019-08-24T14:15:22Z",      "configuration_error": true,      "reason": "id_jag",      "served_stored_tools": true,      "id_jag": {        "step": "exchange",        "code": "string",        "description": "string",        "hint": "string"      },      "upstreams": [        {          "id": "string",          "name": "string",          "status": "connected",          "failure": {            "reason": "id_jag",            "id_jag": {              "step": "exchange",              "code": "string",              "description": "string",              "hint": "string"            },            "served_stored_tools": true          }        }      ],      "users": [        {          "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",          "display_name": "string",          "last_failure_at": "2019-08-24T14:15:22Z",          "agent_slug": "string"        }      ]    }  ],  "first_failure_at": "2019-08-24T14:15:22Z",  "last_worked_at": "2019-08-24T14:15:22Z"}