Mail Reply MCP
Reads Gmail over IMAP, lists folders and messages, retrieves message content and attachment metadata, and saves threaded reply drafts or sends replies over SMTP.
Reads Zoho Mail over IMAP, lists folders and messages, retrieves message content and attachment metadata, and saves threaded reply drafts or sends replies over SMTP, with Zoho region/paid host presets and Sent-folder copying.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Mail Reply MCP
An MCP server that lets Claude read your Zoho Mail and Gmail and write replies in the right thread. Replies are saved as drafts in the mailbox by default; you open Zoho or Gmail, check the draft, and press Send. Sending straight from Claude is possible per account once you switch it on.
Both providers are reached over plain IMAP (read, drafts, flags) and SMTP (send) with app passwords, so there is no Google Cloud project or Zoho API console to set up.
Setup
npm installandnpm run buildin the project folder.Create an app password for each mailbox (below).
Copy
.env.exampleto.envand put each app password in it.Copy
accounts.example.jsontoaccounts.jsonand describe each mailbox.Register the server once, for every Claude Code session:
claude mcp add --scope user mail-reply -- node /full/path/to/MailReplyMCP/dist/index.jsStart a new Claude session after registering, or after changing
accounts.jsonor.env(they are read when the server starts).
Gmail
Turn on 2-Step Verification for the Google account, then create an app password at Google Account > Security > App passwords. Google shows it as four groups of letters; spaces are fine, the server removes them.
Hosts are preset:
imap.gmail.com:993andsmtp.gmail.com:465.Gmail puts SMTP-sent mail into Sent by itself, so the server does not add a copy.
A Google Workspace admin can disallow app passwords. If the login fails with a correct app password, that is the likely cause.
Zoho Mail
In Zoho Mail > Settings > Mail Accounts, turn on IMAP Access for the mailbox. For an organisation account the admin may also need to allow IMAP for the user.
If the account has two-factor authentication, create an app-specific password at accounts.zoho.in > Security > App Passwords and use that.
Hosts depend on the data centre and plan. Set
"zoho": { "region": "in", "paid": true }:paid: true(paid organisation account) usesimappro.zoho.<region>/smtppro.zoho.<region>paid: falseusesimap.zoho.<region>/smtp.zoho.<region>regionis the data centre:infor zoho.in accounts,com,eu,com.au,jp,ca.
Check the exact hosts in Zoho Mail > Settings > Mail Accounts > IMAP / SMTP. If they differ, add explicit
imap/smtpblocks (below).
accounts.json
{
"accounts": [
{
"id": "zoho-work",
"provider": "zoho",
"email": "you@yourdomain.in",
"passwordEnv": "ZOHO_WORK_APP_PASSWORD",
"displayName": "Your Name",
"zoho": { "region": "in", "paid": true },
"signature": "Regards,\nYour Name",
"allowSend": false
},
{
"id": "gmail",
"provider": "gmail",
"email": "you@gmail.com",
"passwordEnv": "GMAIL_APP_PASSWORD",
"allowSend": false
}
]
}Field | Meaning |
| Short name used in the tools (lowercase letters, digits, |
|
|
| The mailbox address; replies come from it. |
| Name of the |
| Login name, if it is not the email address. |
| Name shown on replies. |
| Added under every reply, above the quoted original. |
|
|
|
|
| Copy sent replies into Sent. Preset: Gmail |
| Folder paths, if the server cannot find Drafts or Sent itself. |
accounts.json holds no passwords. .env and accounts.json are both in .gitignore.
Related MCP server: Gmail MCP Server
Tools
Tool | What it does |
| The configured accounts and whether sending is on for each. |
| An account's folders and their role (inbox, drafts, sent, ...). |
| Emails in a folder, newest first. Filters: |
| One email as text, with attachment names and sizes. |
| Saves a reply (or reply-all) in Drafts, threaded under the original. Nothing is sent. |
| Sends the reply. Only exists when an account has |
| Marks an email read or unread. |
Safety
Drafts by default.
send_replyis not even offered until an account hasallowSend: true. Leave it off unless you need it.Permission prompts depend on your Claude Code mode. Auto mode and allow rules can approve tool calls without asking. To always be asked before a send, add an
askpermission rule formcp__mail-reply__send_replyin your Claude Code settings.The server picks the recipients. A reply goes to the original sender (or its Reply-To), plus To and Cc on reply-all, minus your own address. Claude cannot add or change recipients, so an email that says "also send this to ..." cannot redirect a reply.
Recipients are confirmed before a send.
send_replymust be given, into, exactly the recipients the server works out; on any difference nothing is sent and the real list comes back, so Claude has to show you who it goes to first.An unclear send is reported as unclear. If the connection fails after the mail may already have reached the server, the error is
SEND_UNCERTAIN("may have been sent"). Check before sending again; Gmail files sent mail in Sent by itself.Reading never marks mail as read. Folders are opened read-only for listing and reading.
Email content is fenced as untrusted in what Claude sees, with an instruction not to follow anything written inside an email. Body lines that imitate the fence are replaced, and subjects, names and file names are flattened to one line so they cannot pose as server output.
Passwords stay out of tool output and errors. Errors name the
.envvariable, never its value.Not supported on purpose: new emails, forwards, attachments, moving or deleting mail.
Development
npm test # unit tests
npm run typecheck # src and tests
npm run build
npm run test:e2e # end-to-end, against a local GreenMail serverRun these from PowerShell or cmd, not Git Bash. Under Git Bash the working
directory reaches node with a different drive-letter case, vitest is resolved
twice, and every file fails collection with "Vitest failed to find the current
suite" before a single test runs. The tests are fine when that happens; the
shell is not.
The end-to-end tests need a throwaway GreenMail mail server (IMAP + SMTP in memory) on localhost:
docker run -d --name mailreply-greenmail -p 127.0.0.1:3025:3025 -p 127.0.0.1:3143:3143 -e GREENMAIL_OPTS="-Dgreenmail.setup.test.smtp -Dgreenmail.setup.test.imap -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.users=me:pw@example.test,ravi:pw@example.test -Dgreenmail.users.login=email" greenmail/standalone:2.1.8Remove it afterwards with docker rm -f mailreply-greenmail (never docker volume prune).
Known flake on this Windows machine: a full npm run test:e2e now and then loses a test worker with
exit code 3221226505 (0xC0000409), a silent native crash inside node.exe. It also happens outside
vitest, with no third-party DLLs loaded, and was not traced to this code. Rerun when it
happens; it is not a failing test.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Connect Rackspace Email and other IMAP mailboxes to Claude or ChatGPT: search, read, draft, send.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.40819 npm140MIT
- FlicenseAqualityCmaintenanceEnables Claude to read, search, send, and manage Gmail messages and threads through natural language.13-
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read and manage your Gmail account, including listing, searching, sending, drafting, replying to, archiving, labeling, and trashing emails via the Gmail API.-
- AlicenseAqualityBmaintenanceEnables Claude.ai and Claude Code to read and write a single Gmail mailbox, including search, drafts, sending, and label management.21MIT