@danainnovations/cortex-mcp 1.0.88 → 1.0.90
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/dist/{chunk-3X6WPEWI.js → chunk-RB5AKDLX.js} +8 -10
- package/dist/{chunk-3X6WPEWI.js.map → chunk-RB5AKDLX.js.map} +1 -1
- package/dist/cli.js +45 -124
- package/dist/cli.js.map +1 -1
- package/dist/{constants-76SAPZ3D.js → constants-66VQYSV7.js} +4 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +30 -72
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{constants-76SAPZ3D.js.map → constants-66VQYSV7.js.map} +0 -0
|
@@ -8,9 +8,8 @@ import {
|
|
|
8
8
|
DEFAULT_MCPS,
|
|
9
9
|
DEFAULT_SERVER_URL,
|
|
10
10
|
MCP_NAMES,
|
|
11
|
-
PROTOCOL_VERSION
|
|
12
|
-
|
|
13
|
-
} from "./chunk-3X6WPEWI.js";
|
|
11
|
+
PROTOCOL_VERSION
|
|
12
|
+
} from "./chunk-RB5AKDLX.js";
|
|
14
13
|
export {
|
|
15
14
|
AVAILABLE_MCPS,
|
|
16
15
|
CONFIG_DIR_NAME,
|
|
@@ -20,7 +19,6 @@ export {
|
|
|
20
19
|
DEFAULT_MCPS,
|
|
21
20
|
DEFAULT_SERVER_URL,
|
|
22
21
|
MCP_NAMES,
|
|
23
|
-
PROTOCOL_VERSION
|
|
24
|
-
SONANCE_BRAND_CONFIG
|
|
22
|
+
PROTOCOL_VERSION
|
|
25
23
|
};
|
|
26
|
-
//# sourceMappingURL=constants-
|
|
24
|
+
//# sourceMappingURL=constants-66VQYSV7.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -78,29 +78,29 @@ declare function detectClients(): DetectedClient[];
|
|
|
78
78
|
* Uses command/args/env format (Claude Desktop does not support HTTP url/headers).
|
|
79
79
|
* Preserves existing non-Cortex entries.
|
|
80
80
|
*/
|
|
81
|
-
declare function configureClaudeDesktop(_serverUrl: string, apiKey: string, _mcps: string[]
|
|
81
|
+
declare function configureClaudeDesktop(_serverUrl: string, apiKey: string, _mcps: string[]): string;
|
|
82
82
|
/**
|
|
83
83
|
* Configure Claude Code by running `claude mcp add` commands.
|
|
84
84
|
*/
|
|
85
|
-
declare function configureClaudeCode(serverUrl: string, apiKey: string, mcps: string[]
|
|
85
|
+
declare function configureClaudeCode(serverUrl: string, apiKey: string, mcps: string[]): void;
|
|
86
86
|
/**
|
|
87
87
|
* Configure Cursor by writing HTTP MCP entries to its config file.
|
|
88
88
|
* Cursor supports HTTP transport natively.
|
|
89
89
|
*/
|
|
90
|
-
declare function configureCursor(serverUrl: string, apiKey: string, mcps: string[]
|
|
90
|
+
declare function configureCursor(serverUrl: string, apiKey: string, mcps: string[]): void;
|
|
91
91
|
/**
|
|
92
92
|
* Configure Perplexity Computer by generating per-MCP connector instructions.
|
|
93
93
|
* Perplexity uses OAuth + Streamable HTTP — users add connectors manually via UI.
|
|
94
94
|
*/
|
|
95
|
-
declare function configurePerplexity(serverUrl: string, _apiKey: string, mcps: string[]
|
|
95
|
+
declare function configurePerplexity(serverUrl: string, _apiKey: string, mcps: string[]): string;
|
|
96
96
|
/**
|
|
97
97
|
* Generate a stdio config snippet for clients that need it (OpenClaw, etc.)
|
|
98
98
|
*/
|
|
99
|
-
declare function generateStdioSnippet(_apiKey: string
|
|
99
|
+
declare function generateStdioSnippet(_apiKey: string): string;
|
|
100
100
|
/**
|
|
101
101
|
* Configure a specific client type.
|
|
102
102
|
*/
|
|
103
|
-
declare function configureClient(clientType: ClientType, serverUrl: string, apiKey: string, mcps: string[]
|
|
103
|
+
declare function configureClient(clientType: ClientType, serverUrl: string, apiKey: string, mcps: string[]): string;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Validate that a string looks like a Cortex API key.
|
|
@@ -198,6 +198,12 @@ declare const AVAILABLE_MCPS: readonly [{
|
|
|
198
198
|
readonly description: "Expense reports, entries, receipts, approvals (16 tools)";
|
|
199
199
|
readonly serverName: "cortex-concur";
|
|
200
200
|
readonly authMode: "personal";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "sonance_brand";
|
|
203
|
+
readonly displayName: "Sonance Brand";
|
|
204
|
+
readonly description: "Brand guidelines, design tokens, component library, logos (28 tools)";
|
|
205
|
+
readonly serverName: "cortex-sonance-brand";
|
|
206
|
+
readonly authMode: "company";
|
|
201
207
|
}];
|
|
202
208
|
/** All available MCP names */
|
|
203
209
|
declare const MCP_NAMES: string[];
|
package/dist/index.js
CHANGED
|
@@ -93,16 +93,15 @@ var AVAILABLE_MCPS = [
|
|
|
93
93
|
description: "Expense reports, entries, receipts, approvals (16 tools)",
|
|
94
94
|
serverName: "cortex-concur",
|
|
95
95
|
authMode: "personal"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "sonance_brand",
|
|
99
|
+
displayName: "Sonance Brand",
|
|
100
|
+
description: "Brand guidelines, design tokens, component library, logos (28 tools)",
|
|
101
|
+
serverName: "cortex-sonance-brand",
|
|
102
|
+
authMode: "company"
|
|
96
103
|
}
|
|
97
104
|
];
|
|
98
|
-
var SONANCE_BRAND_CONFIG = {
|
|
99
|
-
name: "sonance-brand",
|
|
100
|
-
displayName: "Sonance Brand",
|
|
101
|
-
description: "Brand guidelines, design tokens, component library, logos (28 tools)",
|
|
102
|
-
serverName: "sonance-brand",
|
|
103
|
-
command: "npx",
|
|
104
|
-
args: ["-y", "sonance-brand-mcp@latest"]
|
|
105
|
-
};
|
|
106
105
|
var MCP_NAMES = AVAILABLE_MCPS.map((m) => m.name);
|
|
107
106
|
var DEFAULT_MCPS = [...MCP_NAMES];
|
|
108
107
|
var DEFAULT_API_KEY = "ctx_07d37a81_9f7be06af38d04753090a4034f907a65ec06cd675ed26f65653898388e2d1709";
|
|
@@ -1329,10 +1328,6 @@ function detectClients() {
|
|
|
1329
1328
|
});
|
|
1330
1329
|
return clients;
|
|
1331
1330
|
}
|
|
1332
|
-
function buildSonanceBrandEntry() {
|
|
1333
|
-
const isWindowsTarget = getPlatform() === "windows" || isWSL();
|
|
1334
|
-
return isWindowsTarget ? { command: "cmd", args: ["/c", ...SONANCE_BRAND_CONFIG.args] } : { command: SONANCE_BRAND_CONFIG.command, args: [...SONANCE_BRAND_CONFIG.args] };
|
|
1335
|
-
}
|
|
1336
1331
|
function buildHttpEntries(serverUrl, apiKey, mcps) {
|
|
1337
1332
|
const entries = {};
|
|
1338
1333
|
for (const mcp of AVAILABLE_MCPS) {
|
|
@@ -1344,7 +1339,7 @@ function buildHttpEntries(serverUrl, apiKey, mcps) {
|
|
|
1344
1339
|
}
|
|
1345
1340
|
return entries;
|
|
1346
1341
|
}
|
|
1347
|
-
function configureClaudeDesktop(_serverUrl, apiKey, _mcps
|
|
1342
|
+
function configureClaudeDesktop(_serverUrl, apiKey, _mcps) {
|
|
1348
1343
|
const configPath = getClaudeDesktopConfigPath();
|
|
1349
1344
|
const dir = dirname2(configPath);
|
|
1350
1345
|
if (!existsSync3(dir)) {
|
|
@@ -1380,14 +1375,11 @@ function configureClaudeDesktop(_serverUrl, apiKey, _mcps, includeSonanceBrand =
|
|
|
1380
1375
|
}
|
|
1381
1376
|
const servers = config.mcpServers;
|
|
1382
1377
|
for (const key of Object.keys(servers)) {
|
|
1383
|
-
if (key.startsWith("cortex-") || key === "cortex"
|
|
1378
|
+
if (key.startsWith("cortex-") || key === "cortex") {
|
|
1384
1379
|
delete servers[key];
|
|
1385
1380
|
}
|
|
1386
1381
|
}
|
|
1387
1382
|
servers["cortex"] = cortexEntry;
|
|
1388
|
-
if (includeSonanceBrand) {
|
|
1389
|
-
servers[SONANCE_BRAND_CONFIG.name] = buildSonanceBrandEntry();
|
|
1390
|
-
}
|
|
1391
1383
|
writeFileSync3(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
1392
1384
|
if (getPlatform() === "windows") {
|
|
1393
1385
|
const storePath = getStoreClaudePath();
|
|
@@ -1411,12 +1403,9 @@ function configureClaudeDesktop(_serverUrl, apiKey, _mcps, includeSonanceBrand =
|
|
|
1411
1403
|
}
|
|
1412
1404
|
const altServers = altConfig.mcpServers;
|
|
1413
1405
|
for (const key of Object.keys(altServers)) {
|
|
1414
|
-
if (key.startsWith("cortex-") || key === "cortex"
|
|
1406
|
+
if (key.startsWith("cortex-") || key === "cortex") delete altServers[key];
|
|
1415
1407
|
}
|
|
1416
1408
|
altServers["cortex"] = cortexEntry;
|
|
1417
|
-
if (includeSonanceBrand) {
|
|
1418
|
-
altServers[SONANCE_BRAND_CONFIG.name] = buildSonanceBrandEntry();
|
|
1419
|
-
}
|
|
1420
1409
|
writeFileSync3(altPath, JSON.stringify(altConfig, null, 2) + "\n");
|
|
1421
1410
|
} catch {
|
|
1422
1411
|
}
|
|
@@ -1451,7 +1440,7 @@ function configureClaudeDesktop(_serverUrl, apiKey, _mcps, includeSonanceBrand =
|
|
|
1451
1440
|
`Failed to write config to ${configPath}. Claude Desktop may be overwriting the file. Please close Claude Desktop completely (quit from the system tray), then re-run setup.`
|
|
1452
1441
|
);
|
|
1453
1442
|
}
|
|
1454
|
-
function configureClaudeCode(serverUrl, apiKey, mcps
|
|
1443
|
+
function configureClaudeCode(serverUrl, apiKey, mcps) {
|
|
1455
1444
|
for (const mcp of AVAILABLE_MCPS) {
|
|
1456
1445
|
if (!mcps.includes(mcp.name)) continue;
|
|
1457
1446
|
const url = `${serverUrl}/mcp/${mcp.name}`;
|
|
@@ -1464,18 +1453,8 @@ function configureClaudeCode(serverUrl, apiKey, mcps, includeSonanceBrand = true
|
|
|
1464
1453
|
{ stdio: "pipe" }
|
|
1465
1454
|
);
|
|
1466
1455
|
}
|
|
1467
|
-
if (includeSonanceBrand) {
|
|
1468
|
-
try {
|
|
1469
|
-
execSync2(`claude mcp remove ${SONANCE_BRAND_CONFIG.name}`, { stdio: "pipe" });
|
|
1470
|
-
} catch {
|
|
1471
|
-
}
|
|
1472
|
-
execSync2(
|
|
1473
|
-
`claude mcp add ${SONANCE_BRAND_CONFIG.name} -- ${SONANCE_BRAND_CONFIG.command} ${SONANCE_BRAND_CONFIG.args.join(" ")}`,
|
|
1474
|
-
{ stdio: "pipe" }
|
|
1475
|
-
);
|
|
1476
|
-
}
|
|
1477
1456
|
}
|
|
1478
|
-
function configureCursor(serverUrl, apiKey, mcps
|
|
1457
|
+
function configureCursor(serverUrl, apiKey, mcps) {
|
|
1479
1458
|
const configPath = getCursorConfigPath();
|
|
1480
1459
|
const dir = dirname2(configPath);
|
|
1481
1460
|
if (!existsSync3(dir)) {
|
|
@@ -1493,18 +1472,15 @@ function configureCursor(serverUrl, apiKey, mcps, includeSonanceBrand = true) {
|
|
|
1493
1472
|
}
|
|
1494
1473
|
const servers = config.mcpServers;
|
|
1495
1474
|
for (const key of Object.keys(servers)) {
|
|
1496
|
-
if (key.startsWith("cortex-")
|
|
1475
|
+
if (key.startsWith("cortex-")) {
|
|
1497
1476
|
delete servers[key];
|
|
1498
1477
|
}
|
|
1499
1478
|
}
|
|
1500
1479
|
const entries = buildHttpEntries(serverUrl, apiKey, mcps);
|
|
1501
1480
|
Object.assign(servers, entries);
|
|
1502
|
-
if (includeSonanceBrand) {
|
|
1503
|
-
servers[SONANCE_BRAND_CONFIG.name] = buildSonanceBrandEntry();
|
|
1504
|
-
}
|
|
1505
1481
|
writeFileSync3(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
1506
1482
|
}
|
|
1507
|
-
function configureVSCode(serverUrl, apiKey, mcps
|
|
1483
|
+
function configureVSCode(serverUrl, apiKey, mcps) {
|
|
1508
1484
|
const configPath = getVSCodeMcpConfigPath();
|
|
1509
1485
|
const dir = dirname2(configPath);
|
|
1510
1486
|
if (!existsSync3(dir)) {
|
|
@@ -1522,18 +1498,15 @@ function configureVSCode(serverUrl, apiKey, mcps, includeSonanceBrand = true) {
|
|
|
1522
1498
|
}
|
|
1523
1499
|
const servers = config.mcpServers;
|
|
1524
1500
|
for (const key of Object.keys(servers)) {
|
|
1525
|
-
if (key.startsWith("cortex-")
|
|
1501
|
+
if (key.startsWith("cortex-")) {
|
|
1526
1502
|
delete servers[key];
|
|
1527
1503
|
}
|
|
1528
1504
|
}
|
|
1529
1505
|
const entries = buildHttpEntries(serverUrl, apiKey, mcps);
|
|
1530
1506
|
Object.assign(servers, entries);
|
|
1531
|
-
if (includeSonanceBrand) {
|
|
1532
|
-
servers[SONANCE_BRAND_CONFIG.name] = buildSonanceBrandEntry();
|
|
1533
|
-
}
|
|
1534
1507
|
writeFileSync3(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
1535
1508
|
}
|
|
1536
|
-
function configureAntigravity(serverUrl, apiKey, mcps
|
|
1509
|
+
function configureAntigravity(serverUrl, apiKey, mcps) {
|
|
1537
1510
|
const configPath = getAntigravityConfigPath();
|
|
1538
1511
|
const dir = dirname2(configPath);
|
|
1539
1512
|
if (!existsSync3(dir)) {
|
|
@@ -1551,18 +1524,15 @@ function configureAntigravity(serverUrl, apiKey, mcps, includeSonanceBrand = tru
|
|
|
1551
1524
|
}
|
|
1552
1525
|
const servers = config.mcpServers;
|
|
1553
1526
|
for (const key of Object.keys(servers)) {
|
|
1554
|
-
if (key.startsWith("cortex-")
|
|
1527
|
+
if (key.startsWith("cortex-")) {
|
|
1555
1528
|
delete servers[key];
|
|
1556
1529
|
}
|
|
1557
1530
|
}
|
|
1558
1531
|
const entries = buildHttpEntries(serverUrl, apiKey, mcps);
|
|
1559
1532
|
Object.assign(servers, entries);
|
|
1560
|
-
if (includeSonanceBrand) {
|
|
1561
|
-
servers[SONANCE_BRAND_CONFIG.name] = buildSonanceBrandEntry();
|
|
1562
|
-
}
|
|
1563
1533
|
writeFileSync3(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
1564
1534
|
}
|
|
1565
|
-
function configureCodex(serverUrl, apiKey, mcps
|
|
1535
|
+
function configureCodex(serverUrl, apiKey, mcps) {
|
|
1566
1536
|
const configPath = getCodexConfigPath();
|
|
1567
1537
|
const dir = dirname2(configPath);
|
|
1568
1538
|
if (!existsSync3(dir)) {
|
|
@@ -1576,7 +1546,7 @@ function configureCodex(serverUrl, apiKey, mcps, includeSonanceBrand = true) {
|
|
|
1576
1546
|
}
|
|
1577
1547
|
}
|
|
1578
1548
|
const cleaned = existingContent.replace(
|
|
1579
|
-
/\[mcp_servers\.
|
|
1549
|
+
/\[mcp_servers\.cortex-[^\]]*\][^[]*(?=\[|$)/g,
|
|
1580
1550
|
""
|
|
1581
1551
|
).trim();
|
|
1582
1552
|
const tomlEntries = [];
|
|
@@ -1588,17 +1558,10 @@ url = "${serverUrl}/mcp/${mcp.name}"
|
|
|
1588
1558
|
http_headers = { "x-api-key" = "${apiKey}" }`
|
|
1589
1559
|
);
|
|
1590
1560
|
}
|
|
1591
|
-
if (includeSonanceBrand) {
|
|
1592
|
-
tomlEntries.push(
|
|
1593
|
-
`[mcp_servers.${SONANCE_BRAND_CONFIG.name}]
|
|
1594
|
-
command = "${SONANCE_BRAND_CONFIG.command}"
|
|
1595
|
-
args = [${SONANCE_BRAND_CONFIG.args.map((a) => `"${a}"`).join(", ")}]`
|
|
1596
|
-
);
|
|
1597
|
-
}
|
|
1598
1561
|
const newContent = (cleaned ? cleaned + "\n\n" : "") + tomlEntries.join("\n\n") + "\n";
|
|
1599
1562
|
writeFileSync3(configPath, newContent);
|
|
1600
1563
|
}
|
|
1601
|
-
function configurePerplexity(serverUrl, _apiKey, mcps
|
|
1564
|
+
function configurePerplexity(serverUrl, _apiKey, mcps) {
|
|
1602
1565
|
const lines = [
|
|
1603
1566
|
"Add each MCP as a separate connector in Perplexity:",
|
|
1604
1567
|
" Settings \u2192 Connectors \u2192 Add custom connector",
|
|
@@ -1615,11 +1578,9 @@ function configurePerplexity(serverUrl, _apiKey, mcps, _includeSonanceBrand = tr
|
|
|
1615
1578
|
lines.push(` Transport: Streamable HTTP`);
|
|
1616
1579
|
lines.push("");
|
|
1617
1580
|
}
|
|
1618
|
-
lines.push("Note: Sonance Brand MCP requires stdio transport (npx sonance-brand-mcp).");
|
|
1619
|
-
lines.push("Perplexity may not support stdio \u2014 use Claude Desktop or Claude Code for brand tools.");
|
|
1620
1581
|
return lines.join("\n");
|
|
1621
1582
|
}
|
|
1622
|
-
function generateStdioSnippet(_apiKey
|
|
1583
|
+
function generateStdioSnippet(_apiKey) {
|
|
1623
1584
|
const isWindowsTarget = getPlatform() === "windows" || isWSL();
|
|
1624
1585
|
const config = {
|
|
1625
1586
|
mcpServers: {
|
|
@@ -1632,36 +1593,33 @@ function generateStdioSnippet(_apiKey, includeSonanceBrand = true) {
|
|
|
1632
1593
|
}
|
|
1633
1594
|
}
|
|
1634
1595
|
};
|
|
1635
|
-
if (includeSonanceBrand) {
|
|
1636
|
-
config.mcpServers[SONANCE_BRAND_CONFIG.name] = buildSonanceBrandEntry();
|
|
1637
|
-
}
|
|
1638
1596
|
return JSON.stringify(config, null, 2);
|
|
1639
1597
|
}
|
|
1640
|
-
function configureClient(clientType, serverUrl, apiKey, mcps
|
|
1598
|
+
function configureClient(clientType, serverUrl, apiKey, mcps) {
|
|
1641
1599
|
switch (clientType) {
|
|
1642
1600
|
case "claude-desktop": {
|
|
1643
|
-
const path = configureClaudeDesktop(serverUrl, apiKey, mcps
|
|
1601
|
+
const path = configureClaudeDesktop(serverUrl, apiKey, mcps);
|
|
1644
1602
|
return `Claude Desktop configured (${path})`;
|
|
1645
1603
|
}
|
|
1646
1604
|
case "claude-code":
|
|
1647
|
-
configureClaudeCode(serverUrl, apiKey, mcps
|
|
1605
|
+
configureClaudeCode(serverUrl, apiKey, mcps);
|
|
1648
1606
|
return "Claude Code configured";
|
|
1649
1607
|
case "cursor":
|
|
1650
|
-
configureCursor(serverUrl, apiKey, mcps
|
|
1608
|
+
configureCursor(serverUrl, apiKey, mcps);
|
|
1651
1609
|
return "Cursor configured";
|
|
1652
1610
|
case "vscode":
|
|
1653
|
-
configureVSCode(serverUrl, apiKey, mcps
|
|
1611
|
+
configureVSCode(serverUrl, apiKey, mcps);
|
|
1654
1612
|
return "VS Code configured";
|
|
1655
1613
|
case "antigravity":
|
|
1656
|
-
configureAntigravity(serverUrl, apiKey, mcps
|
|
1614
|
+
configureAntigravity(serverUrl, apiKey, mcps);
|
|
1657
1615
|
return "Antigravity configured";
|
|
1658
1616
|
case "codex":
|
|
1659
|
-
configureCodex(serverUrl, apiKey, mcps
|
|
1617
|
+
configureCodex(serverUrl, apiKey, mcps);
|
|
1660
1618
|
return "Codex configured";
|
|
1661
1619
|
case "perplexity":
|
|
1662
|
-
return configurePerplexity(serverUrl, apiKey, mcps
|
|
1620
|
+
return configurePerplexity(serverUrl, apiKey, mcps);
|
|
1663
1621
|
case "stdio":
|
|
1664
|
-
return "Add this to your client config:\n\n" + generateStdioSnippet(apiKey
|
|
1622
|
+
return "Add this to your client config:\n\n" + generateStdioSnippet(apiKey);
|
|
1665
1623
|
}
|
|
1666
1624
|
}
|
|
1667
1625
|
|