@dexmond/mcp-server 2.2.0 → 2.3.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 +227 -16
- package/package.json +2 -2
- package/server.json +2 -2
package/index.mjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Official Dexmond Technologies MCP Server v2.
|
|
4
|
-
* Exposes the Full Dexmond Commercial API Suite
|
|
3
|
+
* Official Dexmond Technologies MCP Server v2.3 (Zero-Dependency stdio JSON-RPC 2.0)
|
|
4
|
+
* Exposes the Full Dexmond Commercial API Suite + Local Loopback Edge Bridges (24 tools)
|
|
5
|
+
* 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
|
+
* PROLAB_BRIDGE_URL (optional loopback-only: defaults to http://127.0.0.1:18765)
|
|
11
|
+
* PROLAB_BRIDGE_TOKEN (required for authenticated Android ProLab Local Agent Bridge calls)
|
|
12
|
+
* SENTINEL_BRIDGE_URL (optional loopback-only: defaults to http://127.0.0.1:18766)
|
|
13
|
+
* SENTINEL_BRIDGE_TOKEN (required for authenticated Sentinel 2.0 Edge Agent Bridge calls)
|
|
9
14
|
*/
|
|
10
15
|
|
|
11
16
|
import readline from 'node:readline';
|
|
@@ -143,13 +148,6 @@ const TOOLS = [
|
|
|
143
148
|
description: 'ANALYSIS ONLY: Read-only quantitative market series analytics (volatility, Sharpe, drawdown, RSI, regime). Zero execution; not financial advice (40 credits).',
|
|
144
149
|
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
150
|
},
|
|
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
151
|
|
|
154
152
|
// --- ORBITAL INTEL, GLOBAL RISK & ZERO-LEAK AI ---
|
|
155
153
|
{
|
|
@@ -195,8 +193,218 @@ const TOOLS = [
|
|
|
195
193
|
},
|
|
196
194
|
},
|
|
197
195
|
},
|
|
196
|
+
|
|
197
|
+
// --- LOCAL LOOPBACK EDGE AGENT BRIDGES (SELF-HOSTED ON 127.0.0.1) ---
|
|
198
|
+
{
|
|
199
|
+
name: 'dexmond_prolab_local_bridge',
|
|
200
|
+
service: 'prolab_bridge',
|
|
201
|
+
operation: 'local_bridge',
|
|
202
|
+
localBridge: 'prolab',
|
|
203
|
+
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.',
|
|
204
|
+
inputSchema: {
|
|
205
|
+
type: 'object',
|
|
206
|
+
required: ['operation'],
|
|
207
|
+
properties: {
|
|
208
|
+
operation: {
|
|
209
|
+
type: 'string',
|
|
210
|
+
enum: [
|
|
211
|
+
'health',
|
|
212
|
+
'capabilities',
|
|
213
|
+
'prolab.devices.list',
|
|
214
|
+
'prolab.device.info',
|
|
215
|
+
'prolab.device.battery',
|
|
216
|
+
'prolab.device.logcat',
|
|
217
|
+
'prolab.device.packages',
|
|
218
|
+
'prolab.device.diagnostics',
|
|
219
|
+
'prolab.device.tcpip',
|
|
220
|
+
'prolab.device.reboot',
|
|
221
|
+
],
|
|
222
|
+
description: 'ProLab bridge operation (read_only diagnostics, health/capabilities, or confirmation-gated tcpip/reboot).',
|
|
223
|
+
},
|
|
224
|
+
input: {
|
|
225
|
+
type: 'object',
|
|
226
|
+
description: 'Operation input payload (e.g. { serial, lines, mode }).',
|
|
227
|
+
},
|
|
228
|
+
confirm_action: {
|
|
229
|
+
type: 'boolean',
|
|
230
|
+
default: false,
|
|
231
|
+
description: 'Set true ONLY after explicit human authorization to send X-Dexmond-Confirm-Action: true for state_mutating operations.',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'dexmond_sentinel_edge_bridge',
|
|
238
|
+
service: 'sentinel_bridge',
|
|
239
|
+
operation: 'edge_bridge',
|
|
240
|
+
localBridge: 'sentinel',
|
|
241
|
+
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.',
|
|
242
|
+
inputSchema: {
|
|
243
|
+
type: 'object',
|
|
244
|
+
required: ['endpoint'],
|
|
245
|
+
properties: {
|
|
246
|
+
endpoint: {
|
|
247
|
+
type: 'string',
|
|
248
|
+
enum: [
|
|
249
|
+
'health',
|
|
250
|
+
'capabilities',
|
|
251
|
+
'core/status',
|
|
252
|
+
'core/rules',
|
|
253
|
+
'core/threats',
|
|
254
|
+
'evaluate_flow',
|
|
255
|
+
'enforce/dynamic_rule',
|
|
256
|
+
'enforce/throttle',
|
|
257
|
+
'enforce/ips_rule',
|
|
258
|
+
],
|
|
259
|
+
description: 'Sentinel Edge Bridge v1.1 endpoint (GET for health/capabilities/core/*, POST for evaluate_flow and enforce/*).',
|
|
260
|
+
},
|
|
261
|
+
input: {
|
|
262
|
+
type: 'object',
|
|
263
|
+
description: 'JSON payload for POST endpoints (FlowFeatures or enforcement parameters).',
|
|
264
|
+
},
|
|
265
|
+
confirm_action: {
|
|
266
|
+
type: 'boolean',
|
|
267
|
+
default: false,
|
|
268
|
+
description: 'Set true ONLY after explicit human authorization to send X-Dexmond-Confirm-Action: true for state_mutating enforce/* endpoints.',
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
198
273
|
];
|
|
199
274
|
|
|
275
|
+
const PROLAB_BRIDGE_ALLOWED_OPS = new Set([
|
|
276
|
+
'health',
|
|
277
|
+
'capabilities',
|
|
278
|
+
'prolab.devices.list',
|
|
279
|
+
'prolab.device.info',
|
|
280
|
+
'prolab.device.battery',
|
|
281
|
+
'prolab.device.logcat',
|
|
282
|
+
'prolab.device.packages',
|
|
283
|
+
'prolab.device.diagnostics',
|
|
284
|
+
'prolab.device.tcpip',
|
|
285
|
+
'prolab.device.reboot',
|
|
286
|
+
]);
|
|
287
|
+
|
|
288
|
+
const SENTINEL_BRIDGE_GET_ENDPOINTS = new Set([
|
|
289
|
+
'health',
|
|
290
|
+
'capabilities',
|
|
291
|
+
'core/status',
|
|
292
|
+
'core/rules',
|
|
293
|
+
'core/threats',
|
|
294
|
+
]);
|
|
295
|
+
|
|
296
|
+
const SENTINEL_BRIDGE_POST_ENDPOINTS = new Set([
|
|
297
|
+
'evaluate_flow',
|
|
298
|
+
'enforce/dynamic_rule',
|
|
299
|
+
'enforce/throttle',
|
|
300
|
+
'enforce/ips_rule',
|
|
301
|
+
]);
|
|
302
|
+
|
|
303
|
+
function validateLoopbackBridgeUrl(rawUrl, envName) {
|
|
304
|
+
let parsed;
|
|
305
|
+
try {
|
|
306
|
+
parsed = new URL(String(rawUrl || '').trim());
|
|
307
|
+
} catch (_) {
|
|
308
|
+
throw new Error(`Invalid ${envName}: must be a valid loopback HTTP(S) URL.`);
|
|
309
|
+
}
|
|
310
|
+
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
|
311
|
+
throw new Error(`Rejected ${envName}: only http:// or https:// loopback URLs are permitted.`);
|
|
312
|
+
}
|
|
313
|
+
if (parsed.username || parsed.password) {
|
|
314
|
+
throw new Error(`Rejected ${envName}: embedded URL credentials are forbidden.`);
|
|
315
|
+
}
|
|
316
|
+
const host = parsed.hostname.toLowerCase();
|
|
317
|
+
const isLoopback = host === '127.0.0.1' || host === 'localhost' || host === '::1' || host === '[::1]';
|
|
318
|
+
if (!isLoopback) {
|
|
319
|
+
throw new Error(
|
|
320
|
+
`SSRF_BLOCKED: ${envName} must target loopback only (127.0.0.1, localhost, or [::1]); got "${parsed.hostname}".`
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
return `${parsed.protocol}//${parsed.host}`;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
async function invokeLocalBridge(bridgeType, args) {
|
|
327
|
+
const isProlab = bridgeType === 'prolab';
|
|
328
|
+
const urlEnvName = isProlab ? 'PROLAB_BRIDGE_URL' : 'SENTINEL_BRIDGE_URL';
|
|
329
|
+
const tokenEnvName = isProlab ? 'PROLAB_BRIDGE_TOKEN' : 'SENTINEL_BRIDGE_TOKEN';
|
|
330
|
+
const defaultUrl = isProlab ? 'http://127.0.0.1:18765' : 'http://127.0.0.1:18766';
|
|
331
|
+
|
|
332
|
+
let baseUrl;
|
|
333
|
+
try {
|
|
334
|
+
baseUrl = validateLoopbackBridgeUrl(process.env[urlEnvName] || defaultUrl, urlEnvName);
|
|
335
|
+
} catch (err) {
|
|
336
|
+
return { isError: true, content: [{ type: 'text', text: String(err.message || err) }] };
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const token = (process.env[tokenEnvName] || '').trim();
|
|
340
|
+
const confirmAction = args?.confirm_action === true;
|
|
341
|
+
let method = 'GET';
|
|
342
|
+
let path = '';
|
|
343
|
+
let body = undefined;
|
|
344
|
+
let needsAuth = true;
|
|
345
|
+
|
|
346
|
+
if (isProlab) {
|
|
347
|
+
const operation = String(args?.operation || '').trim();
|
|
348
|
+
if (!PROLAB_BRIDGE_ALLOWED_OPS.has(operation)) {
|
|
349
|
+
return { isError: true, content: [{ type: 'text', text: `Unsupported ProLab bridge operation: "${operation}".` }] };
|
|
350
|
+
}
|
|
351
|
+
if (operation === 'health') {
|
|
352
|
+
method = 'GET';
|
|
353
|
+
path = '/v1/health';
|
|
354
|
+
needsAuth = false;
|
|
355
|
+
} else if (operation === 'capabilities') {
|
|
356
|
+
method = 'GET';
|
|
357
|
+
path = '/v1/capabilities';
|
|
358
|
+
} else {
|
|
359
|
+
method = 'POST';
|
|
360
|
+
path = '/v1/execute';
|
|
361
|
+
body = JSON.stringify({ operation, input: args?.input && typeof args.input === 'object' ? args.input : {} });
|
|
362
|
+
}
|
|
363
|
+
} else {
|
|
364
|
+
const endpoint = String(args?.endpoint || '').trim();
|
|
365
|
+
if (SENTINEL_BRIDGE_GET_ENDPOINTS.has(endpoint)) {
|
|
366
|
+
method = 'GET';
|
|
367
|
+
path = `/v1/${endpoint}`;
|
|
368
|
+
needsAuth = endpoint !== 'health';
|
|
369
|
+
} else if (SENTINEL_BRIDGE_POST_ENDPOINTS.has(endpoint)) {
|
|
370
|
+
method = 'POST';
|
|
371
|
+
path = `/v1/${endpoint}`;
|
|
372
|
+
body = JSON.stringify(args?.input && typeof args.input === 'object' ? args.input : {});
|
|
373
|
+
} else {
|
|
374
|
+
return { isError: true, content: [{ type: 'text', text: `Unsupported Sentinel bridge endpoint: "${endpoint}".` }] };
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if (needsAuth && !token) {
|
|
379
|
+
return {
|
|
380
|
+
isError: true,
|
|
381
|
+
content: [{
|
|
382
|
+
type: 'text',
|
|
383
|
+
text: `${tokenEnvName} is not set. Start your local ${isProlab ? 'Android ProLab' : 'Sentinel 2.0'} bridge and configure ${tokenEnvName} in your MCP server environment.`,
|
|
384
|
+
}],
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
const headers = { Accept: 'application/json' };
|
|
389
|
+
if (needsAuth) headers.Authorization = `Bearer ${token}`;
|
|
390
|
+
if (body !== undefined) headers['Content-Type'] = 'application/json';
|
|
391
|
+
if (confirmAction) headers['X-Dexmond-Confirm-Action'] = 'true';
|
|
392
|
+
|
|
393
|
+
const res = await fetch(`${baseUrl}${path}`, {
|
|
394
|
+
method,
|
|
395
|
+
headers,
|
|
396
|
+
body,
|
|
397
|
+
signal: AbortSignal.timeout(15000),
|
|
398
|
+
});
|
|
399
|
+
const text = await res.text();
|
|
400
|
+
let parsed = null;
|
|
401
|
+
try { parsed = JSON.parse(text); } catch (_) {}
|
|
402
|
+
return {
|
|
403
|
+
isError: !res.ok || (parsed && parsed.ok === false),
|
|
404
|
+
content: [{ type: 'text', text: parsed ? JSON.stringify(parsed, null, 2) : text }],
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
|
|
200
408
|
function send(obj) {
|
|
201
409
|
process.stdout.write(JSON.stringify(obj) + '\n');
|
|
202
410
|
}
|
|
@@ -204,6 +412,9 @@ function send(obj) {
|
|
|
204
412
|
const MODULES_URL = API_URL.replace(/\/commerce\.php$/, '/modules.php');
|
|
205
413
|
|
|
206
414
|
async function invokeDexmond(tool, args) {
|
|
415
|
+
if (tool.localBridge) {
|
|
416
|
+
return invokeLocalBridge(tool.localBridge, args || {});
|
|
417
|
+
}
|
|
207
418
|
if (tool.publicDiscovery) {
|
|
208
419
|
const qs = new URLSearchParams();
|
|
209
420
|
if (args?.module) qs.set('module', String(args.module));
|
|
@@ -242,7 +453,7 @@ async function invokeDexmond(tool, args) {
|
|
|
242
453
|
};
|
|
243
454
|
}
|
|
244
455
|
|
|
245
|
-
const SERVER_VERSION = '2.
|
|
456
|
+
const SERVER_VERSION = '2.3.0';
|
|
246
457
|
|
|
247
458
|
const PROMPTS = [
|
|
248
459
|
{
|
|
@@ -270,14 +481,14 @@ const PROMPTS = [
|
|
|
270
481
|
const RESOURCES = [
|
|
271
482
|
{
|
|
272
483
|
uri: 'dexmond://catalog/tools',
|
|
273
|
-
name: 'Dexmond MCP Tool Catalog (
|
|
274
|
-
description: 'Live JSON catalog of all
|
|
484
|
+
name: 'Dexmond MCP Tool Catalog (24 Tools)',
|
|
485
|
+
description: 'Live JSON catalog of all 24 EU-hosted security, AI firewall, SQL, GDPR/AI Act, malware, DevSecOps, and local loopback bridge tools.',
|
|
275
486
|
mimeType: 'application/json',
|
|
276
487
|
},
|
|
277
488
|
{
|
|
278
489
|
uri: 'dexmond://security/benchmark',
|
|
279
490
|
name: 'Dexmond Adversarial Benchmark Metrics',
|
|
280
|
-
description: 'Verified CI benchmark metrics (
|
|
491
|
+
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
492
|
mimeType: 'application/json',
|
|
282
493
|
},
|
|
283
494
|
{
|
|
@@ -369,7 +580,7 @@ rl.on('line', async (line) => {
|
|
|
369
580
|
uri,
|
|
370
581
|
mimeType: 'application/json',
|
|
371
582
|
text: JSON.stringify({
|
|
372
|
-
total_assertions:
|
|
583
|
+
total_assertions: 139,
|
|
373
584
|
prompt_guard_v2: { attacks_caught: '25/25', benign_fpr: '0.0%' },
|
|
374
585
|
shield_dlp_v2: { detectors: 62, recall: '25/25', benign_fpr: '0.0%' },
|
|
375
586
|
mie_malware_hashes: 29737,
|
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.3.0",
|
|
4
|
+
"description": "Official zero-dependency Dexmond Technologies MCP Server — exposes 25 EU-hosted operational security, discovery & loopback edge bridge tools (Sentinel & Android ProLab), 4 slash prompts & 3 resources.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dexmond-mcp": "./index.mjs"
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "com.dexmond/dexmond-mcp",
|
|
4
4
|
"title": "Dexmond Commercial API MCP Server (22 Security, Malware, SQL/RLS & Compliance Tools)",
|
|
5
5
|
"description": "Zero-dependency official MCP server exposing 22 EU-hosted zero-payload-persistence tools: Dexmond Shield DLP v2 (62 detectors + Shannon entropy) & Prompt Guard v2, MIE V1.0 (29,700+ live malware IOCs + static scan), Android ProLab APK Audit, SQL-Alpha RLS Audit, Agent Law EU GDPR/AI Act, CypherNight Crypto/Forensics, Sentinel 2.0 Firewall Compiler, Project Elysium Orbital Decay, Orbital/Global Risk Intel & Zero-Leak AI.",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.3.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.3.0",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
},
|