@dexmond/mcp-server 2.2.0 → 2.4.0
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/index.mjs +347 -17
- package/package.json +2 -2
- package/server.json +12 -6
package/index.mjs
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Official Dexmond Technologies MCP Server v2.0 (Zero-Dependency stdio JSON-RPC 2.0)
|
|
4
|
-
* Exposes the Full Dexmond Commercial
|
|
3
|
+
* Official Dexmond Technologies MCP Server v2.4.0 (Zero-Dependency stdio JSON-RPC 2.0)
|
|
4
|
+
* Exposes the Full Dexmond Commercial & Unified API v1.4 Suite + Local Loopback Edge Bridges
|
|
5
|
+
* (28 tools, 4 prompts, 3 resources) to Claude, Cursor, Antigravity & AI Agents.
|
|
5
6
|
*
|
|
6
7
|
* Environment variables:
|
|
7
|
-
* DEXMOND_API_KEY
|
|
8
|
-
* DEXMOND_API_URL
|
|
8
|
+
* DEXMOND_API_KEY (required for metered cloud tools: dx_live_... from https://dexmond.com/dashboard.html#developer)
|
|
9
|
+
* DEXMOND_API_URL (optional: defaults to https://dexmond.com/api/v1/commerce.php)
|
|
10
|
+
* DEXMOND_UNIFIED_API_URL (optional: defaults to https://api.dexmond.com)
|
|
11
|
+
* PROLAB_BRIDGE_URL (optional loopback-only: defaults to http://127.0.0.1:18765)
|
|
12
|
+
* PROLAB_BRIDGE_TOKEN (required for authenticated Android ProLab Local Agent Bridge calls)
|
|
13
|
+
* SENTINEL_BRIDGE_URL (optional loopback-only: defaults to http://127.0.0.1:18766)
|
|
14
|
+
* SENTINEL_BRIDGE_TOKEN (required for authenticated Sentinel 2.0 Edge Agent Bridge calls)
|
|
9
15
|
*/
|
|
10
16
|
|
|
11
17
|
import readline from 'node:readline';
|
|
12
18
|
import crypto from 'node:crypto';
|
|
13
19
|
|
|
14
20
|
const API_URL = process.env.DEXMOND_API_URL || 'https://dexmond.com/api/v1/commerce.php';
|
|
21
|
+
const UNIFIED_API_URL = (process.env.DEXMOND_UNIFIED_API_URL || process.env.DEXMOND_UNIFIED_API_BASE || 'https://api.dexmond.com').replace(/\/+$/, '');
|
|
15
22
|
const API_KEY = process.env.DEXMOND_API_KEY || '';
|
|
16
23
|
|
|
17
24
|
const TOOLS = [
|
|
@@ -143,13 +150,6 @@ const TOOLS = [
|
|
|
143
150
|
description: 'ANALYSIS ONLY: Read-only quantitative market series analytics (volatility, Sharpe, drawdown, RSI, regime). Zero execution; not financial advice (40 credits).',
|
|
144
151
|
inputSchema: { type: 'object', required: ['prices'], properties: { symbol: { type: 'string' }, prices: { type: 'array', items: { type: 'number' } }, periods_per_year: { type: 'integer' }, risk_free_rate: { type: 'number' } } },
|
|
145
152
|
},
|
|
146
|
-
{
|
|
147
|
-
name: 'dexmond_polyclaw_analyze',
|
|
148
|
-
service: 'polyclaw',
|
|
149
|
-
operation: 'analyze',
|
|
150
|
-
description: 'ANALYSIS ONLY: Read-only prediction-market probability & calibration analytics (overround/vig, fair odds, EV, Kelly math, Brier score). Zero execution (40 credits).',
|
|
151
|
-
inputSchema: { type: 'object', required: ['outcomes'], properties: { outcomes: { type: 'array', items: { type: 'object' } }, historical_forecasts: { type: 'array', items: { type: 'object' } } } },
|
|
152
|
-
},
|
|
153
153
|
|
|
154
154
|
// --- ORBITAL INTEL, GLOBAL RISK & ZERO-LEAK AI ---
|
|
155
155
|
{
|
|
@@ -195,8 +195,294 @@ const TOOLS = [
|
|
|
195
195
|
},
|
|
196
196
|
},
|
|
197
197
|
},
|
|
198
|
+
|
|
199
|
+
// --- UNIFIED API v1.4 (AUTODRONE SAFETY & MODEL-AGNOSTIC TOOL DISCOVERY) ---
|
|
200
|
+
{
|
|
201
|
+
name: 'dexmond_pilot_release_verify',
|
|
202
|
+
service: 'autodrone',
|
|
203
|
+
operation: 'pilot_release_verify',
|
|
204
|
+
unifiedServiceId: 'B-12',
|
|
205
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
206
|
+
description: 'Verify AUTODRONE pilot release manifests against the Gate 7 simulation-only refusal invariant (refuses real_aircraft unless certified_flight), SHA-256 artifact digests, and tamper-evident hash-chained telemetry logs (Unified API B-12, 2 credits, read-only).',
|
|
207
|
+
inputSchema: {
|
|
208
|
+
type: 'object',
|
|
209
|
+
required: ['manifest'],
|
|
210
|
+
properties: {
|
|
211
|
+
manifest: { type: 'object', description: 'Pilot release manifest ({ pilot_name, version, stage, artifact_sha256 })' },
|
|
212
|
+
target_environment: { type: 'string', enum: ['simulation', 'bench', 'real_aircraft'], description: 'Target environment (default: simulation)' },
|
|
213
|
+
artifact_b64: { type: 'string', description: 'Optional base64-encoded artifact bytes to verify against manifest.artifact_sha256' },
|
|
214
|
+
telemetry_chain: { type: 'array', items: { type: 'object' }, description: 'Optional hash-chained telemetry log records' },
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: 'dexmond_drone_mission_validate',
|
|
220
|
+
service: 'autodrone',
|
|
221
|
+
operation: 'drone_mission_validate',
|
|
222
|
+
unifiedServiceId: 'I-05',
|
|
223
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
224
|
+
description: 'Audit 3D drone waypoint missions against 2D geofence polygons, spherical obstacle clearances, altitude/speed envelopes, battery RTH energy reserves, and required failsafes (Unified API I-05, 15 credits, simulation-only read-only).',
|
|
225
|
+
inputSchema: {
|
|
226
|
+
type: 'object',
|
|
227
|
+
required: ['waypoints'],
|
|
228
|
+
properties: {
|
|
229
|
+
waypoints: { type: 'array', items: { type: 'object' }, description: 'Array of 3D mission waypoints ({ x, y, z })' },
|
|
230
|
+
geofence: { type: 'array', items: { type: 'object' }, description: 'Optional 2D geofence polygon vertices ({ x, y })' },
|
|
231
|
+
obstacles: { type: 'array', items: { type: 'object' }, description: 'Optional spherical obstacles ({ x, y, z, radius_m })' },
|
|
232
|
+
envelope: { type: 'object', description: 'Optional flight envelope limits (min_altitude_m, max_altitude_m, max_speed_mps)' },
|
|
233
|
+
battery: { type: 'object', description: 'Optional battery & Return-To-Home (RTH) energy parameters' },
|
|
234
|
+
failsafes: { type: 'object', description: 'Optional failsafe configuration (rth, geofence_breach, link_loss, low_battery)' },
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'dexmond_drone_route_plan',
|
|
240
|
+
service: 'autodrone',
|
|
241
|
+
operation: 'drone_route_plan',
|
|
242
|
+
unifiedServiceId: 'I-06',
|
|
243
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
244
|
+
description: 'Plan bounded 3D A* obstacle-avoidance drone waypoints with collinear path simplification (Unified API I-06, 20 credits, simulation-only read-only). Output waypoints pipe directly into dexmond_drone_mission_validate.',
|
|
245
|
+
inputSchema: {
|
|
246
|
+
type: 'object',
|
|
247
|
+
required: ['start', 'goal'],
|
|
248
|
+
properties: {
|
|
249
|
+
start: { type: 'object', description: 'Start 3D coordinate ({ x, y, z })' },
|
|
250
|
+
goal: { type: 'object', description: 'Goal 3D coordinate ({ x, y, z })' },
|
|
251
|
+
obstacles: { type: 'array', items: { type: 'object' }, description: 'Optional spherical obstacles ({ x, y, z, radius_m })' },
|
|
252
|
+
bounds: { type: 'object', description: 'Optional 3D bounding box ({ min_x, max_x, min_y, max_y, min_z, max_z })' },
|
|
253
|
+
resolution_m: { type: 'number', description: 'Grid resolution in meters (0.5 to 50, default 2.0)' },
|
|
254
|
+
clearance_m: { type: 'number', description: 'Obstacle safety clearance margin in meters (default 1.5)' },
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: 'dexmond_unified_tools_discover',
|
|
260
|
+
service: 'unified',
|
|
261
|
+
operation: 'tools_discover',
|
|
262
|
+
unifiedToolsDiscovery: true,
|
|
263
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
264
|
+
description: 'Discover model-agnostic Dexmond Unified API v1.4 tool schemas across all 21 commercial services in OpenAI, Claude, Gemini, or MCP format (GET /v1/tools, free, no API key required).',
|
|
265
|
+
inputSchema: {
|
|
266
|
+
type: 'object',
|
|
267
|
+
properties: {
|
|
268
|
+
format: { type: 'string', enum: ['openai', 'claude', 'gemini', 'mcp'], default: 'mcp', description: 'Target tool schema format: openai, claude, gemini, or mcp' },
|
|
269
|
+
module: { type: 'string', description: 'Optional module_id filter (e.g. sentinel, android-prolab, autodrone-rta)' },
|
|
270
|
+
tier: { type: 'string', enum: ['basic', 'intermediate', 'enterprise'], description: 'Optional service tier filter' },
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
// --- LOCAL LOOPBACK EDGE AGENT BRIDGES (SELF-HOSTED ON 127.0.0.1) ---
|
|
276
|
+
{
|
|
277
|
+
name: 'dexmond_prolab_local_bridge',
|
|
278
|
+
service: 'prolab_bridge',
|
|
279
|
+
operation: 'local_bridge',
|
|
280
|
+
localBridge: 'prolab',
|
|
281
|
+
description: 'Call your local loopback-only Android ProLab Agent Bridge v1.1 (PROLAB_BRIDGE_URL, default http://127.0.0.1:18765) for read-only ADB/fastboot diagnostics or explicitly confirmed state-mutating device actions. Never sends requests to non-loopback hosts.',
|
|
282
|
+
inputSchema: {
|
|
283
|
+
type: 'object',
|
|
284
|
+
required: ['operation'],
|
|
285
|
+
properties: {
|
|
286
|
+
operation: {
|
|
287
|
+
type: 'string',
|
|
288
|
+
enum: [
|
|
289
|
+
'health',
|
|
290
|
+
'capabilities',
|
|
291
|
+
'prolab.devices.list',
|
|
292
|
+
'prolab.device.info',
|
|
293
|
+
'prolab.device.battery',
|
|
294
|
+
'prolab.device.logcat',
|
|
295
|
+
'prolab.device.packages',
|
|
296
|
+
'prolab.device.diagnostics',
|
|
297
|
+
'prolab.device.tcpip',
|
|
298
|
+
'prolab.device.reboot',
|
|
299
|
+
],
|
|
300
|
+
description: 'ProLab bridge operation (read_only diagnostics, health/capabilities, or confirmation-gated tcpip/reboot).',
|
|
301
|
+
},
|
|
302
|
+
input: {
|
|
303
|
+
type: 'object',
|
|
304
|
+
description: 'Operation input payload (e.g. { serial, lines, mode }).',
|
|
305
|
+
},
|
|
306
|
+
confirm_action: {
|
|
307
|
+
type: 'boolean',
|
|
308
|
+
default: false,
|
|
309
|
+
description: 'Set true ONLY after explicit human authorization to send X-Dexmond-Confirm-Action: true for state_mutating operations.',
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: 'dexmond_sentinel_edge_bridge',
|
|
316
|
+
service: 'sentinel_bridge',
|
|
317
|
+
operation: 'edge_bridge',
|
|
318
|
+
localBridge: 'sentinel',
|
|
319
|
+
description: 'Call your local loopback-only Sentinel 2.0 Edge Agent Bridge v1.1 (SENTINEL_BRIDGE_URL, default http://127.0.0.1:18766) for read-only threat/rule/flow inspection or explicitly confirmed dynamic rule, throttle, or IPS rule enforcement. Never sends requests to non-loopback hosts.',
|
|
320
|
+
inputSchema: {
|
|
321
|
+
type: 'object',
|
|
322
|
+
required: ['endpoint'],
|
|
323
|
+
properties: {
|
|
324
|
+
endpoint: {
|
|
325
|
+
type: 'string',
|
|
326
|
+
enum: [
|
|
327
|
+
'health',
|
|
328
|
+
'capabilities',
|
|
329
|
+
'core/status',
|
|
330
|
+
'core/rules',
|
|
331
|
+
'core/threats',
|
|
332
|
+
'evaluate_flow',
|
|
333
|
+
'enforce/dynamic_rule',
|
|
334
|
+
'enforce/throttle',
|
|
335
|
+
'enforce/ips_rule',
|
|
336
|
+
],
|
|
337
|
+
description: 'Sentinel Edge Bridge v1.1 endpoint (GET for health/capabilities/core/*, POST for evaluate_flow and enforce/*).',
|
|
338
|
+
},
|
|
339
|
+
input: {
|
|
340
|
+
type: 'object',
|
|
341
|
+
description: 'JSON payload for POST endpoints (FlowFeatures or enforcement parameters).',
|
|
342
|
+
},
|
|
343
|
+
confirm_action: {
|
|
344
|
+
type: 'boolean',
|
|
345
|
+
default: false,
|
|
346
|
+
description: 'Set true ONLY after explicit human authorization to send X-Dexmond-Confirm-Action: true for state_mutating enforce/* endpoints.',
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
},
|
|
198
351
|
];
|
|
199
352
|
|
|
353
|
+
const PROLAB_BRIDGE_ALLOWED_OPS = new Set([
|
|
354
|
+
'health',
|
|
355
|
+
'capabilities',
|
|
356
|
+
'prolab.devices.list',
|
|
357
|
+
'prolab.device.info',
|
|
358
|
+
'prolab.device.battery',
|
|
359
|
+
'prolab.device.logcat',
|
|
360
|
+
'prolab.device.packages',
|
|
361
|
+
'prolab.device.diagnostics',
|
|
362
|
+
'prolab.device.tcpip',
|
|
363
|
+
'prolab.device.reboot',
|
|
364
|
+
]);
|
|
365
|
+
|
|
366
|
+
const SENTINEL_BRIDGE_GET_ENDPOINTS = new Set([
|
|
367
|
+
'health',
|
|
368
|
+
'capabilities',
|
|
369
|
+
'core/status',
|
|
370
|
+
'core/rules',
|
|
371
|
+
'core/threats',
|
|
372
|
+
]);
|
|
373
|
+
|
|
374
|
+
const SENTINEL_BRIDGE_POST_ENDPOINTS = new Set([
|
|
375
|
+
'evaluate_flow',
|
|
376
|
+
'enforce/dynamic_rule',
|
|
377
|
+
'enforce/throttle',
|
|
378
|
+
'enforce/ips_rule',
|
|
379
|
+
]);
|
|
380
|
+
|
|
381
|
+
function validateLoopbackBridgeUrl(rawUrl, envName) {
|
|
382
|
+
let parsed;
|
|
383
|
+
try {
|
|
384
|
+
parsed = new URL(String(rawUrl || '').trim());
|
|
385
|
+
} catch (_) {
|
|
386
|
+
throw new Error(`Invalid ${envName}: must be a valid loopback HTTP(S) URL.`);
|
|
387
|
+
}
|
|
388
|
+
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
|
389
|
+
throw new Error(`Rejected ${envName}: only http:// or https:// loopback URLs are permitted.`);
|
|
390
|
+
}
|
|
391
|
+
if (parsed.username || parsed.password) {
|
|
392
|
+
throw new Error(`Rejected ${envName}: embedded URL credentials are forbidden.`);
|
|
393
|
+
}
|
|
394
|
+
const host = parsed.hostname.toLowerCase();
|
|
395
|
+
const isLoopback = host === '127.0.0.1' || host === 'localhost' || host === '::1' || host === '[::1]';
|
|
396
|
+
if (!isLoopback) {
|
|
397
|
+
throw new Error(
|
|
398
|
+
`SSRF_BLOCKED: ${envName} must target loopback only (127.0.0.1, localhost, or [::1]); got "${parsed.hostname}".`
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
return `${parsed.protocol}//${parsed.host}`;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
async function invokeLocalBridge(bridgeType, args) {
|
|
405
|
+
const isProlab = bridgeType === 'prolab';
|
|
406
|
+
const urlEnvName = isProlab ? 'PROLAB_BRIDGE_URL' : 'SENTINEL_BRIDGE_URL';
|
|
407
|
+
const tokenEnvName = isProlab ? 'PROLAB_BRIDGE_TOKEN' : 'SENTINEL_BRIDGE_TOKEN';
|
|
408
|
+
const defaultUrl = isProlab ? 'http://127.0.0.1:18765' : 'http://127.0.0.1:18766';
|
|
409
|
+
|
|
410
|
+
let baseUrl;
|
|
411
|
+
try {
|
|
412
|
+
baseUrl = validateLoopbackBridgeUrl(process.env[urlEnvName] || defaultUrl, urlEnvName);
|
|
413
|
+
} catch (err) {
|
|
414
|
+
return { isError: true, content: [{ type: 'text', text: String(err.message || err) }] };
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const token = (process.env[tokenEnvName] || '').trim();
|
|
418
|
+
const confirmAction = args?.confirm_action === true;
|
|
419
|
+
let method = 'GET';
|
|
420
|
+
let path = '';
|
|
421
|
+
let body = undefined;
|
|
422
|
+
let needsAuth = true;
|
|
423
|
+
|
|
424
|
+
if (isProlab) {
|
|
425
|
+
const operation = String(args?.operation || '').trim();
|
|
426
|
+
if (!PROLAB_BRIDGE_ALLOWED_OPS.has(operation)) {
|
|
427
|
+
return { isError: true, content: [{ type: 'text', text: `Unsupported ProLab bridge operation: "${operation}".` }] };
|
|
428
|
+
}
|
|
429
|
+
if (operation === 'health') {
|
|
430
|
+
method = 'GET';
|
|
431
|
+
path = '/v1/health';
|
|
432
|
+
needsAuth = false;
|
|
433
|
+
} else if (operation === 'capabilities') {
|
|
434
|
+
method = 'GET';
|
|
435
|
+
path = '/v1/capabilities';
|
|
436
|
+
} else {
|
|
437
|
+
method = 'POST';
|
|
438
|
+
path = '/v1/execute';
|
|
439
|
+
body = JSON.stringify({ operation, input: args?.input && typeof args.input === 'object' ? args.input : {} });
|
|
440
|
+
}
|
|
441
|
+
} else {
|
|
442
|
+
const endpoint = String(args?.endpoint || '').trim();
|
|
443
|
+
if (SENTINEL_BRIDGE_GET_ENDPOINTS.has(endpoint)) {
|
|
444
|
+
method = 'GET';
|
|
445
|
+
path = `/v1/${endpoint}`;
|
|
446
|
+
needsAuth = endpoint !== 'health';
|
|
447
|
+
} else if (SENTINEL_BRIDGE_POST_ENDPOINTS.has(endpoint)) {
|
|
448
|
+
method = 'POST';
|
|
449
|
+
path = `/v1/${endpoint}`;
|
|
450
|
+
body = JSON.stringify(args?.input && typeof args.input === 'object' ? args.input : {});
|
|
451
|
+
} else {
|
|
452
|
+
return { isError: true, content: [{ type: 'text', text: `Unsupported Sentinel bridge endpoint: "${endpoint}".` }] };
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (needsAuth && !token) {
|
|
457
|
+
return {
|
|
458
|
+
isError: true,
|
|
459
|
+
content: [{
|
|
460
|
+
type: 'text',
|
|
461
|
+
text: `${tokenEnvName} is not set. Start your local ${isProlab ? 'Android ProLab' : 'Sentinel 2.0'} bridge and configure ${tokenEnvName} in your MCP server environment.`,
|
|
462
|
+
}],
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
const headers = { Accept: 'application/json' };
|
|
467
|
+
if (needsAuth) headers.Authorization = `Bearer ${token}`;
|
|
468
|
+
if (body !== undefined) headers['Content-Type'] = 'application/json';
|
|
469
|
+
if (confirmAction) headers['X-Dexmond-Confirm-Action'] = 'true';
|
|
470
|
+
|
|
471
|
+
const res = await fetch(`${baseUrl}${path}`, {
|
|
472
|
+
method,
|
|
473
|
+
headers,
|
|
474
|
+
body,
|
|
475
|
+
signal: AbortSignal.timeout(15000),
|
|
476
|
+
});
|
|
477
|
+
const text = await res.text();
|
|
478
|
+
let parsed = null;
|
|
479
|
+
try { parsed = JSON.parse(text); } catch (_) {}
|
|
480
|
+
return {
|
|
481
|
+
isError: !res.ok || (parsed && parsed.ok === false),
|
|
482
|
+
content: [{ type: 'text', text: parsed ? JSON.stringify(parsed, null, 2) : text }],
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
200
486
|
function send(obj) {
|
|
201
487
|
process.stdout.write(JSON.stringify(obj) + '\n');
|
|
202
488
|
}
|
|
@@ -204,6 +490,9 @@ function send(obj) {
|
|
|
204
490
|
const MODULES_URL = API_URL.replace(/\/commerce\.php$/, '/modules.php');
|
|
205
491
|
|
|
206
492
|
async function invokeDexmond(tool, args) {
|
|
493
|
+
if (tool.localBridge) {
|
|
494
|
+
return invokeLocalBridge(tool.localBridge, args || {});
|
|
495
|
+
}
|
|
207
496
|
if (tool.publicDiscovery) {
|
|
208
497
|
const qs = new URLSearchParams();
|
|
209
498
|
if (args?.module) qs.set('module', String(args.module));
|
|
@@ -213,6 +502,20 @@ async function invokeDexmond(tool, args) {
|
|
|
213
502
|
const text = await res.text();
|
|
214
503
|
return { isError: !res.ok, content: [{ type: 'text', text }] };
|
|
215
504
|
}
|
|
505
|
+
if (tool.unifiedToolsDiscovery) {
|
|
506
|
+
const qs = new URLSearchParams();
|
|
507
|
+
qs.set('format', String(args?.format || 'mcp'));
|
|
508
|
+
if (args?.module) qs.set('module', String(args.module));
|
|
509
|
+
if (args?.tier) qs.set('tier', String(args.tier));
|
|
510
|
+
const res = await fetch(`${UNIFIED_API_URL}/v1/tools?${qs.toString()}`, { headers: { Accept: 'application/json' } });
|
|
511
|
+
const text = await res.text();
|
|
512
|
+
let parsed = null;
|
|
513
|
+
try { parsed = JSON.parse(text); } catch (_) {}
|
|
514
|
+
return {
|
|
515
|
+
isError: !res.ok || (parsed && parsed.ok === false),
|
|
516
|
+
content: [{ type: 'text', text: parsed ? JSON.stringify(parsed, null, 2) : text }],
|
|
517
|
+
};
|
|
518
|
+
}
|
|
216
519
|
if (!API_KEY) {
|
|
217
520
|
return {
|
|
218
521
|
isError: true,
|
|
@@ -220,6 +523,28 @@ async function invokeDexmond(tool, args) {
|
|
|
220
523
|
};
|
|
221
524
|
}
|
|
222
525
|
const idem = 'mcp-' + crypto.randomBytes(10).toString('hex');
|
|
526
|
+
if (tool.unifiedServiceId) {
|
|
527
|
+
const res = await fetch(`${UNIFIED_API_URL}/v1/execute`, {
|
|
528
|
+
method: 'POST',
|
|
529
|
+
headers: {
|
|
530
|
+
'Content-Type': 'application/json',
|
|
531
|
+
'X-Dexmond-Key': API_KEY,
|
|
532
|
+
'X-API-Key': API_KEY,
|
|
533
|
+
'Idempotency-Key': idem,
|
|
534
|
+
},
|
|
535
|
+
body: JSON.stringify({
|
|
536
|
+
service_id: tool.unifiedServiceId,
|
|
537
|
+
params: args || {},
|
|
538
|
+
}),
|
|
539
|
+
});
|
|
540
|
+
const text = await res.text();
|
|
541
|
+
let parsed = null;
|
|
542
|
+
try { parsed = JSON.parse(text); } catch (_) {}
|
|
543
|
+
return {
|
|
544
|
+
isError: !res.ok || (parsed && parsed.ok === false),
|
|
545
|
+
content: [{ type: 'text', text: parsed ? JSON.stringify(parsed, null, 2) : text }],
|
|
546
|
+
};
|
|
547
|
+
}
|
|
223
548
|
const res = await fetch(API_URL, {
|
|
224
549
|
method: 'POST',
|
|
225
550
|
headers: {
|
|
@@ -242,7 +567,7 @@ async function invokeDexmond(tool, args) {
|
|
|
242
567
|
};
|
|
243
568
|
}
|
|
244
569
|
|
|
245
|
-
const SERVER_VERSION = '2.
|
|
570
|
+
const SERVER_VERSION = '2.4.0';
|
|
246
571
|
|
|
247
572
|
const PROMPTS = [
|
|
248
573
|
{
|
|
@@ -270,14 +595,14 @@ const PROMPTS = [
|
|
|
270
595
|
const RESOURCES = [
|
|
271
596
|
{
|
|
272
597
|
uri: 'dexmond://catalog/tools',
|
|
273
|
-
name: 'Dexmond MCP Tool Catalog (
|
|
274
|
-
description: 'Live JSON catalog of all
|
|
598
|
+
name: 'Dexmond MCP Tool Catalog (28 Tools)',
|
|
599
|
+
description: 'Live JSON catalog of all 28 EU-hosted security, AI firewall, SQL, GDPR/AI Act, malware, AUTODRONE safety, Unified API v1.4 discovery, and local loopback bridge tools.',
|
|
275
600
|
mimeType: 'application/json',
|
|
276
601
|
},
|
|
277
602
|
{
|
|
278
603
|
uri: 'dexmond://security/benchmark',
|
|
279
604
|
name: 'Dexmond Adversarial Benchmark Metrics',
|
|
280
|
-
description: 'Verified CI benchmark metrics (
|
|
605
|
+
description: 'Verified CI benchmark metrics (139 assertions, 25/25 Prompt Guard @ 0% FPR, 25/25 DLP @ 0% FPR, 17 CWE rules + module safety invariants).',
|
|
281
606
|
mimeType: 'application/json',
|
|
282
607
|
},
|
|
283
608
|
{
|
|
@@ -369,7 +694,7 @@ rl.on('line', async (line) => {
|
|
|
369
694
|
uri,
|
|
370
695
|
mimeType: 'application/json',
|
|
371
696
|
text: JSON.stringify({
|
|
372
|
-
total_assertions:
|
|
697
|
+
total_assertions: 139,
|
|
373
698
|
prompt_guard_v2: { attacks_caught: '25/25', benign_fpr: '0.0%' },
|
|
374
699
|
shield_dlp_v2: { detectors: 62, recall: '25/25', benign_fpr: '0.0%' },
|
|
375
700
|
mie_malware_hashes: 29737,
|
|
@@ -397,7 +722,12 @@ rl.on('line', async (line) => {
|
|
|
397
722
|
jsonrpc: '2.0',
|
|
398
723
|
id,
|
|
399
724
|
result: {
|
|
400
|
-
tools: TOOLS.map(({ name, description, inputSchema }) => ({
|
|
725
|
+
tools: TOOLS.map(({ name, description, inputSchema, annotations }) => ({
|
|
726
|
+
name,
|
|
727
|
+
description,
|
|
728
|
+
inputSchema,
|
|
729
|
+
...(annotations ? { annotations } : {}),
|
|
730
|
+
})),
|
|
401
731
|
},
|
|
402
732
|
});
|
|
403
733
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexmond/mcp-server",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Official zero-dependency Dexmond Technologies MCP Server — exposes
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Official zero-dependency Dexmond Technologies MCP Server — exposes 28 EU-hosted operational security, AUTODRONE safety, Unified API v1.4 discovery & loopback edge bridge tools (Sentinel & Android ProLab), 4 built-in slash prompts & 3 resources to Claude Code, Cursor, Gemini, Windsurf & MCP agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dexmond-mcp": "./index.mjs"
|
package/server.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
|
3
3
|
"name": "com.dexmond/dexmond-mcp",
|
|
4
|
-
"title": "Dexmond Commercial API MCP Server (
|
|
5
|
-
"description": "Zero-dependency official MCP server exposing
|
|
6
|
-
"version": "2.
|
|
4
|
+
"title": "Dexmond Commercial, Unified API v1.4 & Edge Bridge MCP Server (28 Security, Malware, SQL/RLS, AUTODRONE & Compliance Tools)",
|
|
5
|
+
"description": "Zero-dependency official MCP server exposing 28 EU-hosted zero-payload-persistence & loopback edge bridge tools: Dexmond Shield DLP v2 & Prompt Guard v2, MIE V1.0, Android ProLab APK Audit & Loopback Bridge, SQL-Alpha RLS Audit, Agent Law EU GDPR/AI Act, CypherNight Crypto/Forensics, Sentinel 2.0 Firewall Compiler & Edge Bridge, Project Elysium Orbital Decay, AUTODRONE Safety & 3D Route Planning (B-12, I-05, I-06), Unified API v1.4 Model-Agnostic Tool Discovery, Orbital/Global Risk Intel & Zero-Leak AI.",
|
|
6
|
+
"version": "2.4.0",
|
|
7
7
|
"homepage": "https://dexmond.com/integrations.html",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/Dexmond-Technologies/dexmond-sdk",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"registryType": "npm",
|
|
16
16
|
"identifier": "@dexmond/mcp-server",
|
|
17
|
-
"version": "2.
|
|
17
|
+
"version": "2.4.0",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
},
|
|
@@ -27,7 +27,13 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"name": "DEXMOND_API_URL",
|
|
30
|
-
"description": "Optional gateway override (default: https://dexmond.com/api/v1/commerce.php)",
|
|
30
|
+
"description": "Optional commerce gateway override (default: https://dexmond.com/api/v1/commerce.php)",
|
|
31
|
+
"isRequired": false,
|
|
32
|
+
"isSecret": false
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "DEXMOND_UNIFIED_API_URL",
|
|
36
|
+
"description": "Optional Unified API v1.4 gateway override (default: https://api.dexmond.com)",
|
|
31
37
|
"isRequired": false,
|
|
32
38
|
"isSecret": false
|
|
33
39
|
}
|
|
@@ -37,5 +43,5 @@
|
|
|
37
43
|
"pricing": "https://dexmond.com/pricing.html",
|
|
38
44
|
"trustCenter": "https://dexmond.com/security-trust.html",
|
|
39
45
|
"license": "MIT",
|
|
40
|
-
"toolCount":
|
|
46
|
+
"toolCount": 28
|
|
41
47
|
}
|