Skip to main content

Overview

Auth errors are thrown when authentication or authorization fails at the request level. These are public errors that inform clients about what action is needed (re-authenticate, authorize an app, etc.). For internal auth infrastructure errors, see Auth Internal Errors.

Error Reference

UnauthorizedError

Thrown when a request is missing valid credentials.
Example:

AuthConfigurationError

Thrown when the authentication configuration is invalid (e.g., transparent mode on a parent with multiple child providers).
Example:

SessionMissingError

Thrown when a request arrives without a valid session. This tells the client it needs to authenticate.
Example:

UnsupportedClientVersionError

Thrown when a client connects with an unsupported MCP protocol version.
Example:

AuthorizationRequiredError

Thrown when a tool requires app-level authorization the user has not yet granted. Supports progressive/incremental authorization. Behavior depends on session mode:
  • Stateful: Returns an auth_url link for incremental authorization
  • Stateless: Returns an unauthorized error (user must re-authenticate)
Methods: Example (stateful):
Example (stateless):

ToolNotAllowedError

Thrown when a tool is not in the active skill session’s allowlist. Used by the Tool Authorization Guard.

ToolApprovalRequiredError

Thrown when a tool requires explicit approval before use within a skill session (approval policy mode).