MCP Error Reference
When a tool call fails, the SmartAlex 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 SmartAlex 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:
- Signed-in apps: Reconnect the MCP server and sign in to SmartAlex again
- Cloud: Check that your AI client is sending the Bearer token
- Local npm package: Ensure the
SMARTALEX_API_KEYenvironment variable is set
401, Invalid or expired token
- Sign in again from your AI app
- On a brand-new account, open SmartAlex in your browser and finish setting up your workspace first, then sign in again
- Local npm package only: check that the key starts with
sa_live_(production) orsa_test_(test). API keys are not self-serve, so connect by signing in instead
Permission Errors
403, Insufficient permissions
- Ask your workspace admin to grant the required page permission
- A signed-in AI app has exactly your role’s permissions. See Security and permissions
- API keys inherit permissions from the user who created them
403, User principal required
created_by user.
Fix:
- Connect by signing in instead. A signed-in app always acts as you
403, API key does not have write permission
read permission but the operation requires write.
Fix:
- Connect by signing in instead. A signed-in app is not limited by key scopes: it has your role’s permissions. API keys are not self-serve
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 support@getsmartalex.com with the request details
MCP Protocol Errors
These errors come from the MCP SDK transport layer, not from SmartAlex 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 80 tools
- Security and permissions, What a signed-in app can do, and how to disconnect it
- MCP Overview, Architecture and authentication

