@marlinjai/email-mcp 1.8.1 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -12
- package/dist/index.js +810 -136
- package/dist/index.js.map +4 -4
- package/dist/setup/wizard.js +397 -84
- package/dist/setup/wizard.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,6 +76,8 @@ The wizard asks which Gmail permission scope to authorize:
|
|
|
76
76
|
|
|
77
77
|
Pass `--scope full` or `--scope restricted` to skip the prompt, or set `EMAIL_MCP_GMAIL_SCOPE=restricted` in the environment the wizard runs in.
|
|
78
78
|
|
|
79
|
+
> **Verification status (1 October 2026):** Google's review of the shared OAuth app is still running, so Google currently only lets accounts on its test-user list sign in through it; everyone else sees the "has not completed the Google verification process" screen and needs their own OAuth app (next note). The last open step for the shared app is a yearly independent security assessment (CASA, Cloud Application Security Assessment) that Google has requested. Because email-mcp has no server of its own, its applicability is being clarified with Google. Details and current status: [email.lumitra.co/privacy#google-verification](https://email.lumitra.co/privacy#google-verification), tracked in [issue #1](https://github.com/marlinjai/email-mcp/issues/1).
|
|
80
|
+
|
|
79
81
|
> **Note:** If you prefer to use your own OAuth app instead of the shared one this package ships with, create a Desktop OAuth 2.0 Client in the [Google Cloud Console](https://console.cloud.google.com/) with the Gmail API enabled, then set `EMAIL_MCP_GMAIL_CLIENT_ID` and `EMAIL_MCP_GMAIL_CLIENT_SECRET` in the environment before running the setup wizard (and in the MCP server's environment, since re-authentication uses the same variables). This gives you your own token lifecycle, independent of the publisher's Cloud project, and sidesteps Google's unverified-app warning and 100-test-user cap for your own account(s) once you add yourself as a test user on your own app.
|
|
80
82
|
|
|
81
83
|
### Outlook
|
|
@@ -115,7 +117,7 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
115
117
|
# Optionally enter SMTP host and port for sending
|
|
116
118
|
```
|
|
117
119
|
|
|
118
|
-
## Available Tools (
|
|
120
|
+
## Available Tools (36)
|
|
119
121
|
|
|
120
122
|
### Account Management (4)
|
|
121
123
|
|
|
@@ -132,20 +134,42 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
132
134
|
|------|-------------|
|
|
133
135
|
| `email_list_folders` | List all folders/labels for an account |
|
|
134
136
|
| `email_search` | Search emails with filters. Returns compact results by default (`returnBody=false`). Set `returnBody=true` to include full email bodies |
|
|
135
|
-
| `email_get` | Get full email content by ID (headers, body, attachment metadata) |
|
|
136
|
-
| `email_get_thread` | Get an entire email thread/conversation |
|
|
137
|
-
| `email_get_attachment` | Download a specific attachment by ID (returns base64 data) |
|
|
138
|
-
| `email_save_attachment` | Download an attachment directly to disk, returning metadata only
|
|
137
|
+
| `email_get` | Get full email content by ID (headers, body, attachment metadata). `sourceFolder` names the folder on iCloud/IMAP when the message is not in INBOX |
|
|
138
|
+
| `email_get_thread` | Get an entire email thread/conversation. On iCloud/IMAP a thread is searched in one folder: INBOX, or the one named in `sourceFolder` |
|
|
139
|
+
| `email_get_attachment` | Download a specific attachment by ID (returns base64 data). `sourceFolder` names the folder on iCloud/IMAP when the message is not in INBOX |
|
|
140
|
+
| `email_save_attachment` | Download 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` |
|
|
139
141
|
|
|
140
142
|
### Sending & Drafts (6)
|
|
141
143
|
|
|
144
|
+
`email_send`, `email_reply`, `email_forward`, `email_draft_create` and `email_draft_update` take an optional `attachments` list. Each entry is either `{ path }` (a file in the attachments folder, see below) or `{ content, filename }` (base64), with an optional `contentType` (inferred from the extension otherwise). The total is capped at 25 MB; Outlook accepts up to 3 MB per message through this server. On `email_draft_update` a list replaces the draft's files and an empty list removes them.
|
|
145
|
+
|
|
146
|
+
Replies stay in their thread: `email_reply` sends inside the original conversation on Gmail and Outlook (and sets the `In-Reply-To` and `References` headers everywhere), `email_draft_create` with `inReplyToEmailId` saves a reply draft in that thread, and `email_draft_update` keeps a reply draft there.
|
|
147
|
+
|
|
148
|
+
**Forwarding the original message's attachments is opt-in.** `email_forward` sends the text of the original; its files go along only with `includeOriginalAttachments: true`, so one call does not pass files the assistant never looked at on to another address. Forwarded files count against the 25 MB cap together with added ones.
|
|
149
|
+
|
|
150
|
+
**Attaching files by path is off until you name a folder.** The path comes from the assistant, and an assistant that reads mail can be asked by a mail to attach something it should not (a private key, for example). So files are only read from the one folder you set in `EMAIL_MCP_ATTACHMENTS_DIR`, in the environment of the server; no tool can change it. Put the file there and ask for it by name:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"mcpServers": {
|
|
155
|
+
"email": {
|
|
156
|
+
"command": "npx",
|
|
157
|
+
"args": ["@marlinjai/email-mcp"],
|
|
158
|
+
"env": { "EMAIL_MCP_ATTACHMENTS_DIR": "~/Documents/email-outbox" }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
A path outside that folder is refused, as is a symbolic link that leads out of it, and email-mcp's own data files are never attachable.
|
|
165
|
+
|
|
142
166
|
| Tool | Description |
|
|
143
167
|
|------|-------------|
|
|
144
|
-
| `email_send` | Compose and send a new email (to, cc, bcc, subject, body) |
|
|
145
|
-
| `email_reply` | Reply to an email
|
|
146
|
-
| `email_forward` | Forward an email to new recipients |
|
|
147
|
-
| `email_draft_create` | Save a draft without sending |
|
|
148
|
-
| `email_draft_update` | Update an existing draft in place. 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
|
|
168
|
+
| `email_send` | Compose and send a new email (to, cc, bcc, subject, body, attachments) |
|
|
169
|
+
| `email_reply` | Reply 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 |
|
|
170
|
+
| `email_forward` | Forward 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 |
|
|
171
|
+
| `email_draft_create` | Save 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) |
|
|
172
|
+
| `email_draft_update` | Update 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 |
|
|
149
173
|
| `email_draft_list` | List all drafts |
|
|
150
174
|
|
|
151
175
|
### Organization (8)
|
|
@@ -161,13 +185,14 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
161
185
|
| `email_get_labels` | List all labels with counts (Gmail only) |
|
|
162
186
|
| `email_get_categories` | List all categories (Outlook only) |
|
|
163
187
|
|
|
164
|
-
### Batch Operations (
|
|
188
|
+
### Batch Operations (4)
|
|
165
189
|
|
|
166
190
|
| Tool | Description |
|
|
167
191
|
|------|-------------|
|
|
168
192
|
| `email_batch_delete` | Delete multiple emails at once (up to 1000 for Gmail, batches of 20 for Outlook, UID ranges for IMAP) |
|
|
169
193
|
| `email_batch_move` | Move multiple emails to a folder in a single call |
|
|
170
194
|
| `email_batch_mark` | Mark multiple emails read/unread, starred, or flagged at once |
|
|
195
|
+
| `email_batch_label` | Add or remove labels on multiple emails at once (native batch call on Gmail, one by one elsewhere) |
|
|
171
196
|
|
|
172
197
|
All batch tools accept a `sourceFolder` parameter for IMAP/iCloud and include a sequential fallback for maximum compatibility.
|
|
173
198
|
|
|
@@ -183,6 +208,32 @@ All batch tools accept a `sourceFolder` parameter for IMAP/iCloud and include a
|
|
|
183
208
|
|
|
184
209
|
Gmail and Outlook only for the rule tools; `email_report_spam`/`email_batch_report_spam` work on every provider (iCloud/IMAP fall back to a best-effort move into the account's Junk-typed folder, with no vendor ML training signal since generic IMAP has none to train).
|
|
185
210
|
|
|
211
|
+
### Forwarding Rules (3)
|
|
212
|
+
|
|
213
|
+
| Tool | Description |
|
|
214
|
+
|------|-------------|
|
|
215
|
+
| `email_create_forward_rule` | Create 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 |
|
|
216
|
+
| `email_list_forward_rules` | List 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 |
|
|
217
|
+
| `email_delete_forward_rule` | Delete a forwarding rule by id |
|
|
218
|
+
|
|
219
|
+
Gmail and Outlook only. iCloud and generic IMAP have no server-side rule mechanism; set the rule in the provider's own settings there.
|
|
220
|
+
|
|
221
|
+
**Forwarding is off until you allow a target.** A standing forward rule copies future mail out of your mailbox, and an assistant that reads mail can be asked to create one by the mail it reads. So `email_create_forward_rule` only accepts addresses you listed yourself in `EMAIL_MCP_FORWARD_ALLOWLIST` (comma-separated), in the environment of the server. No tool can change that list:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"mcpServers": {
|
|
226
|
+
"email": {
|
|
227
|
+
"command": "npx",
|
|
228
|
+
"args": ["@marlinjai/email-mcp"],
|
|
229
|
+
"env": { "EMAIL_MCP_FORWARD_ALLOWLIST": "expenses@example.com" }
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
On Gmail the target must also be a forwarding address of the account: add it once under Gmail Settings, "Forwarding and POP/IMAP", "Add a forwarding address", and confirm the email Google sends to it. Outlook needs no such step, which is why the allowlist exists. Outlook accounts authenticated before the block-rule tools existed need to re-run the setup wizard once, as for those tools.
|
|
236
|
+
|
|
186
237
|
## Usage with Claude Code
|
|
187
238
|
|
|
188
239
|
Add the following to your `.mcp.json` file (project-level or global `~/.claude/.mcp.json`):
|
|
@@ -265,7 +316,7 @@ can reach it.
|
|
|
265
316
|
|
|
266
317
|
## Support
|
|
267
318
|
|
|
268
|
-
|
|
319
|
+
email-mcp is free and has no paid tier. Its one fixed cost is the independent security assessment Google requires every year for the shared Gmail sign-in (CASA, Cloud Application Security Assessment): 675 US dollars a year. It is the last open step before Google lets everyone use the one-command Gmail setup. Donations are collected until 2 November 2026, the day the assessment has to start, and the maintainer pays what is missing then. Progress is shown at [email.lumitra.co](https://email.lumitra.co/#fund-the-audit).
|
|
269
320
|
|
|
270
321
|
- [GitHub Sponsors](https://github.com/sponsors/marlinjai)
|
|
271
322
|
- [Buy Me a Coffee](https://buymeacoffee.com/marlinjai)
|