MCP Error Reference
When a tool call fails, the AiSky MCP server returns an error in the tool response content. This page covers all error codes, their causes, and how to resolve them.Two error layers: The AiSky API gateway returns HTTP status codes with JSON error bodies. The MCP server wraps these into plain-text error messages with actionable hints that your AI assistant sees directly. The examples below show both formats.
HTTP Status Codes
Authentication Errors
401, Authorization required
Gateway response:Authorization header was provided.
Fix:
- API key: Ensure
SMARTALEX_API_KEYenvironment variable is set - OAuth: Reconnect the MCP server to trigger OAuth authentication
- Cloud: Check that your AI client is sending the Bearer token
401, Invalid or expired token
- Regenerate your API key from the Developer Portal
- For OAuth, re-authenticate by reconnecting the MCP server
- Check that the key starts with
sa_live_(production) orsa_test_(test)
Permission Errors
403, Insufficient permissions
- Ask your workspace admin to grant the required page permission
- API keys inherit permissions from the user who created them
403, User principal required
created_by user.
Fix:
- Regenerate the API key from a user account with appropriate permissions
403, API key does not have write permission
read permission but the operation requires write.
Fix:
- Generate a new API key with both
readandwritepermissions from the Developer Portal
Validation Errors
400, Invalid parameters
first_nameis required forsmartalex_create_contactdeal_nameis required forsmartalex_create_dealurlandevent_typesare required forsmartalex_create_webhookidmust be a valid UUID for all get/update/delete operationsstagemust be one of:lead,qualified,showing,offer,under_contract,closed_won,closed_lost
400, Invalid UUID
id parameter was provided but isn’t a valid UUID.
Fix: UUIDs follow the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (e.g., a1b2c3d4-e5f6-7890-abcd-ef1234567890).
422, Validation error
Gateway response:Resource Errors
404, Not found
- Verify the UUID is correct
- Use the corresponding
list_tool to find valid IDs - Resources are workspace-scoped, you can only access your own data
Rate Limiting
429, Too many requests
Rate limits:
Fix: Wait for the
Retry-After duration and retry. Most AI clients handle 429 responses automatically with exponential backoff.
Server Errors
500, Internal server error
- Retry the request, transient errors often resolve on the next attempt
- If persistent, contact support at hello@aisky.co.za with the request details
MCP Protocol Errors
These errors come from the MCP SDK transport layer, not from AiSky tools.406, Not Acceptable
Accept headers for MCP Streamable HTTP transport.
Fix: This typically means the client is making raw HTTP requests instead of using an MCP client library. Use a proper MCP client (Claude, Cursor, etc.) or set Accept: application/json, text/event-stream in your HTTP headers.
Gateway Errors
Gateway returned non-JSON
No route found
- Local: Update to the latest version:
npx @smartalex/mcp-server@latest - Cloud: This resolves automatically, contact support if it persists
Related Pages
- Getting Started, Setup and troubleshooting
- Tools Reference, All 28 tools with parameters
- MCP Overview, Architecture and authentication

