Skip to content
Sign in
OmniMail MCP Reference

Setup guide

Onboarding checklist and protocol requirements for connecting your inboxes to AI agents.

Onboarding sequence

3 steps
Complete these three milestones to activate your private MCP email bridge.
  1. Step 1 of 3

    Sign in to your account

    Use your authorized Google account to access your workspace.

    Access is restricted to the single email defined in AUTH_OWNER_EMAIL. Signing in verifies workspace ownership and protects your stored mail credentials.

    Open account view
  2. Step 2 of 3

    Connect an email provider

    Add the accounts you want to use.

    Connect Gmail with Google OAuth, or configure iCloud, Yandex, or custom IMAP/SMTP using dedicated app-specific passwords. Reading never modifies mailbox flags.

    Open mailboxes view
  3. Step 3 of 3

    Connect AI clients (ChatGPT, Claude, Cursor)

    Use your connected accounts through authorized tools.

    Provide your workspace MCP endpoint URL in ChatGPT, Claude Desktop, Cursor, or custom agents, configure client scopes, and approve the authorization grant.

    Open AI clients view

Provider protocol requirements

4 Providers Supported
Credential types, ports, and requirements for supported mailbox providers.

Gmail

OAuth 2.0 (Testing Mode)

During Google Cloud testing mode, user refresh tokens expire every 7 days. If a connection expires, simply click Reconnect to refresh tokens without losing configuration.

Google Mail API & IMAPOAuth 2.0 PKCE

Apple iCloud

App-Specific Password

Standard Apple ID passwords are not accepted. Generate an app-specific password at appleid.apple.com under Sign-In and Security. IMAP uses imap.mail.me.com on port 993 SSL.

imap.mail.me.comSSL/TLS 993 · 587

Yandex Mail

Mail App Password

If two-factor authentication is active on your Yandex ID, generate an App Password for Mail in Yandex ID security settings. IMAP uses imap.yandex.com on port 993 SSL.

imap.yandex.comSSL/TLS 993 · 465

Custom IMAP / SMTP

Standard Credentials

Requires IMAP over SSL (port 993) and SMTP over STARTTLS (port 587) or SSL (port 465). Plaintext unencrypted connections are rejected by policy.

Custom hostSSL/TLS · STARTTLS

Security & protocol invariants

Guarantees
Architectural rules enforced across all operations in this app.

Zero flag mutation

RFC 3501 BODY.PEEK

Mailbox reading operations (searching, inspecting message lists, reading body content) use RFC 3501 EXAMINE mode and BODY.PEEK. Email unread/read state is never modified by this bridge or any connected AI agent.

Zero message persistence

AES-256-GCM + AAD

Emails, message bodies, attachment binaries, and address books are never written to disk or database storage. Temporary in-memory cache expires after 10 minutes.

Explicit-only writes

Explicit Send ACL

The application does not allow autonomous mailbox modifications. Sending is disabled by default and requires explicit dual confirmation (account toggle and MCP client scope).

Model Context Protocol tool reference

7 MCP Tools
Complete catalog of tools exposed to authorized MCP clients (ChatGPT, Claude, Cursor).
list_accountsRead-only

Enumerate all connected and reachable mail accounts with capability flags.

Category: Accounts
list_mailboxesRead-only

Inspect mail folders, labels, and hierarchy for a specific account.

Category: Folders
search_messagesRead-only

Search message headers, subjects, sender info, and snippets with query criteria.

Category: Messages
get_messageRead-only

Fetch complete message body, headers, text content, and attachment metadata.

Category: Messages
get_attachmentAttachments

Download raw binary file data and decode base64 attachments safely.

Category: Files
stage_attachmentsAttachments

Upload and validate files into ephemeral temporary storage for sending.

Category: Sending
send_messageSend-enabled

Compose and send an email with optional staged attachments across authorized providers.

Category: Sending