How to Connect Email to Claude: Gmail, Outlook or Any IMAP Inbox

Connect email to Claude with the GetMCP Mailbox connector: Claude asks what needs attention, GetMCP searches and reads the IMAP inbox, and sending stays off until you enable it.

To connect email to Claude, ChatGPT or Cursor, you give the AI client an email MCP server: tools for your mailbox that list what arrived, search, read a message, file it, draft or send a reply. GetMCP’s Mailbox connector turns Gmail, Outlook or any IMAP account into one, with 15 tools. Reading works from the start. Anything that sends, moves or deletes waits for you to switch it on.

It suits anyone whose day runs through an inbox: a founder triaging mail with Claude, a support lead watching a shared address, a sales rep finding the last thread with a prospect, or an agency handing a client an assistant that knows their mail. This guide covers setup, every tool, the safety defaults and the details that trip people up.

What is an email MCP server?

MCP clients such as Claude, ChatGPT and Cursor can call tools on any MCP server you connect. An email MCP server’s tools speak IMAP for reading and organising mail and SMTP for sending it. You ask “who is still waiting for a reply from me?”, and the model searches, reads the threads it needs and answers.

In GetMCP this is the Mailbox (IMAP) template, added in version 1.5.0. Installing it creates a server whose tools talk to your mail provider directly from your install. The connection lives in the server’s Mailbox settings, and the password is stored encrypted on your install. GetMCP, the company, never sees your mail.

How to connect email to Claude: setup

  1. Install the template. Open Templates and install Mailbox (IMAP). GetMCP creates the server and opens the Mailbox section of its Settings tab.
  2. Pick your provider. The Provider list fills in the servers and ports for Gmail / Google Workspace, Outlook / Microsoft 365, Yahoo Mail, Fastmail, Zoho Mail, or cPanel / custom server.
  3. Create an app password. Gmail and Yahoo require one, and Microsoft 365 tenants with basic authentication turned off need one too. Your normal password is rejected. Create it in your account’s security settings.
  4. Fill in the IMAP block. IMAP server, Port, Encryption (SSL/TLS on 993, STARTTLS on 143, or None), Username and Password. Default folder is usually INBOX; Trash folder and Sent folder are auto-detected when left blank.
  5. Fill in SMTP only if you will send. Sending (SMTP) is only needed for the send and draft tools: SMTP server, Port, SMTP encryption, and an optional From name and From address (defaults to the username).
  6. Test connection. The test saves your changes, signs in and lists your folders. A failure usually means an app password is required, or the host’s firewall blocks the outbound port.
  7. Connect a client. Use Quick Connect for Claude or Cursor, or add the endpoint to any MCP client.
GetMCP Mailbox settings form with the Provider dropdown, IMAP server, Port, Encryption, Username, Password, folder fields and the Sending (SMTP) section
The Mailbox section of a server's Settings tab, with the provider presets, IMAP details, the Sending (SMTP) block and Test connection.

The fifteen tools

Five tools only read and are active on install. The other ten change the mailbox or send mail, and install disabled; turn each one on from the server’s Tools tab when a workflow needs it.

ToolWhat it doesOn install
list_emailsRecent messages in a folder, newest first, as summaries: sender, recipients, subject, date, read and flagged state, size, attachments yes or no.On
search_emailsSearch by sender, recipient, subject, body text or date range.On
read_emailOne message in full, with its body and list of attachments. Does not mark it read unless asked.On
list_foldersEvery folder, with the exact names the other tools need.On
find_unsubscribeThe ways to leave the list a message came from, best first.On
send_emailSend, with cc, bcc, HTML and replies that stay in the thread.Off
save_draftSave a message to Drafts without sending.Off
mark_emailMark messages read or unread.Off
flag_emailFlag or unflag messages.Off
move_emailMove messages to another folder.Off
delete_emailMove to Trash, or permanently delete when permanent is true.Off
create_folderCreate a folder.Off
delete_folderDelete a folder that has no sub-folders, with the messages in it. The default, Trash and Sent folders are refused.Off
unsubscribe_via_linkComplete the unsubscribe link find_unsubscribe found.Off
send_unsubscribe_emailEmail the unsubscribe request for lists that only accept mail.Off

Details a mail client gets right

  • Summaries first, bodies on request. Listing and searching never return bodies, which keeps each turn small. read_email returns text by default (HTML converted to readable text) or the raw HTML with format: "html".
  • Paging that says what is left. list_emails and search_emails return 20 by default, up to 100, and report total_matching, has_more and next_offset, so a year-long search keeps going.
  • Replies stay in the thread. Pass reply_to_uid to send_email and GetMCP sets In-Reply-To and References from the original, and marks the original answered.
  • Unsubscribe without opening the email. find_unsubscribe reads the List-Unsubscribe headers and falls back to a link in the body. Where the sender supports one-click unsubscribe (RFC 8058), unsubscribe_via_link sends the exact request they committed to honour. Only HTTPS links are called, and links to private or internal addresses are refused.

Use cases

Once you connect email to Claude, these are the jobs it handles well.

A morning briefing from your inbox

Priya Sharma asks Claude “what arrived overnight that needs me today?” The model lists unread mail since yesterday, reads the few that matter and summarises them, all with the read-only tools.

list_emails (unread_only, since) → read_email × 3 → summary

Draft replies for a support inbox

A support lead enables save_draft on the shared support@ mailbox, and nothing else that writes. The assistant drafts answers in the thread, and a person reviews and sends each one from their usual mail client.

search_emails (unread_only) → read_email → save_draft → human sends

Find the last thread with a prospect

Before a call, a sales rep asks “what did Northwind last say about pricing?” The model searches by sender and subject and quotes the relevant message.

Collect invoices from a finance mailbox

An accounts team asks for every invoice received in September. The model searches by subject and date range, uses the summaries to see which messages carry attachments, reads each match and returns a table of supplier, date and amount.

Clean up newsletters

Enable the two unsubscribe tools and move_email. Ask the assistant to find newsletters you have not opened in three months, show you the list, then unsubscribe from the ones you approve and file the rest.

search_emails → find_unsubscribe → you approve → unsubscribe_via_link → move_email

An agent that combines mail with your data

Publish the mailbox and a database server through the MCP Gateway. An agent can read a customer’s latest message, look up their order in the database and draft a reply that cites it.

Tips and gotchas

  • Never cache uids across a move or delete. The destination folder gives a moved message a new uid. Re-run list_emails or search_emails against the destination before acting on it again.
  • Folder names differ by provider. Gmail uses [Gmail]/Sent Mail, Outlook uses Sent Items. Have the model call list_folders first when unsure.
  • Body search is slower. On a large mailbox, searching body text takes longer than searching by sender, subject or date, so narrow with those first.
  • Very long bodies are trimmed. read_email returns up to 100,000 characters of body.
  • Keep certificate checks on. Turn off “Verify the mail server’s TLS certificate” only for a self-signed certificate on a server you control.
  • Confirm before sending. The send tool’s description tells the model to confirm the recipient, subject and body with you, but a sent message cannot be recalled, so enable it deliberately.
  • One mailbox per server. A shared inbox and a personal one are two servers, each with its own credentials, tools and call log.

Related features

FAQ

How do I connect Gmail to an email MCP server?

Create an app password in your Google account’s security settings, choose Gmail / Google Workspace as the provider, then enter your address and that app password. Google rejects your normal password over IMAP, so the app password is required.

Can the AI send email without my approval?

Not until you enable send_email, which installs disabled. Leave it off and the assistant can only read, or enable save_draft alone so every message waits in Drafts for you.

Does it work with Outlook and Microsoft 365?

Yes, over IMAP and SMTP. Choose Outlook / Microsoft 365 as the provider. Tenants that have basic authentication turned off need an app password.

Where is my mail stored?

It stays with your mail provider. Your GetMCP install fetches what a tool asks for and returns it to the client. The call log keeps tool calls like any other server’s, and PII redaction can scrub them if you switch it on.

Let your assistant read the mail, and nothing more until you say so. See the Mailbox connector page, or compare plans on pricing.

InfiWebs
All posts

Leave a reply

Ship an MCP server for your product this week.

Install GetMCP on any PHP host, import your API and share one URL. Your users can call your tools from Claude tonight.