BrainDocs

Gmail

Connect Gmail with a static OAuth app, then per-user Connect.

Auth: Static OAuth app (client id + secret) → each user Connect.

MCP: https://gmailmcp.googleapis.com/mcp/v1

Admin: Set up

  1. Create an OAuth / MCP app at the provider (see notes below)
  2. In Brain open /toolsGmailSet up / App settings
  3. Enter client id and secret (scope: this workspace or entire instance, depending on your role)
  4. Save

Deploy-time env fallback (optional):

VariablePurpose
GOOGLE_MCP_CLIENT_IDOAuth client id
GOOGLE_MCP_CLIENT_SECRETOAuth client secret

Prefer UI Set up when possible; env remains a host-wide fallback.

Users: Connect

  1. Open /toolsGmailConnect
  2. Approve access in the provider UI
  3. Enable the app for Agent-mode chats

Callback URL

{BRAIN_PUBLIC_URL}/api/connections/gmail/callback

Use a Google OAuth client that allows the Brain callback URL. Mid-turn URI may appear in .eve/gmail-authorize-url.txt.