duck.contrib.mcp.codes

Module containing codes for the Model Context Protocol.

Module Contents

Classes

MCPErrorCode

JSON-RPC 2.0 error codes used by this server. The standard codes (PARSE_ERROR, INVALID_REQUEST, METHOD_NOT_FOUND, INTERNAL_ERROR) are fixed by the JSON-RPC 2.0 spec. The remaining codes fall in the -32000 to -32099 range the spec reserves for implementation-defined server errors.

API

class duck.contrib.mcp.codes.MCPErrorCode[source]

Bases: enum.IntEnum

JSON-RPC 2.0 error codes used by this server. The standard codes (PARSE_ERROR, INVALID_REQUEST, METHOD_NOT_FOUND, INTERNAL_ERROR) are fixed by the JSON-RPC 2.0 spec. The remaining codes fall in the -32000 to -32099 range the spec reserves for implementation-defined server errors.

Initialization

Initialize self. See help(type(self)) for accurate signature.

INTERNAL_ERROR

None

INVALID_REQUEST

None

METHOD_NOT_FOUND

None

NOT_AUTHORIZED

None

ORIGIN_NOT_ALLOWED

None

PARSE_ERROR

None

UNAUTHORIZED

None