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.
- package/README.md +24 -5
- package/build/cli.js +12083 -138
- package/build/index.js +82686 -1687
- package/package.json +3 -4
- package/build/cli.d.ts +0 -24
- package/build/cli.d.ts.map +0 -1
- package/build/index.d.ts +0 -23
- package/build/index.d.ts.map +0 -1
- package/build/services/appleMailManager.d.ts +0 -680
- package/build/services/appleMailManager.d.ts.map +0 -1
- package/build/services/appleMailManager.js +0 -3143
- package/build/services/fileConfig.d.ts +0 -7
- package/build/services/fileConfig.d.ts.map +0 -1
- package/build/services/fileConfig.js +0 -52
- package/build/services/imapClient.d.ts +0 -312
- package/build/services/imapClient.d.ts.map +0 -1
- package/build/services/imapClient.js +0 -1023
- package/build/services/imapIdle.d.ts +0 -58
- package/build/services/imapIdle.d.ts.map +0 -1
- package/build/services/imapIdle.js +0 -151
- package/build/services/imapMultiAccount.d.ts +0 -124
- package/build/services/imapMultiAccount.d.ts.map +0 -1
- package/build/services/imapMultiAccount.js +0 -253
- package/build/services/messageRouter.d.ts +0 -24
- package/build/services/messageRouter.d.ts.map +0 -1
- package/build/services/messageRouter.js +0 -31
- package/build/services/replyForward.d.ts +0 -87
- package/build/services/replyForward.d.ts.map +0 -1
- package/build/services/replyForward.js +0 -150
- package/build/services/smtpMailer.d.ts +0 -160
- package/build/services/smtpMailer.d.ts.map +0 -1
- package/build/services/smtpMailer.js +0 -268
- package/build/services/templateStore.d.ts +0 -18
- package/build/services/templateStore.d.ts.map +0 -1
- package/build/services/templateStore.js +0 -91
- package/build/tools/doctor.d.ts +0 -23
- package/build/tools/doctor.d.ts.map +0 -1
- package/build/tools/doctor.js +0 -74
- package/build/tools/resourcesAndPrompts.d.ts +0 -14
- package/build/tools/resourcesAndPrompts.d.ts.map +0 -1
- package/build/tools/resourcesAndPrompts.js +0 -109
- package/build/tools/respond.d.ts +0 -48
- package/build/tools/respond.d.ts.map +0 -1
- package/build/tools/respond.js +0 -95
- package/build/tools/thread.d.ts +0 -19
- package/build/tools/thread.d.ts.map +0 -1
- package/build/tools/thread.js +0 -32
- package/build/types.d.ts +0 -434
- package/build/types.d.ts.map +0 -1
- package/build/types.js +0 -13
- package/build/utils/applescript.d.ts +0 -45
- package/build/utils/applescript.d.ts.map +0 -1
- package/build/utils/applescript.js +0 -446
- package/build/utils/attachmentMaterialize.d.ts +0 -9
- package/build/utils/attachmentMaterialize.d.ts.map +0 -1
- package/build/utils/attachmentMaterialize.js +0 -38
- package/build/utils/mimeParse.d.ts +0 -62
- package/build/utils/mimeParse.d.ts.map +0 -1
- package/build/utils/mimeParse.js +0 -317
- package/build/utils/orphan.d.ts +0 -25
- package/build/utils/orphan.d.ts.map +0 -1
- package/build/utils/orphan.js +0 -26
- package/build/utils/serialize.d.ts +0 -30
- package/build/utils/serialize.d.ts.map +0 -1
- 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.
|
|
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
|
-
-
|
|
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 #
|
|
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)
|