OPDC API error code

MCP_KEY_REFUSED

HTTP status 403

The API key is not an MCP connection key. 403.

The MCP endpoint serves only a key issued for an MCP connection, and never a key that can write. Create a connection for the assistant and use its key.

The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/errors/mcp-key-refused, and with X-Error-Code: MCP_KEY_REFUSED. Branch on the code, never on the detail text.

How errors work, and what to retryEvery error code