@marlinjai/email-mcp 1.4.4 → 1.7.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 +34 -5
- package/dist/index.js +506 -138
- package/dist/index.js.map +3 -3
- package/dist/setup/wizard.js +369 -111
- package/dist/setup/wizard.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,11 +62,19 @@ No configuration needed — the setup wizard handles everything using built-in O
|
|
|
62
62
|
```bash
|
|
63
63
|
npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
64
64
|
# Select "Gmail" when prompted
|
|
65
|
+
# Choose "Full" or "Restricted" permission scope when asked
|
|
65
66
|
# A browser window opens for Google authorization
|
|
66
67
|
# Grant the requested permissions and return to the terminal
|
|
67
68
|
```
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
The wizard asks which Gmail permission scope to authorize:
|
|
71
|
+
|
|
72
|
+
- **Full** (default) — everything below, plus immediate, Trash-bypassing permanent deletion (`https://mail.google.com/`, Gmail's maximum-permission scope).
|
|
73
|
+
- **Restricted** — read, send, label, archive, and move-to-trash (`gmail.modify` + `gmail.settings.basic`), but no permanent deletion. Every tool in this server works identically under Restricted except an explicit `permanent: true` delete, which fails with a Gmail API error instead of succeeding.
|
|
74
|
+
|
|
75
|
+
Pass `--scope full` or `--scope restricted` to skip the prompt, or set `EMAIL_MCP_GMAIL_SCOPE=restricted` in the environment the wizard runs in.
|
|
76
|
+
|
|
77
|
+
> **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.
|
|
70
78
|
|
|
71
79
|
### Outlook
|
|
72
80
|
|
|
@@ -79,7 +87,7 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
79
87
|
# Sign in and grant the requested permissions
|
|
80
88
|
```
|
|
81
89
|
|
|
82
|
-
> **Note:** If you prefer to use your own OAuth app, register one in the [Azure Portal](https://portal.azure.com/) with `Mail.ReadWrite`, `Mail.Send`, `MailboxSettings.ReadWrite` (needed for `email_create_block_rule`), and `offline_access` permissions.
|
|
90
|
+
> **Note:** If you prefer to use your own OAuth app, register one in the [Azure Portal](https://portal.azure.com/) with `Mail.ReadWrite`, `Mail.Send`, `MailboxSettings.ReadWrite` (needed for `email_create_block_rule`), and `offline_access` permissions, then set `EMAIL_MCP_OUTLOOK_CLIENT_ID` in the environment before running the setup wizard.
|
|
83
91
|
|
|
84
92
|
### iCloud
|
|
85
93
|
|
|
@@ -105,7 +113,7 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
105
113
|
# Optionally enter SMTP host and port for sending
|
|
106
114
|
```
|
|
107
115
|
|
|
108
|
-
## Available Tools (
|
|
116
|
+
## Available Tools (32)
|
|
109
117
|
|
|
110
118
|
### Account Management (4)
|
|
111
119
|
|
|
@@ -116,7 +124,7 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
116
124
|
| `email_remove_account` | Remove an account and its stored credentials |
|
|
117
125
|
| `email_test_account` | Test connection to an account |
|
|
118
126
|
|
|
119
|
-
### Reading & Searching (
|
|
127
|
+
### Reading & Searching (6)
|
|
120
128
|
|
|
121
129
|
| Tool | Description |
|
|
122
130
|
|------|-------------|
|
|
@@ -125,8 +133,9 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
125
133
|
| `email_get` | Get full email content by ID (headers, body, attachment metadata) |
|
|
126
134
|
| `email_get_thread` | Get an entire email thread/conversation |
|
|
127
135
|
| `email_get_attachment` | Download a specific attachment by ID (returns base64 data) |
|
|
136
|
+
| `email_save_attachment` | Download an attachment directly to disk, returning metadata only — 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 |
|
|
128
137
|
|
|
129
|
-
### Sending & Drafts (
|
|
138
|
+
### Sending & Drafts (6)
|
|
130
139
|
|
|
131
140
|
| Tool | Description |
|
|
132
141
|
|------|-------------|
|
|
@@ -134,6 +143,7 @@ npx -y -p @marlinjai/email-mcp@latest email-mcp-setup
|
|
|
134
143
|
| `email_reply` | Reply to an email (supports reply-all, preserves threading) |
|
|
135
144
|
| `email_forward` | Forward an email to new recipients |
|
|
136
145
|
| `email_draft_create` | Save a draft without sending |
|
|
146
|
+
| `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 — the returned id is a **new** id, always use it going forward |
|
|
137
147
|
| `email_draft_list` | List all drafts |
|
|
138
148
|
|
|
139
149
|
### Organization (8)
|
|
@@ -217,6 +227,25 @@ pnpm test:watch
|
|
|
217
227
|
pnpm test:integration
|
|
218
228
|
```
|
|
219
229
|
|
|
230
|
+
## Credential Storage
|
|
231
|
+
|
|
232
|
+
Account credentials are encrypted at rest with AES-256-GCM in `~/.email-mcp/credentials.enc`.
|
|
233
|
+
|
|
234
|
+
By default the encryption key is derived from a stable, machine-specific identifier
|
|
235
|
+
(the hardware UUID on macOS, `/etc/machine-id` on Linux, or the `MachineGuid` on
|
|
236
|
+
Windows), falling back to the hostname when none is available.
|
|
237
|
+
|
|
238
|
+
Set the `EMAIL_MCP_KEY` environment variable to supply your own passphrase instead.
|
|
239
|
+
This is recommended when the machine identifier may change (for example in
|
|
240
|
+
containers or CI), or when you want to move `credentials.enc` between machines:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
export EMAIL_MCP_KEY="your-strong-passphrase"
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
When `EMAIL_MCP_KEY` is set, existing credential files are transparently
|
|
247
|
+
re-encrypted with the passphrase the next time they are read.
|
|
248
|
+
|
|
220
249
|
## Support
|
|
221
250
|
|
|
222
251
|
If this project is useful to you, consider supporting its development:
|