@velaro/mcp-server 0.6.56 → 0.6.58
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/package.json +1 -1
- package/server.js +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.58",
|
|
4
4
|
"description": "Velaro MCP server — connect Claude and other AI agents directly to your Velaro account: KB, workflows, bots, conversations, contacts, routing, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/server.js
CHANGED
|
@@ -170,6 +170,8 @@ const messagingPatch = (path, body) => messagingRequest('PATCH', path, body);
|
|
|
170
170
|
const messagingDel = (path) => messagingRequest('DELETE', path);
|
|
171
171
|
|
|
172
172
|
async function api(method, path, body, base = API_BASE) {
|
|
173
|
+
// Normalize: a path without a leading slash would glue onto the host ("...comScraperJobs/...") and fail as "fetch failed".
|
|
174
|
+
if (!path.startsWith('/')) path = '/' + path;
|
|
173
175
|
const res = await fetch(`${base}${path}`, {
|
|
174
176
|
method,
|
|
175
177
|
headers: { Authorization: authHeader(), 'Content-Type': 'application/json' },
|
|
@@ -3154,6 +3156,22 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
3154
3156
|
},
|
|
3155
3157
|
},
|
|
3156
3158
|
|
|
3159
|
+
{
|
|
3160
|
+
name: 'netsuite_m2m_init',
|
|
3161
|
+
description: 'Start NetSuite machine-to-machine (OAuth 2.0 Client Credentials) setup: generates the Velaro public certificate PEM to upload in NetSuite (Setup > Integration > Manage Authentication > OAuth 2.0 Client Credentials (M2M) Setup) and returns the steps. Omit configId for a new connection (company then required). Lives in velaro-messaging - requires VELARO_MESSAGING_API.',
|
|
3162
|
+
inputSchema: { type: 'object', properties: { configId: { type: 'number', description: 'Existing NetSuite config ID (rotate/switch).' }, company: { type: 'string', description: 'NetSuite account ID for a new connection (sandbox looks like 1234567_SB1).' }, displayName: { type: 'string' } } },
|
|
3163
|
+
},
|
|
3164
|
+
{
|
|
3165
|
+
name: 'netsuite_m2m_save',
|
|
3166
|
+
description: 'Save the Client ID (NetSuite integration record) and Certificate ID (NetSuite M2M mapping) for a NetSuite config after netsuite_m2m_init. Lives in velaro-messaging - requires VELARO_MESSAGING_API.',
|
|
3167
|
+
inputSchema: { type: 'object', properties: { configId: { type: 'number' }, clientId: { type: 'string' }, certificateId: { type: 'string' } }, required: ['configId', 'clientId', 'certificateId'] },
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
name: 'netsuite_m2m_verify',
|
|
3171
|
+
description: 'Verify a NetSuite M2M connection with per-check results (token, REST, customer read) and specific failure reasons and fixes. Lives in velaro-messaging - requires VELARO_MESSAGING_API.',
|
|
3172
|
+
inputSchema: { type: 'object', properties: { configId: { type: 'number' } }, required: ['configId'] },
|
|
3173
|
+
},
|
|
3174
|
+
|
|
3157
3175
|
// ── Microsoft Teams Phone (config CRUD) ────────────────────────────────────
|
|
3158
3176
|
// Live in-call actions (hold/resume/end/transfer, TeamsPhoneCtiController) are
|
|
3159
3177
|
// intentionally NOT exposed here — see mcp-cli-exempt comments on that controller.
|
|
@@ -7710,6 +7728,20 @@ async function handleTool(name, args) {
|
|
|
7710
7728
|
return `CTI token generated/rotated.\nDial URL: ${urls.dialUrlTemplate}\nScreen-pop URL: ${urls.screenPopUrl}`;
|
|
7711
7729
|
}
|
|
7712
7730
|
|
|
7731
|
+
case 'netsuite_m2m_init': {
|
|
7732
|
+
const r = await messagingPost('/NetSuite/M2M/Init', { id: args.configId ?? null, company: args.company, displayName: args.displayName });
|
|
7733
|
+
return `Config ${r.id ?? args.configId ?? 'new'}. Upload this certificate in NetSuite (Setup > Integration > Manage Authentication > OAuth 2.0 Client Credentials (M2M) Setup):\n${r.certificatePem ?? '(none returned)'}\n${Array.isArray(r.steps) ? r.steps.map((x, i) => `${i + 1}. ${x}`).join('\n') : ''}`;
|
|
7734
|
+
}
|
|
7735
|
+
case 'netsuite_m2m_save': {
|
|
7736
|
+
await messagingPost('/NetSuite/M2M/Save', { id: args.configId, clientId: args.clientId, certificateId: args.certificateId });
|
|
7737
|
+
return `Saved for config ${args.configId}. Run netsuite_m2m_verify next.`;
|
|
7738
|
+
}
|
|
7739
|
+
case 'netsuite_m2m_verify': {
|
|
7740
|
+
const r = await messagingPost('/NetSuite/M2M/Verify', { id: args.configId });
|
|
7741
|
+
const checks = Array.isArray(r.checks) ? r.checks : [];
|
|
7742
|
+
return checks.map(c => `${c.ok ? 'PASS' : 'FAIL'} ${c.name}${c.ok ? '' : ` - ${c.reason || c.reasonCode || ''}${c.howToFix ? ` | Fix: ${c.howToFix}` : ''}`}`).join('\n') || 'No checks returned.';
|
|
7743
|
+
}
|
|
7744
|
+
|
|
7713
7745
|
// ── Microsoft Teams Phone (config CRUD) ───────────────────────────────────
|
|
7714
7746
|
case 'teams_phone_get_config': {
|
|
7715
7747
|
const config = await messagingGet('/TeamsPhone/Config');
|