@agenticmail/mcp 0.3.0 → 0.5.0

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 (3) hide show
  1. package/README.md +14 -1
  2. package/dist/index.js +150 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The MCP (Model Context Protocol) server for [AgenticMail](https://github.com/agenticmail/agenticmail) — gives any MCP-compatible AI client full email capabilities.
4
4
 
5
- When connected, your AI agent can send emails, check inboxes, reply to messages, manage contacts, schedule emails, assign tasks to other agents, and more — all through natural language. The server provides 54 tools that cover every email and agent management operation.
5
+ When connected, your AI agent can send emails, check inboxes, reply to messages, manage contacts, schedule emails, assign tasks to other agents, and more — all through natural language. The server provides 62 tools that cover every email and agent management operation.
6
6
 
7
7
  ## Install
8
8
 
@@ -182,6 +182,19 @@ These tools require the master key:
182
182
  | `send_test_email` | Send a test email to verify gateway |
183
183
  | `purchase_domain` | Search for and purchase a domain |
184
184
 
185
+ ### SMS / Phone Number (8 tools)
186
+
187
+ | Tool | Description |
188
+ |------|-------------|
189
+ | `sms_setup` | Configure Google Voice phone number for SMS access |
190
+ | `sms_send` | Record and send SMS via Google Voice |
191
+ | `sms_messages` | List inbound/outbound SMS messages |
192
+ | `sms_check_code` | Extract verification/OTP codes from recent SMS |
193
+ | `sms_read_voice` | Read SMS directly from Google Voice web (fastest method) |
194
+ | `sms_record` | Record an SMS read from Google Voice web or any source |
195
+ | `sms_parse_email` | Parse SMS from forwarded Google Voice email (fallback) |
196
+ | `sms_config` | Get current SMS configuration |
197
+
185
198
  ---
186
199
 
187
200
  ## Outbound Security Scanning
package/dist/index.js CHANGED
@@ -887,6 +887,93 @@ var toolDefinitions = [
887
887
  },
888
888
  required: ["action"]
889
889
  }
890
+ },
891
+ // --- SMS / Google Voice Tools ---
892
+ {
893
+ name: "sms_setup",
894
+ description: "Configure SMS/phone number access via Google Voice. The user must have a Google Voice account with SMS-to-email forwarding enabled. This gives the agent a phone number for receiving verification codes and sending texts.",
895
+ inputSchema: {
896
+ type: "object",
897
+ properties: {
898
+ phoneNumber: { type: "string", description: "Google Voice phone number (e.g. +12125551234)" },
899
+ forwardingEmail: { type: "string", description: "Email address Google Voice forwards SMS to (defaults to agent email)" }
900
+ },
901
+ required: ["phoneNumber"]
902
+ }
903
+ },
904
+ {
905
+ name: "sms_send",
906
+ description: "Send an SMS text message via Google Voice. Records the message and provides instructions for sending via Google Voice web interface. The agent can automate the actual send using browser automation on voice.google.com.",
907
+ inputSchema: {
908
+ type: "object",
909
+ properties: {
910
+ to: { type: "string", description: "Recipient phone number" },
911
+ body: { type: "string", description: "Text message body" }
912
+ },
913
+ required: ["to", "body"]
914
+ }
915
+ },
916
+ {
917
+ name: "sms_messages",
918
+ description: "List SMS messages (inbound and outbound). Use direction filter to see only received or sent messages.",
919
+ inputSchema: {
920
+ type: "object",
921
+ properties: {
922
+ direction: { type: "string", enum: ["inbound", "outbound"], description: "Filter by direction" },
923
+ limit: { type: "number", description: "Max messages (default: 20)" },
924
+ offset: { type: "number", description: "Skip messages (default: 0)" }
925
+ }
926
+ }
927
+ },
928
+ {
929
+ name: "sms_check_code",
930
+ description: "Check for recent verification/OTP codes received via SMS. Scans inbound SMS for common code patterns (6-digit, 4-digit, alphanumeric). Use this after requesting a verification code during sign-up flows.",
931
+ inputSchema: {
932
+ type: "object",
933
+ properties: {
934
+ minutes: { type: "number", description: "How many minutes back to check (default: 10)" }
935
+ }
936
+ }
937
+ },
938
+ {
939
+ name: "sms_parse_email",
940
+ description: "Parse an SMS from a forwarded Google Voice email. Use this when you receive an email from Google Voice containing an SMS. Extracts the sender number, message body, and any verification codes.",
941
+ inputSchema: {
942
+ type: "object",
943
+ properties: {
944
+ emailBody: { type: "string", description: "The email body text to parse" },
945
+ emailFrom: { type: "string", description: "The email sender address" }
946
+ },
947
+ required: ["emailBody"]
948
+ }
949
+ },
950
+ {
951
+ name: "sms_config",
952
+ description: "Get the current SMS/phone number configuration for this agent. Shows whether SMS is enabled, the phone number, and forwarding email.",
953
+ inputSchema: {
954
+ type: "object",
955
+ properties: {}
956
+ }
957
+ },
958
+ {
959
+ name: "sms_read_voice",
960
+ description: "Get instructions and URL for reading SMS directly from Google Voice web (FASTEST method). Returns the voice.google.com URL and guidance for browser-based SMS reading. Primary method - much faster than email forwarding.",
961
+ inputSchema: {
962
+ type: "object",
963
+ properties: {}
964
+ }
965
+ },
966
+ {
967
+ name: "sms_record",
968
+ description: "Record an SMS message read from Google Voice web or any other source. Saves to SMS database and extracts verification codes. Use after reading a message from voice.google.com.",
969
+ inputSchema: {
970
+ type: "object",
971
+ properties: {
972
+ from: { type: "string", description: "Sender phone number" },
973
+ body: { type: "string", description: "SMS message text" }
974
+ },
975
+ required: ["from", "body"]
976
+ }
890
977
  }
891
978
  ];
892
979
  var MASTER_KEY_TOOLS = /* @__PURE__ */ new Set([
@@ -1983,6 +2070,69 @@ ${result.summary}`);
1983
2070
  }
1984
2071
  throw new Error("Invalid action. Use: list or get");
1985
2072
  }
2073
+ // --- SMS / Google Voice Tools ---
2074
+ case "sms_setup": {
2075
+ const result = await apiRequest("POST", "/sms/setup", {
2076
+ phoneNumber: args.phoneNumber,
2077
+ forwardingEmail: args.forwardingEmail,
2078
+ provider: "google_voice"
2079
+ });
2080
+ return JSON.stringify(result, null, 2);
2081
+ }
2082
+ case "sms_send": {
2083
+ const result = await apiRequest("POST", "/sms/send", {
2084
+ to: args.to,
2085
+ body: args.body
2086
+ });
2087
+ return JSON.stringify(result, null, 2);
2088
+ }
2089
+ case "sms_messages": {
2090
+ const query = new URLSearchParams();
2091
+ if (args.direction) query.set("direction", String(args.direction));
2092
+ if (args.limit) query.set("limit", String(args.limit));
2093
+ if (args.offset) query.set("offset", String(args.offset));
2094
+ const result = await apiRequest("GET", `/sms/messages?${query.toString()}`);
2095
+ return JSON.stringify(result, null, 2);
2096
+ }
2097
+ case "sms_check_code": {
2098
+ const query = args.minutes ? `?minutes=${args.minutes}` : "";
2099
+ const result = await apiRequest("GET", `/sms/verification-code${query}`);
2100
+ return JSON.stringify(result, null, 2);
2101
+ }
2102
+ case "sms_parse_email": {
2103
+ const result = await apiRequest("POST", "/sms/parse-email", {
2104
+ emailBody: args.emailBody,
2105
+ emailFrom: args.emailFrom
2106
+ });
2107
+ return JSON.stringify(result, null, 2);
2108
+ }
2109
+ case "sms_config": {
2110
+ const result = await apiRequest("GET", "/sms/config");
2111
+ return JSON.stringify(result, null, 2);
2112
+ }
2113
+ case "sms_read_voice": {
2114
+ const configResult = await apiRequest("GET", "/sms/config");
2115
+ const phone = configResult?.sms?.phoneNumber || "unknown";
2116
+ return JSON.stringify({
2117
+ method: "google_voice_web",
2118
+ phoneNumber: phone,
2119
+ browserUrl: "https://voice.google.com/u/0/messages",
2120
+ instructions: [
2121
+ "Open the browser to: https://voice.google.com/u/0/messages",
2122
+ "Take a screenshot to see the message list",
2123
+ "Recent SMS messages appear in the sidebar with sender and preview",
2124
+ "After reading, use sms_record to save the SMS to the database"
2125
+ ],
2126
+ tip: "This is much faster than email forwarding. Messages appear instantly."
2127
+ }, null, 2);
2128
+ }
2129
+ case "sms_record": {
2130
+ const result = await apiRequest("POST", "/sms/record", {
2131
+ from: args.from,
2132
+ body: args.body
2133
+ });
2134
+ return JSON.stringify(result, null, 2);
2135
+ }
1986
2136
  default:
1987
2137
  throw new Error(`Unknown tool: ${name}`);
1988
2138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/mcp",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "MCP server for AgenticMail — use email from any MCP-compatible AI client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "scripts": {
24
24
  "build": "tsup src/index.ts --format esm --dts --clean",
25
25
  "dev": "tsx src/index.ts",
26
- "test": "vitest run",
26
+ "test": "vitest run --passWithNoTests",
27
27
  "prepublishOnly": "npm run build"
28
28
  },
29
29
  "dependencies": {