@agenticmail/mcp 0.9.7 → 0.9.9
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 +13 -0
- package/dist/index.js +27 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -405,6 +405,19 @@ Reply sent to john@example.com with subject "Re: Q2 Budget Review"
|
|
|
405
405
|
|
|
406
406
|
---
|
|
407
407
|
|
|
408
|
+
## External inbox exposure — surface this before walking the operator through relay setup
|
|
409
|
+
|
|
410
|
+
> **The MCP tools that configure the relay (`setup_operator_email`, plus any agent advising the operator to run `agenticmail setup-email` or `setup-relay`) open every sub-agent up to the public internet via Gmail / Outlook plus-addressing.** Operators don't always realize this — host agents should warn explicitly:
|
|
411
|
+
|
|
412
|
+
- **Plus-addresses are publicly guessable.** Once relay is configured, anyone can email `your-relay+secretary@gmail.com`, `your-relay+kepler@gmail.com`, … and the corresponding AgenticMail agent receives it. The `+sub` part is not a secret.
|
|
413
|
+
- **External mail wakes the host dispatcher identically to internal `@localhost` mail.** The MCP server doesn't filter by source; the API publishes an SSE `new-mail` event for any inbound, and the host integration spawns a worker turn.
|
|
414
|
+
- **The host bridges take a different path.** Mail to `your-relay+claudecode@gmail.com` / `your-relay+codex@gmail.com` routes to `handleBridgeMail`, which uses the host SDK's `resume` option to wake the operator's last session headlessly. If resume fails, it falls through to the bridge-escalation email at `setup_operator_email` — exactly why that MCP tool exists.
|
|
415
|
+
- **Spam = worker turns.** Throttles in order of escalation: the `wake-budget` guard in the dispatcher (automatic), the relay-level spam filter, and `metadata.host`-based fencing for agents that should stay internal-only.
|
|
416
|
+
|
|
417
|
+
When a host agent is about to call any of the relay-setup tools or instruct the operator to run `setup-email`, paraphrase this for the operator first so they can opt in deliberately rather than discovering it the day they get their first spam wake.
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
408
421
|
## License
|
|
409
422
|
|
|
410
423
|
[MIT](./LICENSE) - Ope Olatunji ([@ope-olatunji](https://github.com/ope-olatunji))
|
package/dist/index.js
CHANGED
|
@@ -22672,6 +22672,7 @@ var TOOL_SETS = {
|
|
|
22672
22672
|
/** Mail-server setup / onboarding wizards. */
|
|
22673
22673
|
setup: [
|
|
22674
22674
|
"setup_guide",
|
|
22675
|
+
"setup_operator_email",
|
|
22675
22676
|
"setup_email_relay",
|
|
22676
22677
|
"setup_email_domain",
|
|
22677
22678
|
"setup_gmail_alias",
|
|
@@ -22932,7 +22933,7 @@ var toolDefinitions = [
|
|
|
22932
22933
|
},
|
|
22933
22934
|
{
|
|
22934
22935
|
name: "reply_email",
|
|
22935
|
-
description:
|
|
22936
|
+
description: 'Reply to an email. Fetches the original message, auto-fills To, Subject (Re:), In-Reply-To, and References, then sends with quoted body. **For multi-agent thread coordination, pass `replyAll: true`** \u2014 the original sender lands on To:, every other thread participant lands on Cc:. **Wake routing is body-aware**: if your reply addresses a specific CC\'d agent ("Marlow \u2014", "@kepler", "handing off to rivet", etc.), the dispatcher wakes them automatically. If your body has no such addressing, the original sender (on To:) wakes by default. **Pass `wake` to override** explicitly (e.g. `wake: ["marlow"]` to force-target one agent, or `wake: []` to deliver silently). Outbound guard applies \u2014 HIGH severity content is held for review.',
|
|
22936
22937
|
inputSchema: {
|
|
22937
22938
|
type: "object",
|
|
22938
22939
|
properties: {
|
|
@@ -23137,6 +23138,17 @@ var toolDefinitions = [
|
|
|
23137
23138
|
required: ["name"]
|
|
23138
23139
|
}
|
|
23139
23140
|
},
|
|
23141
|
+
{
|
|
23142
|
+
name: "setup_operator_email",
|
|
23143
|
+
description: 'Save the operator\'s notification email address for bridge-escalation alerts. When sub-agents mail a host bridge (e.g. `wake: ["codex"]`) AND no fresh host session is available for a headless resume, the dispatcher forwards a digest to this address so the operator gets a phone push (via Gmail / Apple Mail / whichever app handles their address). Master-key scoped. The host agent should call this during bootstrap after asking the operator: "what email should we alert you at when sub-agents need your attention?" \u2014 the answer is typically the operator\'s personal Gmail with mobile push enabled. Idempotent: re-running with a new address updates the config.',
|
|
23144
|
+
inputSchema: {
|
|
23145
|
+
type: "object",
|
|
23146
|
+
properties: {
|
|
23147
|
+
email: { type: "string", description: "Operator notification email (e.g. ope@gmail.com). Pass `null` or an empty string to clear an existing setting." }
|
|
23148
|
+
},
|
|
23149
|
+
required: ["email"]
|
|
23150
|
+
}
|
|
23151
|
+
},
|
|
23140
23152
|
{
|
|
23141
23153
|
name: "setup_email_relay",
|
|
23142
23154
|
description: "Configure Gmail/Outlook relay for sending real internet email (requires master API key). BEGINNER-FRIENDLY: Just needs a Gmail/Outlook email + app password. Agents send as user+agentname@gmail.com. Automatically creates a default agent (secretary) unless skipped. Best for: quick setup, personal use, no domain needed.",
|
|
@@ -24275,6 +24287,20 @@ ${r.messages.map((m) => ` UID ${m.uid} (${m.folder})`).join("\n")}`;
|
|
|
24275
24287
|
hostTag ? ` Host: ${hostTag} (this account is owned by the ${hostTag} dispatcher)` : ""
|
|
24276
24288
|
].filter(Boolean).join("\n");
|
|
24277
24289
|
}
|
|
24290
|
+
case "setup_operator_email": {
|
|
24291
|
+
const raw = args2.email;
|
|
24292
|
+
const email2 = typeof raw === "string" ? raw.trim() : "";
|
|
24293
|
+
const body = email2 ? { email: email2 } : { email: null };
|
|
24294
|
+
const result = await apiRequest("PATCH", "/system/operator-email", body, true);
|
|
24295
|
+
if (!email2) {
|
|
24296
|
+
return "Operator escalation email cleared. Bridge alerts will still be recorded as system events but no email forward will be sent.";
|
|
24297
|
+
}
|
|
24298
|
+
return [
|
|
24299
|
+
`\u2713 Operator escalation email set to ${result?.email ?? email2}.`,
|
|
24300
|
+
`When sub-agents mail a bridge inbox and no fresh host session is available for a headless resume, the dispatcher will email this address with a digest so you get a phone push.`,
|
|
24301
|
+
`Re-run setup_operator_email with a new address any time to update.`
|
|
24302
|
+
].join("\n");
|
|
24303
|
+
}
|
|
24278
24304
|
case "setup_email_relay": {
|
|
24279
24305
|
const result = await apiRequest("POST", "/gateway/relay", {
|
|
24280
24306
|
provider: args2.provider,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/mcp",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
4
4
|
"mcpName": "io.github.agenticmail/mcp",
|
|
5
5
|
"description": "MCP server for AgenticMail — give any AI client real email and SMS capabilities",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
32
32
|
"zod": "^3.24.0",
|
|
33
|
-
"@agenticmail/core": "^0.9.
|
|
33
|
+
"@agenticmail/core": "^0.9.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.4.0",
|