AnthropicClaude Managed Agents

Validate Credential MCP OAuth

Check whether one MCP OAuth credential in a vault is still valid.

POST /anthropic/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • credential_idstring必填

    path: Path parameter: the credential ID.

  • vault_idstring必填

    query: Vault ID (path or query parameter).

Returns

400

Applies to OAuth credentials only; other types return 400. The result is always HTTP 200 with status valid, invalid or unknown; mcp_probe describes the failing step only when the check does not pass, and refresh appears only when a refresh was attempted.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
credential_idstringUnique identifier of the credential that was validated.
has_refresh_tokenbooleanWhether the credential has a refresh token configured.
mcp_probenull | objectThe failing step of an MCP validation probe.
mcp_probe.http_responsenull | objectAn HTTP response captured during a credential validation probe.
mcp_probe.methodstringThe MCP method that failed (for example `initialize` or `tools/list`).
refreshnull | objectOutcome of a refresh-token exchange attempted during credential validation.
refresh.http_responsenull | objectAn HTTP response captured during a credential validation probe.
refresh.statusstringOutcome of a refresh-token exchange attempted during credential validation. - `succeeded` - The token endpoint returned a new access token. - `failed` - The token endpoint returned an error response. See `http_response` for detail. - `connect_error` - The token endpoint could not be reached (DNS, TLS, or connection error). - `no_refresh_token` - No refresh token is stored for the credential, so no exchange was attempted.
statusstringOverall verdict of a credential validation probe.
typestring
validated_atstringA timestamp in RFC 3339 format
vault_idstringIdentifier of the vault containing the credential.

Example prerequisite

This example targets the static credential created earlier, so its captured response is 400 invalid_request_error. For a validation result, complete user authorization, then replace credential_id with the resulting OAuth secret ID. OAuth validation returns HTTP 200 with status valid, invalid or unknown.