Skip to main content

Troubleshooting Matrix

Use this matrix for Cursor, Claude, and ChatGPT MCP troubleshooting against Zerq.

SymptomLikely causeWhere to verifyFix
401 on initializeMissing/invalid bearer tokenGateway logs, auth provider token validityRefresh token and retry
Immediate connect failure before initializeWrong MCP server URL or transport settingClient config JSON/UI fieldsUse /mcp (gateway) or /api/v1/mcp (management) with streamableHttp
400 after successful initializeMissing/invalid Mcp-Session-Id on follow-up callClient request headersReuse session header returned by initialize
403 on tools/callTool/action outside role/policy scopeManagement RBAC config, client/profile permissionsGrant minimal required scope or use dedicated profile
405 from gateway MCPWrong method/routing to MCP endpointClient request method + endpoint URLUse supported MCP transport methods and correct path
429 responsesPolicy/rate limit exceededPolicy assignment, request logsBackoff with jitter and tune policy limits
Empty/partial tool listWrong auth identity or wrong surface endpointtools/list response, endpoint URLValidate gateway vs management endpoint selection
Management MCP returns 401 with valid gateway tokenWrong token type for management surfaceOIDC issuer/audience and token claimsUse OIDC access token for /api/v1/mcp
Gateway MCP denies with 403 despite valid tokenMissing or wrong X-Client-ID / X-Profile-IDMCP headers in client configSet profile-bound headers correctly in gateway MCP entry
Works in staging, fails in prodDifferent profile, policy, or OIDC issuer configEnvironment vars and deployment configAlign env settings and rotate credentials if needed

Debug sequence

  1. Confirm endpoint path (/mcp vs /api/v1/mcp).
  2. Validate bearer token for the intended surface.
  3. Re-run initialize and record new session ID.
  4. Run tools/list with same session.
  5. Run one expected tools/call and one intentionally disallowed call.

Evidence to collect

  • Request ID and timestamp
  • Full MCP JSON-RPC request/response payloads
  • Response headers (especially Mcp-Session-Id)
  • Matching request/audit log entries in Zerq