You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional OAuth listener for claude.ai and ChatGPT. A second listener (OAUTH_PORT) in the same process accepts only OAuth 2.1 access tokens (JWT, verified with jose: issuer, audience, typ: at+jwt, algorithm, exp/iat/nbf, scope, subject and client allowlists, signing keys from a cached JWKS). The existing listener (PORT) keeps accepting only AUTH_TOKEN, and neither accepts the other's credentials. Closed by default: it exists only when OAUTH_* variables are set, and an incomplete or invalid configuration aborts startup before any port is opened.
OAUTH_ISSUER, OAUTH_JWKS_URL, OAUTH_RESOURCE, OAUTH_SCOPE, OAUTH_ALLOWED_SUBJECTS, OAUTH_ALLOWED_CLIENT_IDS, OAUTH_ALLOWED_TOOLS, OAUTH_ALLOWED_ACCOUNTS, OAUTH_PORT, OAUTH_JWT_ALGORITHMS and OAUTH_MESSAGE_MODE. The OAuth tool profile is pure configuration (validated at startup against the registered tools; public_*, platform_* and create_conversation can never be exposed over OAuth because the account and message rules cannot be enforced on them, and private_only refuses every write tool other than send_message); the account allowlist applies to every call and filters get_profile; OAUTH_MESSAGE_MODE limits send_message to private notes (default) or allows outgoing replies, and incoming messages are always rejected there.
OAuth listener hardening: stateless MCP per request, JSON only with a 64 KiB body limit, no Origin, one Authorization header, Cache-Control: no-store, request/header timeouts, a per-subject rate limit (120 requests per minute), protected resource metadata and WWW-Authenticate challenges, and a JSON audit trail on stderr (identity, tool, result and non-sensitive identifiers; never message text or other arguments).
Input hardening on every transport: before dispatch, numeric IDs (account_id, *_id, before, after, in_reply_to, ID arrays) must be positive safe integers (digit-only strings are accepted and coerced), string path segments (portal_id, inbox_identifier, contact_identifier) must be safe tokens (assignee_id/team_id still accept 0 to remove an assignment; enum values are left to Chatwoot). The API clients also refuse paths with dot segments or query markers and percent-encode string path segments.
A single authorization gate shared by every listener decides which tools exist (enabled buckets, plus the OAuth allowlist) for both tools/list and tools/call.
Security
HTTP mode ran Enterprise and Help Center tools even when those buckets were disabled (MCP_ENABLE_ENTERPRISE / MCP_ENABLE_HELP_CENTER were only honored for listing). Disabled buckets are now neither listed nor callable in HTTP mode, as in STDIO mode.
HTTP mode without AUTH_TOKEN was open to anyone. It now refuses to start unless AUTH_TOKEN is set, or MCP_HTTP_ALLOW_NO_AUTH=true is set explicitly (a warning is logged). STDIO mode is unaffected. Breaking for HTTP deployments that relied on running without AUTH_TOKEN.
Debug logs no longer include tool arguments (they could contain message text and contact data); only the tool name is logged.