@agenticmail/mcp 0.9.2 → 0.9.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/dist/index.js +11 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -24024,7 +24024,7 @@ ${lines.join("\n")}`;
|
|
|
24024
24024
|
if (action === "untag_message") {
|
|
24025
24025
|
if (!args2.id || !args2.uid) throw new Error("id and uid are required");
|
|
24026
24026
|
const folder = args2.folder || "INBOX";
|
|
24027
|
-
await apiRequest("DELETE", `/tags/${args2.id}/messages/${args2.uid}?folder=${encodeURIComponent(folder)}`);
|
|
24027
|
+
await apiRequest("DELETE", `/tags/${args2.id}/messages/${args2.uid}?folder=${encodeURIComponent(String(folder))}`);
|
|
24028
24028
|
return `Removed tag from message UID ${args2.uid} in ${folder}`;
|
|
24029
24029
|
}
|
|
24030
24030
|
if (action === "get_messages") {
|
|
@@ -24043,10 +24043,14 @@ ${r.messages.map((m) => ` UID ${m.uid} (${m.folder})`).join("\n")}`;
|
|
|
24043
24043
|
throw new Error("Invalid action");
|
|
24044
24044
|
}
|
|
24045
24045
|
case "create_account": {
|
|
24046
|
+
const hostTag = process.env.AGENTICMAIL_MCP_HOST?.trim();
|
|
24047
|
+
const userMetadata = args2.metadata && typeof args2.metadata === "object" && !Array.isArray(args2.metadata) ? args2.metadata : void 0;
|
|
24048
|
+
const metadata = hostTag ? { ...userMetadata ?? {}, host: hostTag } : userMetadata;
|
|
24046
24049
|
const result = await apiRequest("POST", "/accounts", {
|
|
24047
24050
|
name: args2.name,
|
|
24048
24051
|
domain: args2.domain,
|
|
24049
|
-
role: args2.role
|
|
24052
|
+
role: args2.role,
|
|
24053
|
+
...metadata ? { metadata } : {}
|
|
24050
24054
|
}, useMaster);
|
|
24051
24055
|
if (!result) throw new Error("No response from account creation");
|
|
24052
24056
|
return [
|
|
@@ -24055,8 +24059,9 @@ ${r.messages.map((m) => ` UID ${m.uid} (${m.folder})`).join("\n")}`;
|
|
|
24055
24059
|
` Email: ${result.email}`,
|
|
24056
24060
|
` Role: ${result.role}`,
|
|
24057
24061
|
` API Key: ${result.apiKey}`,
|
|
24058
|
-
` ID: ${result.id}
|
|
24059
|
-
|
|
24062
|
+
` ID: ${result.id}`,
|
|
24063
|
+
hostTag ? ` Host: ${hostTag} (this account is owned by the ${hostTag} dispatcher)` : ""
|
|
24064
|
+
].filter(Boolean).join("\n");
|
|
24060
24065
|
}
|
|
24061
24066
|
case "setup_email_relay": {
|
|
24062
24067
|
const result = await apiRequest("POST", "/gateway/relay", {
|
|
@@ -24704,7 +24709,7 @@ ${r.tail.join("\n")}`;
|
|
|
24704
24709
|
case "check_tasks": {
|
|
24705
24710
|
let endpoint = args2.direction === "outgoing" ? "/tasks/assigned" : "/tasks/pending";
|
|
24706
24711
|
if (args2.direction !== "outgoing" && args2.assignee) {
|
|
24707
|
-
endpoint += `?assignee=${encodeURIComponent(args2.assignee)}`;
|
|
24712
|
+
endpoint += `?assignee=${encodeURIComponent(String(args2.assignee))}`;
|
|
24708
24713
|
}
|
|
24709
24714
|
const r = await apiRequest("GET", endpoint);
|
|
24710
24715
|
if (!r?.tasks?.length) return args2.direction === "outgoing" ? "No tasks assigned by you." : "No pending tasks.";
|
|
@@ -24775,7 +24780,7 @@ ${lines.join("\n")}`;
|
|
|
24775
24780
|
const uid = Number(args2.uid);
|
|
24776
24781
|
if (!uid || uid < 1) throw new Error("uid is required");
|
|
24777
24782
|
const folder = args2.folder || "INBOX";
|
|
24778
|
-
const result = await apiRequest("GET", `/mail/messages/${uid}/spam-score?folder=${encodeURIComponent(folder)}`);
|
|
24783
|
+
const result = await apiRequest("GET", `/mail/messages/${uid}/spam-score?folder=${encodeURIComponent(String(folder))}`);
|
|
24779
24784
|
const lines = [
|
|
24780
24785
|
`Spam Score: ${result.score}/100 (${result.isSpam ? "SPAM" : result.isWarning ? "WARNING" : "CLEAN"})`,
|
|
24781
24786
|
result.topCategory ? `Top Category: ${result.topCategory}` : null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/mcp",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
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.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.4.0",
|