@danainnovations/cortex-mcp 1.0.74 → 1.0.76

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/index.d.ts CHANGED
@@ -45,7 +45,7 @@ interface StdioServerOptions {
45
45
  declare function startStdioServer(options: StdioServerOptions): Promise<void>;
46
46
 
47
47
  /** Supported AI client types */
48
- type ClientType = "claude-desktop" | "claude-code" | "cursor" | "vscode" | "antigravity" | "codex" | "stdio";
48
+ type ClientType = "claude-desktop" | "claude-code" | "cursor" | "vscode" | "antigravity" | "codex" | "perplexity" | "stdio";
49
49
  /** Stored configuration */
50
50
  interface CortexMcpConfig {
51
51
  version: number;
@@ -88,6 +88,11 @@ declare function configureClaudeCode(serverUrl: string, apiKey: string, mcps: st
88
88
  * Cursor supports HTTP transport natively.
89
89
  */
90
90
  declare function configureCursor(serverUrl: string, apiKey: string, mcps: string[]): void;
91
+ /**
92
+ * Configure Perplexity Computer by generating per-MCP connector instructions.
93
+ * Perplexity uses OAuth + Streamable HTTP — users add connectors manually via UI.
94
+ */
95
+ declare function configurePerplexity(serverUrl: string, _apiKey: string, mcps: string[]): string;
91
96
  /**
92
97
  * Generate a stdio config snippet for clients that need it (OpenClaw, etc.)
93
98
  */
@@ -332,4 +337,4 @@ declare class CortexClient {
332
337
  private getNamespace;
333
338
  }
334
339
 
335
- export { AVAILABLE_MCPS, type ClientType, CortexClient, type CortexClientOptions, type CortexCredentials, CortexError, CortexHttpClient, type CortexMcpConfig, CortexNetworkError, CortexToolError, DEFAULT_API_KEY, DEFAULT_SERVER_URL, type DetectedClient, MCPNamespace, MCP_NAMES, type ToolInfo, configureClaudeCode, configureClaudeDesktop, configureClient, configureCursor, createConfig, detectClients, generateStdioSnippet, getEffectiveApiKey, isValidApiKey, readConfig, readCredentials, startStdioServer, validateApiKeyRemote, writeConfig };
340
+ export { AVAILABLE_MCPS, type ClientType, CortexClient, type CortexClientOptions, type CortexCredentials, CortexError, CortexHttpClient, type CortexMcpConfig, CortexNetworkError, CortexToolError, DEFAULT_API_KEY, DEFAULT_SERVER_URL, type DetectedClient, MCPNamespace, MCP_NAMES, type ToolInfo, configureClaudeCode, configureClaudeDesktop, configureClient, configureCursor, configurePerplexity, createConfig, detectClients, generateStdioSnippet, getEffectiveApiKey, isValidApiKey, readConfig, readCredentials, startStdioServer, validateApiKeyRemote, writeConfig };
package/dist/index.js CHANGED
@@ -1241,6 +1241,13 @@ function detectClients() {
1241
1241
  configPath: codexPath,
1242
1242
  detected: codexDetected
1243
1243
  });
1244
+ const perplexityDir = join4(home, "Library", "Containers", "ai.perplexity.mac");
1245
+ clients.push({
1246
+ type: "perplexity",
1247
+ name: "Perplexity Computer",
1248
+ configPath: null,
1249
+ detected: getPlatform() === "macos" && existsSync3(perplexityDir)
1250
+ });
1244
1251
  clients.push({
1245
1252
  type: "stdio",
1246
1253
  name: "OpenClaw (stdio)",
@@ -1413,6 +1420,25 @@ http_headers = { "x-api-key" = "${apiKey}" }`
1413
1420
  const newContent = (cleaned ? cleaned + "\n\n" : "") + tomlEntries.join("\n\n") + "\n";
1414
1421
  writeFileSync3(configPath, newContent);
1415
1422
  }
1423
+ function configurePerplexity(serverUrl, _apiKey, mcps) {
1424
+ const lines = [
1425
+ "Add each MCP as a separate connector in Perplexity:",
1426
+ " Settings \u2192 Connectors \u2192 Add custom connector",
1427
+ ""
1428
+ ];
1429
+ for (const mcp of AVAILABLE_MCPS) {
1430
+ if (!mcps.includes(mcp.name)) continue;
1431
+ lines.push(`\u2500\u2500 ${mcp.displayName} \u2500\u2500`);
1432
+ lines.push(` Name: Cortex ${mcp.displayName}`);
1433
+ lines.push(` MCP server URL: ${serverUrl}/mcp/${mcp.name}`);
1434
+ lines.push(` Authentication: OAuth`);
1435
+ lines.push(` Client ID: perplexity`);
1436
+ lines.push(` Client Secret: (leave empty)`);
1437
+ lines.push(` Transport: Streamable HTTP`);
1438
+ lines.push("");
1439
+ }
1440
+ return lines.join("\n");
1441
+ }
1416
1442
  function generateStdioSnippet(_apiKey) {
1417
1443
  const isWindows = getPlatform() === "windows";
1418
1444
  const config = {
@@ -1448,6 +1474,8 @@ function configureClient(clientType, serverUrl, apiKey, mcps) {
1448
1474
  case "codex":
1449
1475
  configureCodex(serverUrl, apiKey, mcps);
1450
1476
  return "Codex configured";
1477
+ case "perplexity":
1478
+ return configurePerplexity(serverUrl, apiKey, mcps);
1451
1479
  case "stdio":
1452
1480
  return "Add this to your client config:\n\n" + generateStdioSnippet(apiKey);
1453
1481
  }
@@ -1703,6 +1731,7 @@ export {
1703
1731
  configureClaudeDesktop,
1704
1732
  configureClient,
1705
1733
  configureCursor,
1734
+ configurePerplexity,
1706
1735
  createConfig,
1707
1736
  detectClients,
1708
1737
  generateStdioSnippet,