Error layers
MailGreet MCP has three distinct error layers, each behaving differently. Understanding which layer an error comes from tells you how to fix it.| Layer | Level | When it occurs |
|---|---|---|
| HTTP errors | Transport | Auth failures, rate limits — before any JSON-RPC processing |
| JSON-RPC errors | Protocol | Invalid request format, unknown methods |
Tool errors (isError: true) | Application | Permissions, validation, business logic — returned inside a 200 OK |
HTTP errors
These are standard HTTP responses returned before the JSON-RPC body is even processed.401 Unauthorized
- No
Authorizationheader provided - Header is not in
Bearer mailgreet_xxxformat - API key not found (wrong key or typo)
- API key has been revoked
- API key has expired
429 Too Many Requests
retry_after value (in seconds) to know when to retry.
405 Method Not Allowed
Cause: UsingGET, PUT, or any method other than POST on the /mcp endpoint.
Fix: Always use POST https://api.mailgreet.com/mcp. The endpoint does not support any other method.
JSON-RPC errors
These are returned when the request structure itself is invalid. HTTP status is always200 for these — the error is in the response body.
Error code reference
| Code | Name | Cause |
|---|---|---|
-32600 | Invalid Request | Missing "jsonrpc": "2.0" field, or method is not a string |
-32601 | Method Not Found | method is not a recognized MCP method (e.g. not tools/call, initialize, etc.) |
-32602 | Invalid Params | Missing required parameter in tools/call, unknown tool name, or arguments is not an object |
-32603 | Internal Error | Unexpected server-side exception — file a support ticket if this persists |
Examples
Invalid JSON-RPC version
Invalid JSON-RPC version
Unknown method
Unknown method
Unknown tool name
Unknown tool name
Missing required parameter
Missing required parameter
Tool errors (isError: true)
When a tool call fails at the application level (permissions, not found, business logic), the MCP spec requires returning HTTP 200 with a normal JSON-RPC success envelope — but with isError: true added. This is intentional MCP behavior: the HTTP transport succeeded; the tool itself reported failure.
Tool error types
Permission Denied (Forbidden)
Permission Denied (Forbidden)
Not Found
Not Found
Validation Error
Validation Error
Business Logic Error
Business Logic Error
How AI clients handle errors
MCP clients (Claude, Cursor, n8n) surface errors differently from a raw HTTP client:| Error type | What Claude / Cursor shows the user |
|---|---|
| HTTP 401 | ”Failed to connect to MailGreet” — the client stops and the user needs to fix their API key config |
| JSON-RPC error | The AI reads the error message and reports it naturally: “I don’t recognize that operation” |
Tool isError: true | The AI reads the content[0].text and reports it conversationally: “I don’t have permission to read campaigns — you may need to update your API key permissions” |
| HTTP 429 | The AI typically waits and retries, or tells the user “I’m being rate limited — I’ll try again in a moment” |
For n8n workflows, tool
isError: true responses will cause the AI Agent node to surface the error text in its output. You can handle these in error branches of your workflow.
