v0.8.0 · OPEN SOURCE · MIT

MCP SERVER · OFFICIAL GMAIL API · LOCAL

Gmail for your AI.
Sent on your OK.

Gmail for AI agents that is safe to leave alone.

One local MCP server, nexus-agymail, gives Antigravity (whose store has no Gmail connector) or any MCP client your Gmail through the official Gmail API: search, read, attachments, drafts, labels, a reversible trash, and sending a draft only after your yes for that exact draft. Nothing is ever deleted for good.

  • The same tools as Google’s Gmail MCP
  • Sending bound to the exact draft
  • Never a permanent deletion

Works with

  • Antigravity
  • Claude
  • Codex
An envelope and a draft waiting for your OK, with its single-use token, linked to Antigravity
nexus-agymail
  1. create_draft(to, subject, body)
  2. draft created in Gmail
  3. send_draft(draftId)
  4. accord exact summary to show, single-use token
  5. delete(messageId)
  6. absent no permanent deletion tool
Illustration of an exchange: the agent writes a draft, can only send it with your OK for that exact draft, and cannot delete anything for good.
MCPGMAIL API V1OAUTHPYTHON 3.14DPAPIMIT

01 / WHAT IT DOES

The official tools.
On your machine.

Same names and parameters as Google’s official Gmail MCP server, without the preview programme or a remote endpoint, plus three tools of its own.

02 / INSTALLATION

Ten minutes.
Once.

  1. Requirements

    • Windows, macOS or Linux
    • A Google account, about 10 minutes, once
  2. Install uv

    If it is not there yet: open PowerShell and paste:

    irm https://astral.sh/uv/install.ps1 | iex

    macOS, Linux:

    curl -LsSf https://astral.sh/uv/install.sh | sh
  3. Create your own Google access

    Your mail never goes through anyone else’s app.

  4. Connect your Gmail

    Your browser opens on Google’s page:

    uvx --python 3.14 nexus-agymail auth --client-secret "$HOME\Downloads\client_secret_XXXX.json"

    Google shows “Google hasn’t verified this app”: it is yours, click Advanced, Go to … (unsafe), then allow.

  5. Plug in Antigravity, then restart it

    uvx --python 3.14 nexus-agymail setup

    Another AI app (Claude Desktop, Cursor, VS Code, Codex): add the server uvx --python 3.14 nexus-agymail to its MCP configuration (examples in the README).

  6. Try it

    Ask, for example: “Summarize my unread emails from this week”, “Archive the newsletters older than a month”, “Draft a reply to Alice saying I agree, and show it to me before sending”.

To check:

uvx --python 3.14 nexus-agymail status

To remove everything: delete ~\.nexus\nexus-agymail and ~\.gemini\config\plugins\nexus-agymail, then remove the access in your Google account.

Code, documentation and installer: NexusAGYmail GitHub repository.

Independent project, not affiliated with Google; Gmail is a trademark of Google LLC.

Version
0.8.0
Licence
MIT
System
Windows (daily use), Linux (tests in CI); macOS untested
Clients
Antigravity, and any MCP client (Claude Desktop, Codex, Cursor, VS Code)
Scopes
gmail.readonly, gmail.compose, gmail.modify

03 / NEXUS ECOSYSTEM

On its own, it works.
Together, it does more.

NexusAGYmail installs on its own, or with the other Nexus bricks. Each one makes the others richer, and each one has its fallback: if a brick is missing, nothing breaks.

NexusBrowser

WithFor Gmail settings (filters, signature) or another Google account, the agent goes through your real Chrome.

WithoutThose settings are done by hand in Gmail.

Discover NexusBrowser

NexusRelay

WithClaude can hand a sorting job or a reply to Antigravity, which handles it with its tools.

WithoutEach AI works alone.

Discover NexusRelay

NexusWindows

WithA saved attachment can then be opened and handled in a desktop app.

WithoutNexusAGYmail does not depend on it.

Discover NexusWindows

NexusAndroid

WithThe agents also drive a real Android phone.

WithoutNexusAGYmail does not depend on it.

Discover NexusAndroid

04 / SECURITY

Held by the code.
Not by a prompt.

An email can never trigger a send, every email is framed as data, and secrets are never attached.

Never a permanent deletion

Scopes gmail.readonly, gmail.compose and gmail.modify; never the only scope that allows permanent deletion, and no tool to do it.

Sending bound to the exact draft

A single-use token (10 minutes) bound to the recipients, subject, body and the fingerprint of each attachment; the draft is read again just before sending, and nothing goes out if it changed.

Recipient provenance

A recipient found in an email the agent read is flagged in the summary: allowed only if you asked for it.

Emails framed as data

Subject, body, addresses and attachment names are returned framed and labelled as data; an email that looks like instructions for an AI is flagged.

Hardened attachments

Sanitized names, never overwriting, “downloaded from the Internet” mark; never an attachment taken from a secrets folder.

Encrypted token

Encrypted with DPAPI for your Windows account (a file readable only by you elsewhere), written atomically, never shown.

Privacy

No account, no telemetry, no relay: the only requests go to Google, with your own OAuth client. No email is written to disk, except an attachment you ask for.

05 / GOOD TO KNOW

Honest.
Limits included.

Your own OAuth client

Each user creates their own Google client: a shared public client would need Google’s restricted scope verification and a security assessment.

Plain text when writing

Drafts are written as plain text; no Gmail settings (filters, signature, forwarding), to be done in Gmail.

No spam, on purpose

Neither spam reporting nor permanent deletion. Used daily on Windows 11; macOS untested.

NexusAGYmail icon: an envelope and a check mark

06 / LINKS

Read the code.
Keep your mail in hand.

The server, the tests against a fake Gmail API and the documentation are on GitHub, under the MIT licence.