MCPDocumentation

Error codes

Authentication and limit errors come back as an HTTP response with its status code and a JSON-RPC error:

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32029,
    "message": "Too many calls per minute with this key. …",
    "data": { "code": "RATE_LIMITED", "message": "…", "retry_after": 12, "limit_per_min": 60 }
  }
}

Errors inside a tool come back as a normal result (HTTP 200) with isError: true:

JSON
{
  "isError": true,
  "content": [{ "type": "text", "text": "FORBIDDEN: You are not allowed to use this tool … (ops.absences.view)" }],
  "_meta": { "error": { "code": "FORBIDDEN", "message": "…", "required": ["ops.absences.view"] } }
}

Always branch on the code field: it is stable. The text may change.

The table's HTTP column is the status when the error happens before the tool runs. Only authentication, module and limit errors (UNAUTHENTICATED, CREDENTIAL_*, OWNER_INACTIVE, MODULE_DISABLED, RATE_LIMITED, QUOTA_EXCEEDED) arrive that way; the rest arrive inside an HTTP 200 response with isError: true.

CodeHTTPDescription
UNAUTHENTICATED401Missing or invalid key (Authorization: Bearer mk_… header).
CREDENTIAL_EXPIRED401The key has expired. Create a new one in the panel (API & MCP).
CREDENTIAL_REVOKED401The key has been revoked.
OWNER_INACTIVE401The person who owns the key is disabled or has no access.
MODULE_DISABLED403The "API & MCP" module is not enabled for this organization.
FORBIDDEN403You are not allowed to use this tool (the person's permissions ∩ the key's scopes).
TENANT_MISMATCH403The organization given is not the key's. You can only narrow within your own organization.
LOCATION_OUT_OF_SCOPE403That centre is outside your scope.
RATE_LIMITED429Too many calls per minute with this key. Retry after retry_after seconds.
QUOTA_EXCEEDED429The organization has used up its monthly call quota.
INVALID_INPUT400Invalid arguments; see issues.
NOT_FOUND404Not found (or not in your organization).
UNKNOWN_TOOL404No such tool.
CONFIRM_INVALID400The confirm_token does not exist or belongs to another key.
CONFIRM_EXPIRED400The confirm_token has expired (15 min). Ask for the preview again.
CONFIRM_USED409That confirm_token was already used.
INTERNAL500Internal error. It has been logged.

What to do

  • 401 (UNAUTHENTICATED, CREDENTIAL_EXPIRED, CREDENTIAL_REVOKED, OWNER_INACTIVE): check the key or create a new one. Don't retry.
  • 403 MODULE_DISABLED: the organization doesn't have the "API & MCP" module. Talk to Autonex.
  • FORBIDDEN, TENANT_MISMATCH, LOCATION_OUT_OF_SCOPE (inside the result): permissions or scopes are missing, or you asked for another organization or centre. Call whoami to see yours; _meta.error.required says which permission is missing.
  • 429 (RATE_LIMITED): wait retry_after seconds. (QUOTA_EXCEEDED): wait for next month or talk to Autonex.
  • INVALID_INPUT: fix the arguments according to issues.
  • CONFIRM_*: ask for the preview again.

Step-by-step diagnosis: FAQ → Troubleshooting.