apple-mail-mcp 2.8.2 → 2.8.4

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 (65) hide show
  1. package/README.md +24 -5
  2. package/build/cli.js +12083 -138
  3. package/build/index.js +82686 -1687
  4. package/package.json +3 -4
  5. package/build/cli.d.ts +0 -24
  6. package/build/cli.d.ts.map +0 -1
  7. package/build/index.d.ts +0 -23
  8. package/build/index.d.ts.map +0 -1
  9. package/build/services/appleMailManager.d.ts +0 -680
  10. package/build/services/appleMailManager.d.ts.map +0 -1
  11. package/build/services/appleMailManager.js +0 -3143
  12. package/build/services/fileConfig.d.ts +0 -7
  13. package/build/services/fileConfig.d.ts.map +0 -1
  14. package/build/services/fileConfig.js +0 -52
  15. package/build/services/imapClient.d.ts +0 -312
  16. package/build/services/imapClient.d.ts.map +0 -1
  17. package/build/services/imapClient.js +0 -1023
  18. package/build/services/imapIdle.d.ts +0 -58
  19. package/build/services/imapIdle.d.ts.map +0 -1
  20. package/build/services/imapIdle.js +0 -151
  21. package/build/services/imapMultiAccount.d.ts +0 -124
  22. package/build/services/imapMultiAccount.d.ts.map +0 -1
  23. package/build/services/imapMultiAccount.js +0 -253
  24. package/build/services/messageRouter.d.ts +0 -24
  25. package/build/services/messageRouter.d.ts.map +0 -1
  26. package/build/services/messageRouter.js +0 -31
  27. package/build/services/replyForward.d.ts +0 -87
  28. package/build/services/replyForward.d.ts.map +0 -1
  29. package/build/services/replyForward.js +0 -150
  30. package/build/services/smtpMailer.d.ts +0 -160
  31. package/build/services/smtpMailer.d.ts.map +0 -1
  32. package/build/services/smtpMailer.js +0 -268
  33. package/build/services/templateStore.d.ts +0 -18
  34. package/build/services/templateStore.d.ts.map +0 -1
  35. package/build/services/templateStore.js +0 -91
  36. package/build/tools/doctor.d.ts +0 -23
  37. package/build/tools/doctor.d.ts.map +0 -1
  38. package/build/tools/doctor.js +0 -74
  39. package/build/tools/resourcesAndPrompts.d.ts +0 -14
  40. package/build/tools/resourcesAndPrompts.d.ts.map +0 -1
  41. package/build/tools/resourcesAndPrompts.js +0 -109
  42. package/build/tools/respond.d.ts +0 -48
  43. package/build/tools/respond.d.ts.map +0 -1
  44. package/build/tools/respond.js +0 -95
  45. package/build/tools/thread.d.ts +0 -19
  46. package/build/tools/thread.d.ts.map +0 -1
  47. package/build/tools/thread.js +0 -32
  48. package/build/types.d.ts +0 -434
  49. package/build/types.d.ts.map +0 -1
  50. package/build/types.js +0 -13
  51. package/build/utils/applescript.d.ts +0 -45
  52. package/build/utils/applescript.d.ts.map +0 -1
  53. package/build/utils/applescript.js +0 -446
  54. package/build/utils/attachmentMaterialize.d.ts +0 -9
  55. package/build/utils/attachmentMaterialize.d.ts.map +0 -1
  56. package/build/utils/attachmentMaterialize.js +0 -38
  57. package/build/utils/mimeParse.d.ts +0 -62
  58. package/build/utils/mimeParse.d.ts.map +0 -1
  59. package/build/utils/mimeParse.js +0 -317
  60. package/build/utils/orphan.d.ts +0 -25
  61. package/build/utils/orphan.d.ts.map +0 -1
  62. package/build/utils/orphan.js +0 -26
  63. package/build/utils/serialize.d.ts +0 -30
  64. package/build/utils/serialize.d.ts.map +0 -1
  65. package/build/utils/serialize.js +0 -41
package/README.md CHANGED
@@ -98,6 +98,25 @@ npm install -g github:sweetrb/apple-mail-mcp
98
98
 
99
99
  On first use, macOS will ask for permission to automate Mail.app. Click "OK" to allow.
100
100
 
101
+ ## Configuring email (IMAP & SMTP)
102
+
103
+ The server works out of the box over AppleScript with **no configuration**. Two
104
+ **opt-in** power features take a one-time setup:
105
+
106
+ - **Fast IMAP reads** — server-side search, counts, and large-mailbox handling
107
+ that AppleScript is too slow for (it times out on big Gmail mailboxes).
108
+ - **Clean SMTP sending** — `send-email` submits clean MIME directly, avoiding the
109
+ macOS 15+ Mail.app `<blockquote>` wrapping that otherwise makes sent mail look
110
+ quoted/indented like a reply.
111
+
112
+ Both are driven by non-secret `APPLE_MAIL_MCP_*` settings — supplied via an `env`
113
+ block **or** a `config.json` file (for hosts like Claude Desktop that strip `env`)
114
+ — with passwords kept in the macOS **Keychain**, never in config.
115
+
116
+ 👉 **[IMAP / SMTP Setup Guide](docs/IMAP-SETUP.md)** — step-by-step: app passwords,
117
+ Keychain, both config methods, multi-account, SMTP, verification with the `doctor`
118
+ tool, and troubleshooting. Verify any time by running the **`doctor`** tool.
119
+
101
120
  ## Requirements
102
121
 
103
122
  - **macOS** - Apple Mail and AppleScript are macOS-only
@@ -1122,10 +1141,10 @@ npm install -g github:sweetrb/apple-mail-mcp
1122
1141
  ```bash
1123
1142
  git clone https://github.com/sweetrb/apple-mail-mcp.git
1124
1143
  cd apple-mail-mcp
1125
- npm install
1126
- npm run build
1127
1144
  ```
1128
1145
 
1146
+ The repo ships prebuilt, dependency-free `build/index.js` and `build/cli.js` bundles, so a bare clone runs with nothing but Node installed. `npm install` and `npm run build` are only needed when you change the source.
1147
+
1129
1148
  If installed from source, use this configuration:
1130
1149
  ```json
1131
1150
  {
@@ -1140,7 +1159,7 @@ If installed from source, use this configuration:
1140
1159
 
1141
1160
  #### Running from a clone in Claude Code (project-scope `.mcp.json`)
1142
1161
 
1143
- This repo ships a `.mcp.json` at its root so that, when you run `claude` from inside a clone, the server is registered automatically as a **project-scope** server — no manual config needed. After `npm run build`, just launch Claude Code from the repo directory and approve the server when prompted.
1162
+ This repo ships a `.mcp.json` at its root so that, when you run `claude` from inside a clone, the server is registered automatically as a **project-scope** server — no manual config needed. Just launch Claude Code from the repo directory and approve the server when prompted (the bundled `build/index.js` is committed, so no build step is required).
1144
1163
 
1145
1164
  The entrypoint is written as:
1146
1165
 
@@ -1265,7 +1284,7 @@ The `\\\\` in JSON becomes `\\` in the actual string, which represents a single
1265
1284
 
1266
1285
  ### `apple-mail` server fails to connect when run from a clone
1267
1286
  - The root `.mcp.json` resolves its entrypoint via `${CLAUDE_PROJECT_DIR:-.}/build/index.js`. **Launch `claude` from inside the repo directory** — `CLAUDE_PROJECT_DIR` only resolves to the repo root in that case; the bare `.` fallback uses the launching shell's working directory and will point at the wrong place otherwise.
1268
- - Run `npm run build` first — the server is `build/index.js`, which doesn't exist until you build.
1287
+ - If you've been editing the source, rerun `npm run build` — the server is `build/index.js`, and the committed bundle only reflects your changes after a rebuild.
1269
1288
  - Run `claude mcp list` to check status. If you see a *conflicting scopes* warning for `apple-mail`, you have it registered at more than one scope; project-scope wins. See [Running from a clone](#running-from-a-clone-in-claude-code-project-scope-mcpjson) for how scope precedence resolves.
1270
1289
  - If `claude mcp get apple-mail` shows **⏸ Pending approval**, approve the project-scope server (Claude Code prompts on startup, or run it again after approving).
1271
1290
 
@@ -1275,7 +1294,7 @@ The `\\\\` in JSON becomes `\\` in the actual string, which represents a single
1275
1294
 
1276
1295
  ```bash
1277
1296
  npm install # Install dependencies
1278
- npm run build # Compile TypeScript
1297
+ npm run build # Typecheck, then bundle src/index.ts + src/cli.ts into build/ (esbuild)
1279
1298
  npm test # Run unit tests
1280
1299
  npm run test:integration # Run integration tests (requires Mail.app)
1281
1300
  npm run test:all # Run all tests (unit + integration)