About marlinjai/email-mcp
marlinjai/email-mcp is an MCP server published by marlinjai in the Developer Tools category: unified MCP server for email access across Gmail, Outlook, iCloud, and IMAP. Conduid read 36 tools from its source: email_add_account, email_batch_delete, email_batch_label, email_batch_mark, email_batch_move, email_batch_report_spam and 30 more. It is published to npm as @marlinjai/email-mcp and starts with npx.
The repository has 28 stars and 19 forks, is licensed MIT, and its last commit was on 22 Nov 2026. The latest release is v1.10.1 (4 Oct 2026): Drafts keep their attachments. It follows v1.10.0 (3 Oct 2026), and the 5 most recent releases go back to v1.3.0 (14 Jun 2026). It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass No dynamic code execution and Scoped permissions. Its topics include devtools.
Install
claude mcp add email-mcp-marlinja -- npx @marlinjai/email-mcpnpx @marlinjai/email-mcpgit clone https://github.com/marlinjai/email-mcpTools (36)
email_add_accountAdd a new IMAP or iCloud account (Gmail/Outlook require setup wizard)| Parameter | Type | Description |
|---|---|---|
| email * | string | Email address |
| host | string | IMAP server hostname |
| name * | string | Display name for the account |
| password | string | Password or app-specific password |
| port | number | IMAP server port (default: 993) |
| provider * | string | Provider type: "imap" or "icloud" (Gmail/Outlook require OAuth setup wizard) |
| smtpHost | string | SMTP server hostname |
| smtpPort | number | SMTP server port |
| tls | boolean | Use TLS (default: true) |
email_batch_deleteDelete multiple emails at once (up to 1000 for Gmail, batches of 20 for Outlook, UID ranges for IMAP)| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| permanent | boolean | Permanently delete instead of moving to trash |
| sourceFolder | string | Source folder (required for IMAP/iCloud when emails are not in INBOX) |
email_batch_labelAdd or remove labels on multiple emails at once (native batch call on Gmail, one by one elsewhere)| Parameter | Type | Description |
|---|---|---|
| accountId * | string |
email_batch_markMark multiple emails read/unread, starred, or flagged at once| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| flagged | boolean | |
| read | boolean | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when emails are not in INBOX) |
| starred | boolean |
email_batch_moveMove multiple emails to a folder in a single call| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when emails are not in INBOX) |
| targetFolder * | string | Destination folder name or ID |
email_batch_report_spamReport multiple emails as spam/junk at once| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when emails are not in INBOX) |
email_create_block_ruleCreate a standing rule that intercepts future mail matching a pattern (sender domain/address, subject, or arbitrary header content) and either deletes it or moves it. Use `headerContains` (e.g. a Reply-To domain) to block a spam template family whose visible "From" domain rotates — matching the rotating domain directly stops working within days. Not supported on iCloud/generic IMAP (no standard server-side rule mechanism exists across IMAP servers). On Outlook, `moveToJunk` files straight to the Junk Email folder and requires the `MailboxSettings.ReadWrite` scope. On Gmail, `moveToJunk` skips the inbox (archives) rather than literally filing to Spam — Gmail's filter API rejects the SPAM label on standing rules (only Gmail's own classifier can apply it; `email_report_spam` still can, since that's a direct per-message action, not a filter) — and requires the `gmail.settings.basic` scope. Accounts authenticated before these scopes existed need to re-run the setup wizard once to re-consent| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| action * | string | delete: discard on arrival. moveToJunk: on Outlook, files straight to the Junk Email folder; on Gmail, skips the inbox (archives) — Gmail's filter API cannot proactively apply the SPAM label, only its own classifier can, so this is the closest a standing rule can actually do there. |
| matchType * | string | senderDomain/senderAddress: match the From address. subjectContains: match the subject. headerContains: match any header's raw content — the right choice for a stable element (e.g. a Reply-To domain) when the From domain rotates. |
| value * | string | The domain, address, or text to match |
email_create_forward_ruleCreate a standing rule that forwards future mail matching a pattern (sender domain/address, subject, or header content) to another address, for example vendor invoices to a bookkeeping address. The original stays in the inbox unless `keepInInbox` is `false`. Creating the same rule twice returns the existing one| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| forwardTo * | string | The address to forward to. Must be one of the addresses in ${FORWARD_ALLOWLIST_ENV}. |
| keepInInbox | boolean | Default true: the original stays in the inbox. false archives the original after forwarding. |
| matchType * | string | senderDomain/senderAddress: match the From address. subjectContains: match the subject. headerContains: match any header's raw content. |
| value * | string | The domain, address, or text to match |
email_deleteDelete an email (trash or permanent). Supports `sourceFolder` for IMAP/iCloud| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string | |
| permanent | boolean | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
email_delete_block_ruleDelete a standing block rule — use to undo a rule that turned out too broad| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| ruleId * | string |
email_delete_forward_ruleDelete a forwarding rule by id| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| ruleId * | string |
email_draft_createSave a draft without sending (attachments supported). `inReplyToEmailId` saves it as a reply inside that message's thread (`inReplyToSourceFolder` names that message's folder on iCloud/IMAP when it is not in INBOX)| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| inReplyToEmailId | string | Id of the email this draft replies to. The draft joins that thread (Gmail threadId, Outlook createReply, In-Reply-To/References headers elsewhere) |
| inReplyToSourceFolder | string | Folder of the email named in inReplyToEmailId (required for IMAP/iCloud when that email is not in INBOX). The draft itself is saved to Drafts |
| subject * | string |
email_draft_listList all drafts| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| limit | number | |
| offset | number |
email_draft_updateUpdate an existing draft in place. A reply draft stays in its thread. On Gmail/Outlook the draft id is unchanged; on iCloud/generic IMAP there's no in-place update (IMAP messages are immutable), so the old draft is deleted and a new one appended: the returned id is a new id, always use it going forward| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| draftId * | string | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when the draft is not in the default Drafts folder) |
| subject * | string |
email_folder_createCreate a new folder| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| name * | string | |
| parentPath | string |
email_forwardForward an email to new recipients (`to`, `cc`, `bcc`, optional text on top, attachments). The original's attachments are left out unless `includeOriginalAttachments: true`. `sourceFolder` names the folder on iCloud/IMAP when the message is not in INBOX| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string | |
| includeOriginalAttachments | boolean | Also forward the original message's attachments (default false). Leave it off unless the user asked for the files to go along |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
email_getGet full email content by ID (headers, body, attachment metadata). `sourceFolder` names the folder on iCloud/IMAP when the message is not in INBOX| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
email_get_attachmentDownload a specific attachment by ID (returns base64 data). `sourceFolder` names the folder on iCloud/IMAP when the message is not in INBOX| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| attachmentId * | string | |
| emailId * | string | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
email_get_categoriesList all categories (Outlook only)| Parameter | Type | Description |
|---|---|---|
| accountId * | string |
email_get_labelsList all labels with counts (Gmail only)| Parameter | Type | Description |
|---|---|---|
| accountId * | string |
email_get_threadGet an entire email thread/conversation. On iCloud/IMAP a thread is searched in one folder: INBOX, or the one named in `sourceFolder`| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| sourceFolder | string | Folder to look for the thread in on IMAP/iCloud, where a thread is searched in one folder (default INBOX). Gmail and Outlook ignore it |
| threadId * | string |
email_labelAdd/remove labels (Gmail only)| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string |
email_list_accountsList all configured accounts with connection statusemail_list_block_rulesList the standing block rules on an account, for auditing or before deleting one| Parameter | Type | Description |
|---|---|---|
| accountId * | string |
email_list_foldersList all folders/labels for an account| Parameter | Type | Description |
|---|---|---|
| accountId * | string |
email_list_forward_rulesList every rule on an account that forwards mail elsewhere, including rules made by hand in Gmail or Outlook: an audit of where mail is being sent| Parameter | Type | Description |
|---|---|---|
| accountId * | string |
email_markMark as read/unread, starred, or flagged. Supports `sourceFolder` for IMAP/iCloud| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string | |
| flagged | boolean | |
| read | boolean | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
| starred | boolean |
email_moveMove an email to a different folder. Supports `sourceFolder` for IMAP/iCloud| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
| targetFolder * | string |
email_remove_accountRemove an account and its stored credentials; revokes the Google grant for Gmail, removes Outlook tokens from the local token cache, and reports the outcome| Parameter | Type | Description |
|---|---|---|
| accountId * | string | ID of the account to remove |
email_replyReply to an email in its thread. `replyAll` addresses the sender and all To/Cc recipients except your own address, each once. Optional `to`/`cc`/`bcc` overrides and `additionalRecipients`, e.g. when replying to your own sent message. Attachments supported. `sourceFolder` names the folder on iCloud/IMAP when the message is not in INBOX| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string | |
| replyAll | boolean | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
email_report_spamReport an email as spam/junk, training the provider's own filter — the same signal the "Report Junk" button sends in Gmail/Outlook. This is different from `email_delete`, which removes the message but teaches the filter nothing. Not an abuse report to the provider's security team; it only trains this account's filter| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| emailId * | string | |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
email_save_attachmentDownload an attachment directly to disk, returning metadata only, which avoids the token cost of round-tripping large files as base64. `outputPath` is relative to a fixed downloads directory (`~/.email-mcp/downloads`, override with `EMAIL_MCP_DOWNLOADS_DIR`) and cannot escape it. `sourceFolder` as on `email_get_attachment`| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| attachmentId * | string | |
| emailId * | string | |
| outputPath * | string | Relative file path (within the downloads directory) to save the attachment as |
| sourceFolder | string | Source folder (required for IMAP/iCloud when email is not in INBOX) |
email_searchSearch emails with filters. Returns compact results by default (`returnBody=false`). Set `returnBody=true` to include full email bodies| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| before | string | |
| body | string | |
| folder | string | |
| from | string | |
| hasAttachment | boolean | |
| limit | number | |
| offset | number | |
| returnBody | boolean | Include full email body in results (default: false). Set to true only when you need the full content. |
| since | string | |
| starredOnly | boolean | |
| subject | string | |
| to | string | |
| unreadOnly | boolean |
email_sendCompose and send a new email (to, cc, bcc, subject, body, attachments)| Parameter | Type | Description |
|---|---|---|
| accountId * | string | |
| subject * | string |
email_test_accountTest connection to an account| Parameter | Type | Description |
|---|---|---|
| accountId * | string | ID of the account to test |
email_transferMove or copy emails between accounts, preserving the original message (sender, date, threading) via raw MIME transfer. `deleteAfter=true` trashes the source only after a confirmed import (safe cross-account move)| Parameter | Type | Description |
|---|---|---|
| deleteAfter | boolean | Send the source copy to trash after a successful import. Default false (copy, leaving the original in place). |
| markRead | boolean | Mark imported messages as read in the target. Default: provider default (usually unread). |
| sourceAccountId * | string | Account to read messages from |
| sourceFolder | string | Source folder (required for IMAP/iCloud when emails are not in INBOX) |
| targetAccountId * | string | Account to import messages into |
| targetFolder | string | Destination folder/label in the target account (Gmail label id or name; IMAP/Outlook folder name). Defaults to INBOX. |
Security checks
Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.9K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json.
- !No dynamic code executionScanned 33 source files and found 1 call to eval or shell execution, in src/setup/wizard.ts:30. Review how tool inputs reach them before granting credentials.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdiosrc/server.ts:2
- Starts other programs
- 3 callssrc/auth/credential-store.ts:34, src/auth/credential-store.ts:50, src/setup/wizard.ts:30
- Outbound network calls
- 5 callssrc/providers/gmail/auth.ts:58, src/providers/outlook/adapter.ts:462, src/providers/outlook/adapter.ts:483
- Writes or deletes files
- 9 callssrc/auth/credential-store.ts:177, src/auth/credential-store.ts:205, src/providers/outlook/auth.ts:54
- Lockfile
- package-lock.json
Pattern matches on the source text of 33 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 2.9K words, fetched a month ago. The original in the repository is authoritative.
Read full README