proton-mail-bridge-client 1.15.0 → 1.16.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.
Files changed (2) hide show
  1. package/README.md +46 -136
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -24,12 +24,12 @@
24
24
 
25
25
  ---
26
26
 
27
- Give Claude Desktop (or Cline, or any MCP client) full access to your Proton Mail inbox: read, search, send, draft, triage threads, manage folders, save attachments, and more. The same 40+ capabilities are also available as a full CLI for scripting, cron, and piped automation — no Claude required.
27
+ Give Claude Desktop (or Cline, or any MCP client) full access to your Proton Mail inbox: read, search, send, draft, triage threads, manage folders, save attachments, and more — 78 MCP tools in total. Most of the same capabilities are also available as a full CLI for scripting, cron, and piped automation — no Claude required.
28
28
 
29
29
  ## What you get
30
30
 
31
31
  - **Claude reads and manages your Proton Mail** — triage, reply, draft, archive, search, move, batch-act on threads, pull attachments
32
- - **Full CLI** — same 40+ commands, scriptable and pipeable, works in cron and shell scripts
32
+ - **Full CLI** — 73 commands covering nearly all of the same capabilities, scriptable and pipeable, works in cron and shell scripts
33
33
  - **Fast local search** — full-text search across your inbox without hitting IMAP on every query
34
34
  - **Safety controls** — read-only mode, send gate, destructive-action confirmation, per-action allowlist
35
35
  - **Privacy-native** — no third-party email service involved; your mail stays on your machine
@@ -194,6 +194,40 @@ The wizard handles config automatically. If you need to set it up by hand, three
194
194
 
195
195
  ---
196
196
 
197
+ ## Connect to Claude Code
198
+
199
+ Install globally, then register the server with one command:
200
+
201
+ ```bash
202
+ npm install -g proton-mail-bridge-client
203
+
204
+ claude mcp add proton-mail-bridge \
205
+ -e PROTONMAIL_USERNAME=you@proton.me \
206
+ -e PROTONMAIL_PASSWORD=your-bridge-password \
207
+ -- proton-mail-bridge-mcp
208
+ ```
209
+
210
+ `your-bridge-password` is the Bridge app's own password (**Bridge → account → Mailbox details**), not your Proton account password — see the note under [Prerequisites](#prerequisites).
211
+
212
+ By default this registers the server for the current project only. Add `-s user` to make it available in every project:
213
+
214
+ ```bash
215
+ claude mcp add proton-mail-bridge -s user \
216
+ -e PROTONMAIL_USERNAME=you@proton.me \
217
+ -e PROTONMAIL_PASSWORD=your-bridge-password \
218
+ -- proton-mail-bridge-mcp
219
+ ```
220
+
221
+ Verify it's connected:
222
+
223
+ ```bash
224
+ claude mcp list
225
+ ```
226
+
227
+ For file-based or command-based credentials instead of plaintext env vars, add `-e PROTONMAIL_USERNAME_FILE=/path/to/file` (or `_COMMAND`) the same way — see the credential methods under [Manual config](#connect-to-claude-desktop) above.
228
+
229
+ ---
230
+
197
231
  ## Connect to Cline (VS Code)
198
232
 
199
233
  Install globally (`npm install -g proton-mail-bridge-client`), then open Cline's MCP settings:
@@ -247,6 +281,8 @@ Reload the Cline extension after saving. Proton Mail tools will appear in Cline'
247
281
 
248
282
  > **Tip:** When creating folders, use `Folders/Name` (not just `Name`) — that's the Proton Bridge namespace for real folders vs. labels.
249
283
 
284
+ More recipes — expanded triage prompts, cron scripts for scheduled digests, and a Claude Code `/mail-triage` slash command — are in [examples/](examples/).
285
+
250
286
  ---
251
287
 
252
288
  ## Recommended System Prompt
@@ -268,144 +304,18 @@ Rules:
268
304
 
269
305
  ## CLI
270
306
 
271
- ```bash
272
- proton-mail-bridge-client <command> [options]
273
- ```
274
-
275
- All commands support `--json` for machine-readable output.
276
-
277
- ### Read
278
-
279
- ```bash
280
- proton-mail-bridge-client emails --folder INBOX --limit 25
281
- proton-mail-bridge-client read INBOX::25642
282
- proton-mail-bridge-client search "invoice" --limit 10
283
- proton-mail-bridge-client search --live --from openai.com
284
- proton-mail-bridge-client attachments INBOX::25642
285
- ```
286
-
287
- ### Triage
288
-
289
- ```bash
290
- proton-mail-bridge-client digest
291
- proton-mail-bridge-client threads "quarterly review"
292
- proton-mail-bridge-client actionable
293
- proton-mail-bridge-client followups
294
- proton-mail-bridge-client thread-brief <threadId>
295
- proton-mail-bridge-client document-threads --category invoice
296
- proton-mail-bridge-client meeting-context alice@example.com
297
- ```
298
-
299
- ### Compose & send
300
-
301
- ```bash
302
- proton-mail-bridge-client send --to bob@example.com --subject "Hey" --body "Hello"
303
- echo "Hello" | proton-mail-bridge-client send --to bob@example.com --subject "Hey"
304
- proton-mail-bridge-client reply INBOX::25642 --body "On it."
305
- proton-mail-bridge-client reply INBOX::25642 --reply-all --body "On it."
306
- proton-mail-bridge-client forward INBOX::25642 --to carol@example.com
307
- ```
308
-
309
- ### Mailbox actions
310
-
311
- ```bash
312
- proton-mail-bridge-client move INBOX::25642 Folders/Archive
313
- proton-mail-bridge-client archive INBOX::25642
314
- proton-mail-bridge-client trash INBOX::25642
315
- proton-mail-bridge-client restore Trash::25642
316
- proton-mail-bridge-client mark-read INBOX::25642
317
- proton-mail-bridge-client mark-read INBOX::25642 --unread
318
- proton-mail-bridge-client star INBOX::25642
319
- proton-mail-bridge-client delete INBOX::25642
320
- proton-mail-bridge-client batch archive INBOX::100,INBOX::101,INBOX::102
321
- proton-mail-bridge-client thread-action <threadId> archive
322
- ```
323
-
324
- ### Folders
325
-
326
- ```bash
327
- proton-mail-bridge-client folders
328
- proton-mail-bridge-client create-folder Folders/Receipts
329
- proton-mail-bridge-client rename-folder Folders/Receipts Folders/Bills
330
- proton-mail-bridge-client delete-folder Folders/Bills
331
- ```
332
-
333
- ### Drafts
334
-
335
- ```bash
336
- proton-mail-bridge-client drafts
337
- proton-mail-bridge-client draft-create --to bob@example.com --subject "Draft" --body "..."
338
- proton-mail-bridge-client draft-read <id>
339
- proton-mail-bridge-client draft-update <id> --subject "Updated subject"
340
- proton-mail-bridge-client draft-reply INBOX::25642 --body "Will do."
341
- proton-mail-bridge-client draft-forward INBOX::25642 --to carol@example.com
342
- proton-mail-bridge-client draft-sync <id>
343
- proton-mail-bridge-client draft-send <id>
344
- proton-mail-bridge-client draft-delete <id>
345
- proton-mail-bridge-client remote-drafts
346
- ```
347
-
348
- ### Analytics & diagnostics
349
-
350
- ```bash
351
- proton-mail-bridge-client stats
352
- proton-mail-bridge-client analytics
353
- proton-mail-bridge-client contacts
354
- proton-mail-bridge-client volume-trends --days 14
355
- proton-mail-bridge-client watch --timeout 30
356
- proton-mail-bridge-client test-email you@example.com
357
- proton-mail-bridge-client doctor
358
- proton-mail-bridge-client status
359
- proton-mail-bridge-client sync --folder INBOX --limit 150
360
- ```
361
-
362
- ### Ambient notifications
363
-
364
- Run as a background daemon — sends a system notification (macOS / Linux) whenever new mail arrives:
365
-
366
- ```bash
367
- proton-mail-bridge-client notify # foreground (Ctrl+C to stop)
368
- proton-mail-bridge-client notify & # background
369
- proton-mail-bridge-client notify --folder INBOX --timeout 60 # custom folder and idle timeout
370
- ```
371
-
372
- Each event is also written as a JSON line to stdout:
373
-
374
- ```json
375
- {"event":"new_mail","folder":"INBOX","count":2,"at":"2026-05-18T14:32:01.000Z"}
376
- ```
377
-
378
- Uses IMAP IDLE — no polling between events. Reconnects automatically on transient errors.
379
-
380
- ### MCP tool passthrough
381
-
382
- Any MCP tool is also callable directly from the CLI:
307
+ Every capability is also a scriptable terminal command — no Claude required:
383
308
 
384
309
  ```bash
385
- proton-mail-bridge-client tools
386
- proton-mail-bridge-client tool get_connection_status --json
387
- proton-mail-bridge-client tool search_indexed_emails --args '{"query":"invoice","limit":3}'
310
+ proton-mail-bridge-client digest # morning triage summary
311
+ proton-mail-bridge-client search --from stripe.com --json | jq . # scriptable search
312
+ echo "Deploy done" | proton-mail-bridge-client send --to you@x.com --subject "Deploy"
313
+ proton-mail-bridge-client notify & # background new-mail alerts
388
314
  ```
389
315
 
390
- ### Pipe and script
391
-
392
- ```bash
393
- # Morning digest to a file
394
- proton-mail-bridge-client digest --json > ~/morning-mail.json
316
+ All commands support `--json` for machine-readable output, and any MCP tool is directly callable via `proton-mail-bridge-client tool <name> --args '{...}'`.
395
317
 
396
- # Pull every email from a domain
397
- proton-mail-bridge-client search --from stripe.com --json | jq '.[].subject'
398
-
399
- # Pipe a script's output directly into an email
400
- echo "Deploy complete on $(hostname) at $(date)" \
401
- | proton-mail-bridge-client send --to alerts@example.com --subject "Deploy done"
402
-
403
- # Scheduled digest every weekday at 8am (cron)
404
- 0 8 * * 1-5 proton-mail-bridge-client digest >> ~/mail-log.txt
405
-
406
- # Count unread in INBOX
407
- proton-mail-bridge-client emails --folder INBOX --json | jq '[.[] | select(.isRead == false)] | length'
408
- ```
318
+ **Full command reference: [docs/cli.md](docs/cli.md)** (73 commands across read, triage, compose, mailbox actions, folders, drafts, analytics, and diagnostics).
409
319
 
410
320
  ---
411
321
 
@@ -500,7 +410,7 @@ PROTONMAIL_IDLE_MAX_SECONDS='30'
500
410
  `mark_email_read` · `star_email` · `move_email` · `archive_email` · `trash_email` · `restore_email` · `delete_email` · `batch_email_action` · `apply_thread_action` · `empty_folder` · `bulk_delete` · `bulk_move` · `bulk_update_flags` · `bulk_update_labels` · `update_message_flags` · `update_message_labels`
501
411
 
502
412
  ### Folder management
503
- `create_folder` · `rename_folder` · `delete_folder` · `create_label`
413
+ `create_folder` · `rename_folder` · `delete_folder` · `create_label` · `rename_label` · `delete_label`
504
414
 
505
415
  ### Analytics
506
416
  `get_email_stats` · `get_email_analytics` · `get_contacts` · `get_volume_trends` · `folder_stats` · `top_senders`
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "proton-mail-bridge-client",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Proton Mail Bridge Client — full-featured CLI and Claude Desktop MCP for Proton Mail via Proton Bridge. Read, search, send, draft, archive, manage folders, and more.",
5
+ "mcpName": "io.github.googlarz/proton-mail-bridge-client",
5
6
  "type": "module",
6
7
  "packageManager": "npm@10.9.3",
7
8
  "main": "dist/index.js",
@@ -34,7 +35,8 @@
34
35
  "clean": "rm -rf dist",
35
36
  "ci": "npm run lint && npm test",
36
37
  "pack:check": "npm pack --dry-run",
37
- "release:check": "npm run lint && npm test && npm run pack:check"
38
+ "release:check": "npm run lint && npm test && npm run pack:check",
39
+ "package:mcpb": "node scripts/build-mcpb.mjs"
38
40
  },
39
41
  "keywords": [
40
42
  "protonmail",