The envelope
Common codes
Unexpected server errors return a generic
internal_error with no internal details — the
underlying cause is logged server-side, never leaked to the client.The MCP surface is different
The MCP server speaks JSON-RPC 2.0, so its failures stay inside the JSON-RPC error envelope at HTTP200 rather than using the REST envelope
above. See MCP transport for the JSON-RPC error codes.