@codespar/mcp-zenvia 0.2.0 → 0.2.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 +13 -3
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/index.ts +2 -2
package/README.md
CHANGED
|
@@ -49,18 +49,28 @@ Add to `.cursor/mcp.json` or `.vscode/mcp.json`:
|
|
|
49
49
|
}
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
## Tools
|
|
52
|
+
## Tools (18)
|
|
53
53
|
|
|
54
|
-
| Tool |
|
|
55
|
-
|
|
54
|
+
| Tool | Purpose |
|
|
55
|
+
|---|---|
|
|
56
56
|
| `send_sms` | Send an SMS message |
|
|
57
57
|
| `send_whatsapp` | Send a WhatsApp message |
|
|
58
58
|
| `send_rcs` | Send an RCS (Rich Communication Services) message |
|
|
59
|
+
| `send_email` | Send a transactional email |
|
|
60
|
+
| `send_voice` | Send a voice message via TTS or pre-recorded audio URL |
|
|
61
|
+
| `send_facebook_message` | Send a Facebook Messenger message |
|
|
59
62
|
| `get_message_status` | Get message delivery status by ID |
|
|
60
63
|
| `list_channels` | List available messaging channels |
|
|
61
64
|
| `create_subscription` | Create a webhook subscription for message events |
|
|
65
|
+
| `list_subscriptions` | List all webhook subscriptions |
|
|
66
|
+
| `delete_subscription` | Delete a webhook subscription by ID |
|
|
62
67
|
| `list_contacts` | List contacts from the contact base |
|
|
68
|
+
| `create_contact` | Create a contact in the contact base |
|
|
69
|
+
| `delete_contact` | Delete a contact by ID |
|
|
63
70
|
| `send_template` | Send a WhatsApp template message (pre-approved) |
|
|
71
|
+
| `list_templates` | List approved message templates (WhatsApp/SMS/RCS) |
|
|
72
|
+
| `get_report_entries` | Get message report entries within a date range |
|
|
73
|
+
| `add_opt_out` | Add a phone number to the opt-out list (suppresses future messages) |
|
|
64
74
|
|
|
65
75
|
## Authentication
|
|
66
76
|
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ async function zenviaRequest(method, path, body) {
|
|
|
49
49
|
const text = await res.text();
|
|
50
50
|
return text ? JSON.parse(text) : { ok: true };
|
|
51
51
|
}
|
|
52
|
-
const server = new Server({ name: "mcp-zenvia", version: "0.2.
|
|
52
|
+
const server = new Server({ name: "mcp-zenvia", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
53
53
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
54
54
|
tools: [
|
|
55
55
|
{
|
|
@@ -371,7 +371,7 @@ async function main() {
|
|
|
371
371
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
372
372
|
t.onclose = () => { if (t.sessionId)
|
|
373
373
|
transports.delete(t.sessionId); };
|
|
374
|
-
const s = new Server({ name: "mcp-zenvia", version: "0.2.
|
|
374
|
+
const s = new Server({ name: "mcp-zenvia", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
375
375
|
server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
|
|
376
376
|
server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
|
|
377
377
|
await s.connect(t);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codespar/mcp-zenvia",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "MCP server for Zenvia
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "MCP server for Zenvia \u2014 SMS, WhatsApp, RCS, Email, Voice, Facebook messaging, templates and reports",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"bin": {
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/communication/zenvia"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.2.
|
|
10
|
+
"version": "0.2.1",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@codespar/mcp-zenvia",
|
|
15
|
-
"version": "0.2.
|
|
15
|
+
"version": "0.2.1",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
package/src/index.ts
CHANGED
|
@@ -58,7 +58,7 @@ async function zenviaRequest(method: string, path: string, body?: unknown): Prom
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const server = new Server(
|
|
61
|
-
{ name: "mcp-zenvia", version: "0.2.
|
|
61
|
+
{ name: "mcp-zenvia", version: "0.2.1" },
|
|
62
62
|
{ capabilities: { tools: {} } }
|
|
63
63
|
);
|
|
64
64
|
|
|
@@ -370,7 +370,7 @@ async function main() {
|
|
|
370
370
|
if (!sid && isInitializeRequest(req.body)) {
|
|
371
371
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
372
372
|
t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
|
|
373
|
-
const s = new Server({ name: "mcp-zenvia", version: "0.2.
|
|
373
|
+
const s = new Server({ name: "mcp-zenvia", version: "0.2.1" }, { capabilities: { tools: {} } }); (server as any)._requestHandlers.forEach((v: any, k: any) => (s as any)._requestHandlers.set(k, v)); (server as any)._notificationHandlers?.forEach((v: any, k: any) => (s as any)._notificationHandlers.set(k, v)); await s.connect(t);
|
|
374
374
|
await t.handleRequest(req, res, req.body); return;
|
|
375
375
|
}
|
|
376
376
|
res.status(400).json({ jsonrpc: "2.0", error: { code: -32000, message: "Bad Request" }, id: null });
|