Use OAuth when it is available
Prefer the client’s normal OAuth flow. Select the Brein workspace you want the agent to use, review the requested permissions, and finish authorization in the browser.Use an API key when the client requires headers
Create a scoped key in Settings → API Keys and keep it in the client’s secret or environment store. For OpenClaw, the connection has this shape:mcp_servers:
Verify the connection
- List the workspaces the credential can access.
- Run a small read such as a market search or a bounded CRM query.
- Confirm that the result belongs to the intended workspace.
- Reconnect the client after a tool change if the client caches its tool list.
401 means the credential did not reach Brein. A 403 means the credential is valid but does not have access to the requested workspace or action.
