suarify-mcp-server 0.1.3 → 0.1.6
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 +21 -2
- package/index.js +8 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Suarify is an AI voice automation platform for building and routing SIP-integrat
|
|
|
21
21
|
Set the following environment variables:
|
|
22
22
|
|
|
23
23
|
- `SUARIFY_API_KEY`: (Required) Your API key for authentication. Register free account credit at https://suarify.my/register-new-user
|
|
24
|
-
- `SUARIFY_BASE_URL`: (Optional) Defaults to `https://
|
|
24
|
+
- `SUARIFY_BASE_URL`: (Optional) Defaults to `https://suarify.my`.
|
|
25
25
|
|
|
26
26
|
## Setup in AI Clients
|
|
27
27
|
### Common mcp (cursor, codex, claudecode ,etc)
|
|
@@ -39,11 +39,30 @@ Add the following to your `claude_desktop_config.json` (usually located in `%APP
|
|
|
39
39
|
"command": "npx",
|
|
40
40
|
"args": ["-y", "suarify-mcp-server"],
|
|
41
41
|
"env": {
|
|
42
|
-
"SUARIFY_API_KEY": "
|
|
42
|
+
"SUARIFY_API_KEY": "sk_suarify_xxxxx_c2U5vTQ2MEfaMm8Iwa8gwN0l"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
```
|
|
48
|
+
or
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"suarify-local": {
|
|
55
|
+
"command": "node",
|
|
56
|
+
"args": [
|
|
57
|
+
"c:/Users/Acer/OneDrive/Documents/GitHub/suarify-mcp/index.js"
|
|
58
|
+
],
|
|
59
|
+
"env": {
|
|
60
|
+
"SUARIFY_API_KEY": "sk_suarify_xxxxx_c2U5vTQ2MEfaMm8Iwa8gwN0l"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
47
66
|
```
|
|
48
67
|
|
|
49
68
|
### Cursor
|
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import { FastMCP } from "fastmcp";
|
|
2
3
|
import axios, { AxiosError } from "axios";
|
|
3
4
|
import { z } from "zod";
|
|
@@ -11,18 +12,10 @@ const originalError = console.error;
|
|
|
11
12
|
console.log = (...args) => originalError(...args);
|
|
12
13
|
console.info = (...args) => originalError(...args);
|
|
13
14
|
console.warn = (...args) => originalError(...args);
|
|
15
|
+
// Note: We do NOT patch process.stdout.write directly because it can break
|
|
16
|
+
// large JSON messages that are sent in multiple chunks.
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
const stdoutWrite = process.stdout.write;
|
|
17
|
-
process.stdout.write = function (chunk) {
|
|
18
|
-
const str = chunk.toString();
|
|
19
|
-
if (str.trim().startsWith('{') || str.trim().startsWith('[')) {
|
|
20
|
-
return stdoutWrite.apply(process.stdout, arguments);
|
|
21
|
-
}
|
|
22
|
-
return process.stderr.write.apply(process.stderr, arguments);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const BASE_URL = process.env.SUARIFY_BASE_URL || "https://suarify1.my";
|
|
18
|
+
const BASE_URL = process.env.SUARIFY_BASE_URL || "https://suarify.my";
|
|
26
19
|
const API_KEY = process.env.SUARIFY_API_KEY;
|
|
27
20
|
|
|
28
21
|
if (!API_KEY) {
|
|
@@ -32,7 +25,7 @@ if (!API_KEY) {
|
|
|
32
25
|
// --- Server Definition ---
|
|
33
26
|
const mcp = new FastMCP({
|
|
34
27
|
name: "suarify-mcp-server",
|
|
35
|
-
version: "0.1.
|
|
28
|
+
version: "0.1.5",
|
|
36
29
|
instructions: "This server provides tools for interacting with the Suarify voice calling platform. Use these tools to initiate AI-powered phone calls, manage leads, and configure agent settings. Requires a valid SUARIFY_API_KEY environment variable."
|
|
37
30
|
});
|
|
38
31
|
|
|
@@ -348,8 +341,6 @@ mcp.addTool({
|
|
|
348
341
|
|
|
349
342
|
export { mcp, apiClient };
|
|
350
343
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
});
|
|
355
|
-
}
|
|
344
|
+
mcp.start({
|
|
345
|
+
transportType: "stdio",
|
|
346
|
+
});
|