@codespar/mcp-evolution-api 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 +18 -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
|
@@ -51,10 +51,10 @@ Add to `.cursor/mcp.json` or `.vscode/mcp.json`:
|
|
|
51
51
|
}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
## Tools
|
|
54
|
+
## Tools (25)
|
|
55
55
|
|
|
56
|
-
| Tool |
|
|
57
|
-
|
|
56
|
+
| Tool | Purpose |
|
|
57
|
+
|---|---|
|
|
58
58
|
| `send_text` | Send a text message via WhatsApp |
|
|
59
59
|
| `send_image` | Send an image message via WhatsApp |
|
|
60
60
|
| `send_document` | Send a document via WhatsApp |
|
|
@@ -65,6 +65,21 @@ Add to `.cursor/mcp.json` or `.vscode/mcp.json`:
|
|
|
65
65
|
| `send_poll` | Send a poll message via WhatsApp |
|
|
66
66
|
| `get_messages` | Get messages from a chat |
|
|
67
67
|
| `check_number` | Check if a phone number is registered on WhatsApp |
|
|
68
|
+
| `create_group` | Create a WhatsApp group |
|
|
69
|
+
| `get_group_info` | Get group metadata, participants, and settings |
|
|
70
|
+
| `update_profile` | Update instance profile (name, status text, or picture) |
|
|
71
|
+
| `set_presence` | Set online/offline presence for an instance |
|
|
72
|
+
| `get_chat_history` | Get full chat history with pagination support |
|
|
73
|
+
| `logout_instance` | Logout an instance (disconnects the WhatsApp session without deleting the instance) |
|
|
74
|
+
| `restart_instance` | Restart an instance |
|
|
75
|
+
| `delete_instance` | Delete an instance permanently |
|
|
76
|
+
| `connection_state` | Get the connection state of an instance (open, connecting, close) |
|
|
77
|
+
| `leave_group` | Leave a WhatsApp group |
|
|
78
|
+
| `update_group_participants` | Add, remove, promote, or demote participants in a WhatsApp group |
|
|
79
|
+
| `fetch_group_invite_code` | Fetch the invite code/link for a WhatsApp group |
|
|
80
|
+
| `mark_message_as_read` | Mark one or more messages in a chat as read |
|
|
81
|
+
| `archive_chat` | Archive or unarchive a chat |
|
|
82
|
+
| `delete_message` | Delete a message for me or for everyone in a chat |
|
|
68
83
|
|
|
69
84
|
## Authentication
|
|
70
85
|
|
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ async function evolutionRequest(method, path, body) {
|
|
|
55
55
|
}
|
|
56
56
|
return res.json();
|
|
57
57
|
}
|
|
58
|
-
const server = new Server({ name: "mcp-evolution-api", version: "0.2.
|
|
58
|
+
const server = new Server({ name: "mcp-evolution-api", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
59
59
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
60
60
|
tools: [
|
|
61
61
|
{
|
|
@@ -520,7 +520,7 @@ async function main() {
|
|
|
520
520
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
521
521
|
t.onclose = () => { if (t.sessionId)
|
|
522
522
|
transports.delete(t.sessionId); };
|
|
523
|
-
const s = new Server({ name: "mcp-evolution-api", version: "0.2.
|
|
523
|
+
const s = new Server({ name: "mcp-evolution-api", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
524
524
|
server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
|
|
525
525
|
server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
|
|
526
526
|
await s.connect(t);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codespar/mcp-evolution-api",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "MCP server for Evolution API
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "MCP server for Evolution API \u2014 WhatsApp messaging, instances, contacts",
|
|
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/evolution-api"
|
|
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-evolution-api",
|
|
15
|
-
"version": "0.2.
|
|
15
|
+
"version": "0.2.1",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
package/src/index.ts
CHANGED
|
@@ -64,7 +64,7 @@ async function evolutionRequest(method: string, path: string, body?: unknown): P
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const server = new Server(
|
|
67
|
-
{ name: "mcp-evolution-api", version: "0.2.
|
|
67
|
+
{ name: "mcp-evolution-api", version: "0.2.1" },
|
|
68
68
|
{ capabilities: { tools: {} } }
|
|
69
69
|
);
|
|
70
70
|
|
|
@@ -521,7 +521,7 @@ async function main() {
|
|
|
521
521
|
if (!sid && isInitializeRequest(req.body)) {
|
|
522
522
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
523
523
|
t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
|
|
524
|
-
const s = new Server({ name: "mcp-evolution-api", version: "0.2.
|
|
524
|
+
const s = new Server({ name: "mcp-evolution-api", 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);
|
|
525
525
|
await t.handleRequest(req, res, req.body); return;
|
|
526
526
|
}
|
|
527
527
|
res.status(400).json({ jsonrpc: "2.0", error: { code: -32000, message: "Bad Request" }, id: null });
|