@n24q02m/better-email-mcp 1.34.0 → 1.34.1-beta.1
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 +45 -0
- package/bin/cli.mjs +77 -38
- package/build/src/credential-form.d.ts.map +1 -1
- package/build/src/credential-form.js +44 -5
- package/build/src/credential-form.js.map +1 -1
- package/build/src/tools/helpers/errors.d.ts.map +1 -1
- package/build/src/tools/helpers/errors.js +15 -8
- package/build/src/tools/helpers/errors.js.map +1 -1
- package/build/src/tools/helpers/imap-client.d.ts.map +1 -1
- package/build/src/tools/helpers/imap-client.js +20 -15
- package/build/src/tools/helpers/imap-client.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -55,6 +55,7 @@ mcp-name: io.github.n24q02m/better-email-mcp
|
|
|
55
55
|
- [Configuration](#configuration)
|
|
56
56
|
- [Security](#security)
|
|
57
57
|
- [Build from Source](#build-from-source)
|
|
58
|
+
- [Deploy to Cloudflare](#deploy-to-cloudflare)
|
|
58
59
|
- [Trust Model](#trust-model)
|
|
59
60
|
- [License](#license)
|
|
60
61
|
|
|
@@ -281,6 +282,50 @@ bun install
|
|
|
281
282
|
bun run dev
|
|
282
283
|
```
|
|
283
284
|
|
|
285
|
+
## Deploy to Cloudflare
|
|
286
|
+
|
|
287
|
+
[](https://deploy.workers.cloudflare.com/?url=https://github.com/n24q02m/better-email-mcp)
|
|
288
|
+
|
|
289
|
+
Run your own multi-user better-email instance serverless on Cloudflare (Containers + KV).
|
|
290
|
+
Each JWT `sub` gets its own Container Durable Object, and every user's email credentials and
|
|
291
|
+
Outlook OAuth tokens are AES-256-GCM encrypted into a single Workers KV blob per user, so they
|
|
292
|
+
survive scale-to-zero / container recreate with no re-auth.
|
|
293
|
+
|
|
294
|
+
**Prerequisites:** a Cloudflare account on the **Workers Paid plan** — required for Containers (the Cloudflare free tier does not include Containers) — and the `wrangler` CLI.
|
|
295
|
+
|
|
296
|
+
1. `git clone https://github.com/n24q02m/better-email-mcp && cd better-email-mcp`
|
|
297
|
+
2. `wrangler login`
|
|
298
|
+
3. Create the KV namespace (better-email is KV-only -- no D1 / Vectorize):
|
|
299
|
+
```
|
|
300
|
+
wrangler kv namespace create better-email-kv
|
|
301
|
+
```
|
|
302
|
+
Paste the returned id into `<better-email-kv-namespace-id>` in `wrangler.jsonc`.
|
|
303
|
+
4. Push the container image to your Cloudflare managed registry (CF Containers cannot pull
|
|
304
|
+
from external registries directly), then set `<YOUR_ACCOUNT_ID>` in `wrangler.jsonc`:
|
|
305
|
+
```
|
|
306
|
+
docker pull ghcr.io/n24q02m/better-email-mcp:beta
|
|
307
|
+
docker tag ghcr.io/n24q02m/better-email-mcp:beta better-email-mcp:beta
|
|
308
|
+
wrangler containers push better-email-mcp:beta # prints registry.cloudflare.com/<ACCOUNT_ID>/better-email-mcp:beta
|
|
309
|
+
```
|
|
310
|
+
5. Point `wrangler.jsonc` at your own domain: set `<YOUR_PUBLIC_URL>` (e.g.
|
|
311
|
+
`https://email.example.com`) and `<YOUR_WORKER_DOMAIN>` (e.g. `email.example.com`).
|
|
312
|
+
6. Set the deploy secrets:
|
|
313
|
+
```
|
|
314
|
+
wrangler secret put CREDENTIAL_SECRET # per-sub vault key + deterministic EdDSA signing (required)
|
|
315
|
+
wrangler secret put MCP_RELAY_PASSWORD # gate for the /authorize setup form
|
|
316
|
+
wrangler secret put MCP_DCR_SERVER_SECRET # proof of an intentional multi-user deploy
|
|
317
|
+
```
|
|
318
|
+
Optional Outlook overrides -- only to replace the bundled public Azure device-code client
|
|
319
|
+
(default needs no user-side Azure app): `wrangler secret put OUTLOOK_CLIENT_ID` and
|
|
320
|
+
`wrangler secret put OUTLOOK_EMAIL`.
|
|
321
|
+
7. `wrangler deploy`, then open `<YOUR_PUBLIC_URL>/authorize` and complete the browser relay form.
|
|
322
|
+
|
|
323
|
+
End-users supply their own email credentials -- an App Password via the paste form, or the
|
|
324
|
+
bundled Outlook device-code sign-in -- through that relay form; there is no server-side
|
|
325
|
+
`EMAIL_CREDENTIALS`. Storage maps to Cloudflare via `MCP_STORAGE_BACKEND=cf-kv` (already set in
|
|
326
|
+
`wrangler.jsonc`); see [Cloudflare serverless mode (KV-only)](#cloudflare-serverless-mode-kv-only)
|
|
327
|
+
for the encryption and trust details.
|
|
328
|
+
|
|
284
329
|
## Trust Model
|
|
285
330
|
|
|
286
331
|
This plugin implements **TC-NearZK** (in-memory, ephemeral). See the [mcp-core trust model](https://mcp.n24q02m.com/servers/mcp-core/trust-model/) for full classification.
|