Enable the server
For a deployment you administer, apply the database migrations and set both flags:NEXT_PUBLIC_BASE_URL to your deployment’s canonical public HTTPS origin. Restart the application after changing server configuration; changing the public API flag also requires rebuilding its client assets.
Connect an assistant
Add a remote Streamable HTTP MCP connection in your assistant using:resource when authorizing, exchanging an authorization code, and refreshing a token. Opaque tokens and API keys are not accepted by this endpoint.
Sign in with your connected provider, inspect the application’s identity and requested permissions, and choose Allow access. If MCP access is off for your user, the consent screen offers Enable MCP and allow. Email-code sessions cannot authorize clients or change MCP access.
Permissions apply to all inboxes linked to your user, including inboxes linked later:
Clients registered without explicit scopes default to read access and refresh tokens. They must request
mcp:write to manage rules. A write grant does not imply a read grant. Rule writes enforce the same digest-plan restrictions as the public API.
Available tools
list_email_accountslist_rules,get_rule,create_rule,update_rule,delete_ruleget_stats_by_period,get_response_time_stats
emailAccountId or emailAddress. If neither is supplied, they use the earliest linked account. Use list_email_accounts and supply a selector when working with multiple inboxes. Rule updates replace the rule definition.
Disconnect applications
Turn off MCP under Settings → Developer → API Access. This revokes all MCP consents and refresh grants, and invalidates existing access tokens. Turning MCP back on does not restore those tokens; reconnect each application to grant access again. Expired or removed login sessions also prevent MCP requests.Discovery
- Protected resource metadata:
/.well-known/oauth-protected-resource - Authorization server metadata:
/.well-known/oauth-authorization-server/api/auth - Root discovery fallback:
/.well-known/oauth-authorization-server
401 with a WWW-Authenticate header pointing to the resource metadata. The MCP endpoint is stateless and accepts HTTP POST; it does not offer a persistent event stream.