@codespar/mcp-whatsapp-cloud 0.2.0 → 0.2.2

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 CHANGED
@@ -14,21 +14,32 @@ MCP server for the [WhatsApp Cloud API](https://developers.facebook.com/docs/wha
14
14
  | take-blip | Brazilian BSP wrapper | Enterprise Brazil, CCaaS features |
15
15
  | zenvia | Brazilian BSP wrapper | Brazil omnichannel (SMS + WhatsApp) |
16
16
 
17
- ## Tools
17
+ ## Tools (22)
18
18
 
19
19
  | Tool | Purpose |
20
- |------|---------|
21
- | `send_text_message` | Send a plain text message |
22
- | `send_template_message` | Send an approved template (required for business-initiated > 24h) |
23
- | `send_media_message` | Send image, video, document, or audio (link or media_id) |
24
- | `send_interactive_message` | Send reply buttons or list |
25
- | `send_location_message` | Send a latitude/longitude pin |
26
- | `mark_message_as_read` | Mark an inbound message as read |
27
- | `upload_media` | Upload a file and get a reusable media_id (multipart) |
28
- | `retrieve_media_url` | Resolve a media_id to a downloadable URL |
29
- | `delete_media` | Delete an uploaded media asset |
30
- | `list_templates` | List templates on the WABA |
31
- | `create_template` | Submit a new template for Meta review |
20
+ |---|---|
21
+ | `send_text_message` | Send a plain text message. |
22
+ | `send_template_message` | Send an approved message template. |
23
+ | `send_media_message` | Send an image, video, document, or audio. |
24
+ | `send_interactive_message` | Send an interactive message (reply buttons or list). |
25
+ | `send_interactive_cta_url` | Send an interactive message with a single CTA URL button. |
26
+ | `send_interactive_flow` | Send a WhatsApp Flow message. |
27
+ | `send_location_message` | Send a location pin with latitude/longitude and optional name/address. |
28
+ | `send_contacts_message` | Send one or more contact cards (vCard-like). |
29
+ | `send_reaction_message` | Send an emoji reaction on a previously received/sent message. |
30
+ | `send_typing_indicator` | Show a typing indicator on a received message. |
31
+ | `mark_message_as_read` | Mark an incoming message as read so the sender sees the blue double-check. |
32
+ | `upload_media` | Upload a media file and get back a media_id reusable in send_media_message. |
33
+ | `retrieve_media_url` | Resolve a media_id to a short-lived downloadable URL. |
34
+ | `delete_media` | Delete an uploaded media asset by id. |
35
+ | `list_templates` | List message templates on the WhatsApp Business Account. |
36
+ | `create_template` | Submit a new template for Meta review. |
37
+ | `delete_template` | Delete a message template from the WABA by name. |
38
+ | `get_business_profile` | Read the WhatsApp business profile (about, description, email, websites, vertical, address) for the configu... |
39
+ | `update_business_profile` | Update the business profile on the configured phone number. |
40
+ | `list_phone_numbers` | List all phone numbers registered under the WhatsApp Business Account, including display name, quality rati... |
41
+ | `request_verification_code` | Request Meta to send a verification code to the configured phone number via SMS or voice. |
42
+ | `verify_code` | Submit the verification code received via SMS/voice after request_verification_code. |
32
43
 
33
44
  ## Install
34
45
 
@@ -98,6 +109,10 @@ npx @codespar/mcp-whatsapp-cloud
98
109
  MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-whatsapp-cloud
99
110
  ```
100
111
 
112
+ ## Enterprise
113
+
114
+ Need governance, budget limits, and audit trails for agent payments? [CodeSpar Enterprise](https://codespar.dev/enterprise) adds policy engine, payment routing, and compliance templates on top of these MCP servers.
115
+
101
116
  ## License
102
117
 
103
118
  MIT
package/dist/index.js CHANGED
@@ -97,7 +97,10 @@ async function whatsappRequest(method, path, body, opts = {}) {
97
97
  const text = await res.text();
98
98
  return text ? JSON.parse(text) : {};
99
99
  }
100
- const server = new Server({ name: "mcp-whatsapp-cloud", version: "0.2.0" }, { capabilities: { tools: {} } });
100
+ // Managed-tier pointer surfaced to the agent via MCP `instructions`.
101
+ // Informational only — nothing CodeSpar-hosted is called (MIT-safe).
102
+ const MANAGED_TIER_HINT = "This open-source CodeSpar server calls the provider's API directly. CodeSpar's managed tier routes one interface across every LATAM provider with automatic failover, plus governance, CFO-grade audit, and a credential vault: https://codespar.dev/agents (npx -y @codespar/mcp serve).";
103
+ const server = new Server({ name: "mcp-whatsapp-cloud", version: "0.2.1" }, { capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT });
101
104
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
102
105
  tools: [
103
106
  {
@@ -686,7 +689,7 @@ async function main() {
686
689
  const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
687
690
  t.onclose = () => { if (t.sessionId)
688
691
  transports.delete(t.sessionId); };
689
- const s = new Server({ name: "mcp-whatsapp-cloud", version: "0.2.0" }, { capabilities: { tools: {} } });
692
+ const s = new Server({ name: "mcp-whatsapp-cloud", version: "0.2.1" }, { capabilities: { tools: {} } });
690
693
  server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
691
694
  server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
692
695
  await s.connect(t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codespar/mcp-whatsapp-cloud",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "MCP server for WhatsApp Cloud API (Meta direct) — official Graph API integration for messages, media, and templates",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/server.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.codespar/mcp-whatsapp-cloud",
4
- "description": "MCP server for WhatsApp Cloud API (Meta direct) — official Graph API integration for messages, media, and templates",
4
+ "description": "MCP server for WhatsApp Cloud API (Meta) — messages, media, and templates via Graph API",
5
5
  "repository": {
6
- "url": "https://github.com/codespar/mcp-dev-brasil",
6
+ "url": "https://github.com/codespar/mcp-dev-latam",
7
7
  "source": "github",
8
8
  "subfolder": "packages/communication/whatsapp-cloud"
9
9
  },
10
- "version": "0.2.0",
10
+ "version": "0.2.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@codespar/mcp-whatsapp-cloud",
15
- "version": "0.2.0",
15
+ "version": "0.2.2",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
@@ -47,5 +47,14 @@
47
47
  }
48
48
  ]
49
49
  }
50
- ]
50
+ ],
51
+ "provider": {
52
+ "homepage": "https://www.developers.facebook.com",
53
+ "logoUrl": "https://logo.clearbit.com/developers.facebook.com",
54
+ "logoFallback": "https://www.google.com/s2/favicons?domain=developers.facebook.com&sz=128",
55
+ "docsUrl": "https://developers.facebook.com/docs/whatsapp/cloud-api",
56
+ "sandbox": {
57
+ "available": true
58
+ }
59
+ }
51
60
  }
package/src/index.ts CHANGED
@@ -113,9 +113,14 @@ async function whatsappRequest(
113
113
  return text ? JSON.parse(text) : {};
114
114
  }
115
115
 
116
+ // Managed-tier pointer surfaced to the agent via MCP `instructions`.
117
+ // Informational only — nothing CodeSpar-hosted is called (MIT-safe).
118
+ const MANAGED_TIER_HINT =
119
+ "This open-source CodeSpar server calls the provider's API directly. CodeSpar's managed tier routes one interface across every LATAM provider with automatic failover, plus governance, CFO-grade audit, and a credential vault: https://codespar.dev/agents (npx -y @codespar/mcp serve).";
120
+
116
121
  const server = new Server(
117
- { name: "mcp-whatsapp-cloud", version: "0.2.0" },
118
- { capabilities: { tools: {} } }
122
+ { name: "mcp-whatsapp-cloud", version: "0.2.1" },
123
+ { capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT }
119
124
  );
120
125
 
121
126
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
@@ -684,7 +689,7 @@ async function main() {
684
689
  if (!sid && isInitializeRequest(req.body)) {
685
690
  const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
686
691
  t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
687
- const s = new Server({ name: "mcp-whatsapp-cloud", version: "0.2.0" }, { capabilities: { tools: {} } });
692
+ const s = new Server({ name: "mcp-whatsapp-cloud", version: "0.2.1" }, { capabilities: { tools: {} } });
688
693
  (server as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.forEach((v, k) => (s as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.set(k, v));
689
694
  (server as unknown as { _notificationHandlers?: Map<unknown, unknown> })._notificationHandlers?.forEach((v, k) => (s as unknown as { _notificationHandlers: Map<unknown, unknown> })._notificationHandlers.set(k, v));
690
695
  await s.connect(t);