Railway
One-click deploy
Skip local setup entirely. Provision the full stack, including Postgres, Redis, and volumes, on Railway in a few minutes.
- No local Docker required
- Managed Postgres, Redis, and volumes
- Add or remove connectors anytime
100% Free· Open source · Self-host or hosted
Token scope
imap.gmail.com · app password · folder allowlist
Clients
Gmail label
Invoices
Gmail label
INBOX
Gmail inbox
Banking
Gmail label
Out-of-scope folder refused
Banking · not in this token's folders
The basics
A Gmail MCP server connects your mailbox to AI assistants through the Model Context Protocol. It gives tools like Claude, ChatGPT, and Cursor a small set of actions, such as listing folders, searching and reading email, and fetching attachments, so they can work with your mail instead of you copying it into the chat.
Automata is a free, open-source MCP server that reads Gmail over IMAP with an app password. Every tool call is checked against the token first, so the AI only sees the labels you approve, and it has no way to send mail.
Official connectors
Claude and ChatGPT both have official Gmail connectors that sign in with your Google account. Automata does not replace them. It is a different route to the same mailbox: IMAP with an app password, behind a token you scope yourself.
Why scope matters
Open-source Gmail MCP servers usually run on the Gmail API through an OAuth client you create, and give the AI every label plus the ability to send. Automata enforces access folder by folder and leaves sending out entirely.
| Capability | Typical Gmail MCP | Automata |
|---|---|---|
| What the AI can read | Every label in the mailbox | Only the folders (Gmail labels) on the token |
| Sending mail | Often included: send, reply, or forward as you | Never. An optional draft tool saves unsent drafts, off by default |
| Setup | Create a Google Cloud project and an OAuth client | An app password; no Google Cloud project |
| Revoking access | Remove the app from your Google account for every client | Revoke one token; other clients keep working |
| Remote clients (Claude.ai, ChatGPT) | Usually local stdio, with the OAuth credentials on your laptop | Streamable HTTP endpoint with bearer tokens; credentials stay on the server |
Hosted integration platforms such as Zapier, Composio, and Pipedream also offer Gmail MCP servers. Zapier's and Composio's include actions that send mail, which suits automations that need to send. Automata is the choice when the AI should only read.
Before you start
Gmail issues app passwords only when 2-Step Verification is on. Automata stores the app password with the connection, so use one you can revoke on its own.
The connection has no SMTP credentials. It cannot send, delete, move, or mark mail; the optional draft tool only saves an unsent draft.
Automata reads Gmail over IMAP. There is no Google Cloud project, no OAuth consent screen, and no Gmail API access.
Microsoft requires OAuth for IMAP, which this connection does not support. Use the official Microsoft connector in your AI client instead.
Sync behavior, storage, and every limit are in the email (IMAP) docs.
Run it your way
The control layer protecting your messages and data should not be a black box. Read the code, verify the checks, and deploy Automata wherever your security model requires.
One-click deploy
Skip local setup entirely. Provision the full stack, including Postgres, Redis, and volumes, on Railway in a few minutes.
Free, forever
Run the Nuxt control plane and Postgres on your machine, VPS, or homelab. Add the WhatsApp or Telegram services only when you need those connectors.
Free tier available
Use the same connector and permission model without operating the services yourself. Free for one connection; Pro is $19/month after a 7-day trial.
Comparing Automata with other tools? Read Automata vs Neon, Automata vs Supabase, Muse vs Grok Bot, Best WhatsApp MCPs, Best Postgres MCPs, or see all comparisons.
Reference
Every tool is limited to the folders on the token. Disabled tools are never registered, so the AI cannot even try them.
get-mailbox-statusreadReports which mailbox is connected, whether the sync works, and which folders are still backfilling.
list-mail-foldersreadLists only the folders in scope, INBOX first, with synced and unread counts.
list-emailsreadPages through headers, newest first, from one folder or every synced folder in scope.
search-emailsreadMatches sender, recipient, and subject against synced headers, and body text through Gmail's own search.
read-emailreadReturns the headers, the body as plain text, and the attachment list. It does not mark the email read.
get-email-attachmentreadFetches one attachment whole: images as images, text files as text, PDFs and other files as embedded files.
create-email-draftwriteSaves an unsent plain-text draft in your Drafts folder, if the token includes this tool. It cannot send.
Full parameters are in the MCP tools reference.
Setup
Turn on 2-Step Verification for your Google account, then create an app password for Automata. You can revoke it later without changing your Google password.
Sign up for hosted Automata or self-host it, choose Email (IMAP) with the Gmail preset, and paste the app password. Then create a connector token and pick its folders. New email tokens start read-only.
Paste the endpoint into Claude, ChatGPT, Cursor, or any MCP client. Start with get-mailbox-status to confirm it works.
claude mcp add --transport http gmail \
https://mcp.getautomata.app/mcp/<connection-id> \
--header "Authorization: Bearer <connector-token>"In Claude.ai or Claude Desktop, open Settings → Customize → Connectors → Add → Add custom connector, paste the connection's own /mcp/<connection-id> URL from the token dialog, and add the token as an Authorization: Bearer request header. If your client can't set headers, use /mcp/<connector-token> instead. See all clients.
Clients
Every client follows the same pattern: a Gmail app password on the connection, a connector token limited to the folders you choose, and the MCP URL over Streamable HTTP. Whichever client is asking, it can read only those folders, and it cannot send.
Claude has an official Gmail connector, and if you use Claude.ai or Claude Desktop it is the simpler start. To use Automata instead, add a custom connector with the connection's /mcp/<connection-id> URL and the token as an Authorization: Bearer header. In Claude Code, it is the one command shown above.
Connect Claude to email over IMAPChatGPT also has an official Gmail connector. Automata can be added under Plugins as a custom MCP server on plans that support them. ChatGPT cannot send an Authorization header, so use the /mcp/<connector-token> URL.
Add a custom MCP server to ChatGPTCursor supports remote MCP servers with custom headers, so add the connection's URL to mcp.json with the token in the Authorization header. Grok Bot, Meta Muse, and your own agents connect the same way.
MCP clients docsThe same connection has presets for iCloud, Fastmail, Zoho, and Yahoo, and works with any mailbox that offers IMAP and a password login. Proton Mail works through a hydroxide bridge beside a self-hosted install.
Email (IMAP) connection docsUse cases
FAQ
A Gmail MCP server exposes your Gmail mailbox to AI assistants through the Model Context Protocol, so tools like Claude, ChatGPT, or Cursor can list, search, and read your email instead of you copying it into the chat. Automata is one that connects over IMAP and limits each token to the folders you choose.
Yes. Both have official Gmail connectors that sign in with your Google account. If you only use Claude.ai, Claude Desktop, or ChatGPT and want Gmail with no extra setup, start there. Automata fits when you use another MCP client, want to limit the AI to certain labels, need it read-only, or want the same setup for a non-Gmail mailbox.
No. Automata signs in to Gmail over IMAP with an app password. You do not create a Google Cloud project or approve an OAuth app. An app password needs 2-Step Verification on your Google account, and you can revoke it on its own at any time.
No. The connection has no SMTP credentials, so it cannot send, and it cannot delete, move, or mark mail either. An optional tool saves an unsent plain-text draft in your Drafts folder for you to review and send yourself. A new email token starts with it switched off.
Over IMAP, each Gmail label appears as a folder, and a connector token is limited to the folders you pick. An email with several labels is listed once, and a token reaches it only through a label it allows. All Mail, Spam, and Trash are not synced.
On Google Workspace, it works only if your admin allows IMAP and you can create an app password. Otherwise, use Claude's or ChatGPT's official Gmail connector.
No. Microsoft 365 and Outlook.com no longer accept passwords over IMAP and require OAuth, which this connection does not support. Use the official Microsoft connector in your AI client for those.
No. Automata opens folders read-only and fetches bodies without setting the read flag, so reading through the AI does not change your inbox in Gmail.
It keeps a small header index (sender, recipients, subject, date, read and flagged state, and attachment names), about 1 KB per email, and deletes it with the connection. Bodies and attachments stay in Gmail and are fetched only when a tool asks for them.
Yes. Automata is MIT licensed and free to self-host. The hosted version at mcp.getautomata.app is free for one connection; Pro is $19/month after a 7-day trial.
Connect Gmail over IMAP in minutes. The same token model also covers WhatsApp, Telegram, and PostgreSQL.