@codespar/mcp-twilio 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 +28 -14
- package/dist/index.js +5 -2
- package/package.json +1 -1
- package/server.json +13 -4
- package/src/index.ts +8 -3
package/README.md
CHANGED
|
@@ -4,22 +4,32 @@ MCP server for [Twilio](https://www.twilio.com) — the global standard for prog
|
|
|
4
4
|
|
|
5
5
|
SMS, WhatsApp, and Voice across 180+ countries. Verify (2FA) and Lookup (phone validation) included. Fills the global messaging gap in a catalog otherwise tilted to Brazil-specific providers (Z-API, Take Blip, Zenvia, Evolution API).
|
|
6
6
|
|
|
7
|
-
## Tools
|
|
7
|
+
## Tools (22)
|
|
8
8
|
|
|
9
9
|
| Tool | Purpose |
|
|
10
|
-
|
|
11
|
-
| `send_message` | Send an SMS or WhatsApp message
|
|
12
|
-
| `get_message` | Retrieve a message by SID |
|
|
13
|
-
| `list_messages` | List messages with optional filters
|
|
14
|
-
| `delete_message` | Delete a message from history |
|
|
15
|
-
| `make_call` | Place an outbound voice call
|
|
16
|
-
| `get_call` | Retrieve a call by SID |
|
|
17
|
-
| `update_call` |
|
|
18
|
-
| `start_verification` |
|
|
19
|
-
| `check_verification` | Check a Verify (2FA) code |
|
|
20
|
-
| `lookup_phone` | Validate
|
|
21
|
-
| `list_incoming_numbers` | List
|
|
22
|
-
| `buy_phone_number` | Provision a new phone number |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `send_message` | Send an SMS or WhatsApp message. |
|
|
12
|
+
| `get_message` | Retrieve a message resource by SID (SM... |
|
|
13
|
+
| `list_messages` | List messages with optional filters. |
|
|
14
|
+
| `delete_message` | Delete a message from history. |
|
|
15
|
+
| `make_call` | Place an outbound voice call. |
|
|
16
|
+
| `get_call` | Retrieve a call resource by SID (CA...). |
|
|
17
|
+
| `update_call` | Modify an in-progress call. |
|
|
18
|
+
| `start_verification` | Start a Verify (2FA) challenge. |
|
|
19
|
+
| `check_verification` | Check a Verify (2FA) code against a Service SID. |
|
|
20
|
+
| `lookup_phone` | Validate and normalize a phone number via Lookups v2. |
|
|
21
|
+
| `list_incoming_numbers` | List Twilio-provisioned phone numbers on this account. |
|
|
22
|
+
| `buy_phone_number` | Provision a new phone number. |
|
|
23
|
+
| `list_recordings` | List call recordings on this account. |
|
|
24
|
+
| `create_verify_service` | Create a Verify Service (VA...). |
|
|
25
|
+
| `create_conversation` | Create a Twilio Conversation. |
|
|
26
|
+
| `list_conversations` | List Conversations. |
|
|
27
|
+
| `add_conversation_participant` | Add a participant to a Conversation. |
|
|
28
|
+
| `send_conversation_message` | Post a message into a Conversation. |
|
|
29
|
+
| `list_messaging_services` | List Messaging Services (MG...). |
|
|
30
|
+
| `execute_studio_flow` | Trigger a Studio Flow Execution for a contact. |
|
|
31
|
+
| `create_taskrouter_task` | Create a TaskRouter Task on a Workspace. |
|
|
32
|
+
| `list_taskrouter_workers` | List Workers on a TaskRouter Workspace. |
|
|
23
33
|
|
|
24
34
|
## Install
|
|
25
35
|
|
|
@@ -71,6 +81,10 @@ npx @codespar/mcp-twilio
|
|
|
71
81
|
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-twilio
|
|
72
82
|
```
|
|
73
83
|
|
|
84
|
+
## Enterprise
|
|
85
|
+
|
|
86
|
+
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.
|
|
87
|
+
|
|
74
88
|
## License
|
|
75
89
|
|
|
76
90
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -110,7 +110,10 @@ function buildQuery(params) {
|
|
|
110
110
|
const s = q.toString();
|
|
111
111
|
return s ? `?${s}` : "";
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
// Managed-tier pointer surfaced to the agent via MCP `instructions`.
|
|
114
|
+
// Informational only — nothing CodeSpar-hosted is called (MIT-safe).
|
|
115
|
+
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).";
|
|
116
|
+
const server = new Server({ name: "mcp-twilio", version: "0.2.1" }, { capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT });
|
|
114
117
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
115
118
|
tools: [
|
|
116
119
|
{
|
|
@@ -648,7 +651,7 @@ async function main() {
|
|
|
648
651
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
649
652
|
t.onclose = () => { if (t.sessionId)
|
|
650
653
|
transports.delete(t.sessionId); };
|
|
651
|
-
const s = new Server({ name: "mcp-twilio", version: "0.2.
|
|
654
|
+
const s = new Server({ name: "mcp-twilio", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
652
655
|
server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
|
|
653
656
|
server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
|
|
654
657
|
await s.connect(t);
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"name": "io.github.codespar/mcp-twilio",
|
|
4
4
|
"description": "MCP server for Twilio — global SMS, WhatsApp, Voice, Verify, and Lookup across 180+ countries",
|
|
5
5
|
"repository": {
|
|
6
|
-
"url": "https://github.com/codespar/mcp-dev-
|
|
6
|
+
"url": "https://github.com/codespar/mcp-dev-latam",
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/communication/twilio"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.2.
|
|
10
|
+
"version": "0.2.2",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@codespar/mcp-twilio",
|
|
15
|
-
"version": "0.2.
|
|
15
|
+
"version": "0.2.2",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
|
@@ -40,5 +40,14 @@
|
|
|
40
40
|
}
|
|
41
41
|
]
|
|
42
42
|
}
|
|
43
|
-
]
|
|
43
|
+
],
|
|
44
|
+
"provider": {
|
|
45
|
+
"homepage": "https://www.twilio.com",
|
|
46
|
+
"logoUrl": "https://logo.clearbit.com/twilio.com",
|
|
47
|
+
"logoFallback": "https://www.google.com/s2/favicons?domain=twilio.com&sz=128",
|
|
48
|
+
"docsUrl": "https://www.twilio.com/docs",
|
|
49
|
+
"sandbox": {
|
|
50
|
+
"available": true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
44
53
|
}
|
package/src/index.ts
CHANGED
|
@@ -122,9 +122,14 @@ function buildQuery(params: Record<string, unknown>): string {
|
|
|
122
122
|
return s ? `?${s}` : "";
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
// Managed-tier pointer surfaced to the agent via MCP `instructions`.
|
|
126
|
+
// Informational only — nothing CodeSpar-hosted is called (MIT-safe).
|
|
127
|
+
const MANAGED_TIER_HINT =
|
|
128
|
+
"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).";
|
|
129
|
+
|
|
125
130
|
const server = new Server(
|
|
126
|
-
{ name: "mcp-twilio", version: "0.2.
|
|
127
|
-
{ capabilities: { tools: {} } }
|
|
131
|
+
{ name: "mcp-twilio", version: "0.2.1" },
|
|
132
|
+
{ capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT }
|
|
128
133
|
);
|
|
129
134
|
|
|
130
135
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
@@ -623,7 +628,7 @@ async function main() {
|
|
|
623
628
|
if (!sid && isInitializeRequest(req.body)) {
|
|
624
629
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
625
630
|
t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
|
|
626
|
-
const s = new Server({ name: "mcp-twilio", version: "0.2.
|
|
631
|
+
const s = new Server({ name: "mcp-twilio", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
627
632
|
(server as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.forEach((v, k) => (s as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.set(k, v));
|
|
628
633
|
(server as unknown as { _notificationHandlers?: Map<unknown, unknown> })._notificationHandlers?.forEach((v, k) => (s as unknown as { _notificationHandlers: Map<unknown, unknown> })._notificationHandlers.set(k, v));
|
|
629
634
|
await s.connect(t);
|