@danainnovations/cortex-mcp 1.0.102 → 1.0.104
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/browser-QVN3U6IX.js +8 -0
- package/dist/{chunk-RB5AKDLX.js → chunk-35KL5IIO.js} +2 -2
- package/dist/{chunk-RB5AKDLX.js.map → chunk-35KL5IIO.js.map} +1 -1
- package/dist/{chunk-BAM6HEKA.js → chunk-IP6OU4O3.js} +5 -1
- package/dist/chunk-IP6OU4O3.js.map +1 -0
- package/dist/cli.js +117 -11
- package/dist/cli.js.map +1 -1
- package/dist/{constants-66VQYSV7.js → constants-AJADVACN.js} +2 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.js +82 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser-AJPM6AK7.js +0 -8
- package/dist/chunk-BAM6HEKA.js.map +0 -1
- /package/dist/{browser-AJPM6AK7.js.map → browser-QVN3U6IX.js.map} +0 -0
- /package/dist/{constants-66VQYSV7.js.map → constants-AJADVACN.js.map} +0 -0
|
@@ -106,7 +106,7 @@ var AVAILABLE_MCPS = [
|
|
|
106
106
|
];
|
|
107
107
|
var MCP_NAMES = AVAILABLE_MCPS.map((m) => m.name);
|
|
108
108
|
var DEFAULT_MCPS = [...MCP_NAMES];
|
|
109
|
-
var DEFAULT_API_KEY = "
|
|
109
|
+
var DEFAULT_API_KEY = "";
|
|
110
110
|
var CONFIG_DIR_NAME = ".cortex-mcp";
|
|
111
111
|
var CONFIG_FILE_NAME = "config.json";
|
|
112
112
|
var CREDENTIALS_FILE_NAME = "credentials.json";
|
|
@@ -122,4 +122,4 @@ export {
|
|
|
122
122
|
CONFIG_FILE_NAME,
|
|
123
123
|
CREDENTIALS_FILE_NAME
|
|
124
124
|
};
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
125
|
+
//# sourceMappingURL=chunk-35KL5IIO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["/** Default Cortex server URL */\nexport const DEFAULT_SERVER_URL = \"https://cortex-bice.vercel.app\";\n\n/** MCP protocol version supported by Cortex (Streamable HTTP) */\nexport const PROTOCOL_VERSION = \"2025-03-26\";\n\n/** Available MCPs with their metadata */\nexport const AVAILABLE_MCPS = [\n {\n name: \"m365\",\n displayName: \"Microsoft 365\",\n description: \"Email, calendar, OneDrive, Teams, meetings, contacts, tasks, notes (33 tools)\",\n serverName: \"cortex-m365\",\n authMode: \"personal\" as const,\n },\n {\n name: \"asana\",\n displayName: \"Asana\",\n description: \"Projects, tasks, teams, workspaces (17 tools)\",\n serverName: \"cortex-asana\",\n authMode: \"personal\" as const,\n },\n {\n name: \"github\",\n displayName: \"GitHub\",\n description: \"Repos, PRs, issues, branches, code review (30 tools)\",\n serverName: \"cortex-github\",\n authMode: \"company\" as const,\n },\n {\n name: \"vercel\",\n displayName: \"Vercel\",\n description: \"Deployments, projects, env vars (15 tools)\",\n serverName: \"cortex-vercel\",\n authMode: \"company\" as const,\n },\n {\n name: \"supabase\",\n displayName: \"Supabase\",\n description: \"Database, migrations, edge functions (20+ tools)\",\n serverName: \"cortex-supabase\",\n authMode: \"company\" as const,\n },\n {\n name: \"bestbuy\",\n displayName: \"Best Buy\",\n description: \"Product search, pricing, reviews, store locations (7 tools)\",\n serverName: \"cortex-bestbuy\",\n authMode: \"company\" as const,\n },\n {\n name: \"mailchimp\",\n displayName: \"Mailchimp\",\n description: \"Audiences, contacts, campaigns, templates, analytics (28 tools)\",\n serverName: \"cortex-mailchimp\",\n authMode: \"personal\" as const,\n },\n {\n name: \"salesforce\",\n displayName: \"Salesforce\",\n description: \"CRM queries, records, reports, and org data (14 tools)\",\n serverName: \"cortex-salesforce\",\n authMode: \"personal\" as const,\n },\n {\n name: \"monday\",\n displayName: \"Monday.com\",\n description: \"Boards, items, groups, updates, workspaces (18 tools)\",\n serverName: \"cortex-monday\",\n authMode: \"personal\" as const,\n installUrl: \"https://auth.monday.com/oauth2/authorize?client_id=c8d2c70bd792a4c36c6f023c0b707517&response_type=install\",\n },\n {\n name: \"slack\",\n displayName: \"Slack\",\n description: \"Messaging, channels, search, reactions, bookmarks (22 tools)\",\n serverName: \"cortex-slack\",\n authMode: \"personal\" as const,\n },\n {\n name: \"powerbi\",\n displayName: \"Power BI\",\n description: \"Workspaces, datasets, push data, DAX queries, reports, dashboards (14 tools)\",\n serverName: \"cortex-powerbi\",\n authMode: \"personal\" as const,\n },\n {\n name: \"databricks\",\n displayName: \"Databricks\",\n description: \"Unity Catalog discovery, SQL queries, data dictionary, jobs (18 tools)\",\n serverName: \"cortex-databricks\",\n authMode: \"company\" as const,\n },\n {\n name: \"concur\",\n displayName: \"SAP Concur\",\n description: \"Expense reports, entries, receipts, approvals (16 tools)\",\n serverName: \"cortex-concur\",\n authMode: \"personal\" as const,\n },\n {\n name: \"sonance_brand\",\n displayName: \"Sonance Brand\",\n description: \"Brand guidelines, design tokens, component library, logos (28 tools)\",\n serverName: \"cortex-sonance-brand\",\n authMode: \"company\" as const,\n },\n] as const;\n\n/** All available MCP names */\nexport const MCP_NAMES: string[] = AVAILABLE_MCPS.map((m) => m.name);\n\n/** Default MCPs enabled on fresh setup */\nexport const DEFAULT_MCPS: string[] = [...MCP_NAMES];\n\n/** Shared
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["/** Default Cortex server URL */\nexport const DEFAULT_SERVER_URL = \"https://cortex-bice.vercel.app\";\n\n/** MCP protocol version supported by Cortex (Streamable HTTP) */\nexport const PROTOCOL_VERSION = \"2025-03-26\";\n\n/** Available MCPs with their metadata */\nexport const AVAILABLE_MCPS = [\n {\n name: \"m365\",\n displayName: \"Microsoft 365\",\n description: \"Email, calendar, OneDrive, Teams, meetings, contacts, tasks, notes (33 tools)\",\n serverName: \"cortex-m365\",\n authMode: \"personal\" as const,\n },\n {\n name: \"asana\",\n displayName: \"Asana\",\n description: \"Projects, tasks, teams, workspaces (17 tools)\",\n serverName: \"cortex-asana\",\n authMode: \"personal\" as const,\n },\n {\n name: \"github\",\n displayName: \"GitHub\",\n description: \"Repos, PRs, issues, branches, code review (30 tools)\",\n serverName: \"cortex-github\",\n authMode: \"company\" as const,\n },\n {\n name: \"vercel\",\n displayName: \"Vercel\",\n description: \"Deployments, projects, env vars (15 tools)\",\n serverName: \"cortex-vercel\",\n authMode: \"company\" as const,\n },\n {\n name: \"supabase\",\n displayName: \"Supabase\",\n description: \"Database, migrations, edge functions (20+ tools)\",\n serverName: \"cortex-supabase\",\n authMode: \"company\" as const,\n },\n {\n name: \"bestbuy\",\n displayName: \"Best Buy\",\n description: \"Product search, pricing, reviews, store locations (7 tools)\",\n serverName: \"cortex-bestbuy\",\n authMode: \"company\" as const,\n },\n {\n name: \"mailchimp\",\n displayName: \"Mailchimp\",\n description: \"Audiences, contacts, campaigns, templates, analytics (28 tools)\",\n serverName: \"cortex-mailchimp\",\n authMode: \"personal\" as const,\n },\n {\n name: \"salesforce\",\n displayName: \"Salesforce\",\n description: \"CRM queries, records, reports, and org data (14 tools)\",\n serverName: \"cortex-salesforce\",\n authMode: \"personal\" as const,\n },\n {\n name: \"monday\",\n displayName: \"Monday.com\",\n description: \"Boards, items, groups, updates, workspaces (18 tools)\",\n serverName: \"cortex-monday\",\n authMode: \"personal\" as const,\n installUrl: \"https://auth.monday.com/oauth2/authorize?client_id=c8d2c70bd792a4c36c6f023c0b707517&response_type=install\",\n },\n {\n name: \"slack\",\n displayName: \"Slack\",\n description: \"Messaging, channels, search, reactions, bookmarks (22 tools)\",\n serverName: \"cortex-slack\",\n authMode: \"personal\" as const,\n },\n {\n name: \"powerbi\",\n displayName: \"Power BI\",\n description: \"Workspaces, datasets, push data, DAX queries, reports, dashboards (14 tools)\",\n serverName: \"cortex-powerbi\",\n authMode: \"personal\" as const,\n },\n {\n name: \"databricks\",\n displayName: \"Databricks\",\n description: \"Unity Catalog discovery, SQL queries, data dictionary, jobs (18 tools)\",\n serverName: \"cortex-databricks\",\n authMode: \"company\" as const,\n },\n {\n name: \"concur\",\n displayName: \"SAP Concur\",\n description: \"Expense reports, entries, receipts, approvals (16 tools)\",\n serverName: \"cortex-concur\",\n authMode: \"personal\" as const,\n },\n {\n name: \"sonance_brand\",\n displayName: \"Sonance Brand\",\n description: \"Brand guidelines, design tokens, component library, logos (28 tools)\",\n serverName: \"cortex-sonance-brand\",\n authMode: \"company\" as const,\n },\n] as const;\n\n/** All available MCP names */\nexport const MCP_NAMES: string[] = AVAILABLE_MCPS.map((m) => m.name);\n\n/** Default MCPs enabled on fresh setup */\nexport const DEFAULT_MCPS: string[] = [...MCP_NAMES];\n\n/** @deprecated Shared default key removed — users must run `cortex-mcp login` */\nexport const DEFAULT_API_KEY = \"\";\n\n/** Config directory name */\nexport const CONFIG_DIR_NAME = \".cortex-mcp\";\n\n/** Config file name */\nexport const CONFIG_FILE_NAME = \"config.json\";\n\n/** Credentials file name (stores personal API key from login) */\nexport const CREDENTIALS_FILE_NAME = \"credentials.json\";\n"],"mappings":";;;AACO,IAAM,qBAAqB;AAG3B,IAAM,mBAAmB;AAGzB,IAAM,iBAAiB;AAAA,EAC5B;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;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
|
|
|
128
128
|
`);
|
|
129
129
|
process.stderr.write(` Please visit: ${url}
|
|
130
130
|
`);
|
|
131
|
+
if (process.platform === "win32") {
|
|
132
|
+
process.stderr.write(` (Error: ${err.message})
|
|
133
|
+
`);
|
|
134
|
+
}
|
|
131
135
|
}
|
|
132
136
|
resolve();
|
|
133
137
|
});
|
|
@@ -147,4 +151,4 @@ export {
|
|
|
147
151
|
getCodexConfigPath,
|
|
148
152
|
openBrowser
|
|
149
153
|
};
|
|
150
|
-
//# sourceMappingURL=chunk-
|
|
154
|
+
//# sourceMappingURL=chunk-IP6OU4O3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/browser.ts","../src/utils/platform.ts"],"sourcesContent":["import { exec } from \"node:child_process\";\nimport { getPlatform } from \"./platform.js\";\n\nexport function openBrowser(url: string): Promise<void> {\n return new Promise((resolve) => {\n const platform = getPlatform();\n const cmd =\n platform === \"macos\" ? `open \"${url}\"` :\n platform === \"windows\" ? `start \"\" \"${url}\"` :\n `xdg-open \"${url}\"`;\n exec(cmd, (err) => {\n if (err) {\n process.stderr.write(` Could not open browser automatically.\\n`);\n process.stderr.write(` Please visit: ${url}\\n`);\n if (process.platform === \"win32\") {\n process.stderr.write(` (Error: ${err.message})\\n`);\n }\n }\n resolve();\n });\n });\n}\n","import { homedir, platform } from \"node:os\";\nimport { join } from \"node:path\";\nimport { readFileSync, readdirSync } from \"node:fs\";\nimport { execSync } from \"node:child_process\";\n\n/** Get the user's home directory */\nexport function getHomeDir(): string {\n return homedir();\n}\n\n/** Get the current platform */\nexport function getPlatform(): \"macos\" | \"windows\" | \"linux\" {\n const p = platform();\n if (p === \"darwin\") return \"macos\";\n if (p === \"win32\") return \"windows\";\n return \"linux\";\n}\n\n/** Detect if running inside Windows Subsystem for Linux */\nexport function isWSL(): boolean {\n if (getPlatform() !== \"linux\") return false;\n try {\n const version = readFileSync(\"/proc/version\", \"utf-8\");\n return /microsoft|wsl/i.test(version);\n } catch {\n return false;\n }\n}\n\n/** Resolve the Windows user home directory from within WSL via /mnt/c */\nfunction getWindowsHomeFromWSL(): string | null {\n try {\n // Try cmd.exe to get the Windows USERNAME\n const raw = execSync(\"cmd.exe /c echo %USERNAME%\", {\n stdio: [\"pipe\", \"pipe\", \"pipe\"],\n timeout: 5000,\n }).toString().trim().replace(/\\r/g, \"\");\n if (raw && raw !== \"%USERNAME%\") {\n return `/mnt/c/Users/${raw}`;\n }\n } catch {\n // cmd.exe may not be available — fall through\n }\n\n try {\n // Fallback: scan /mnt/c/Users for a single non-system user directory\n const dirs = readdirSync(\"/mnt/c/Users\").filter(\n (d) =>\n d !== \"Public\" &&\n d !== \"Default\" &&\n d !== \"Default User\" &&\n d !== \"All Users\" &&\n !d.startsWith(\".\")\n );\n if (dirs.length === 1) return `/mnt/c/Users/${dirs[0]}`;\n } catch {\n // /mnt/c not mounted\n }\n\n return null;\n}\n\n/**\n * Detect Microsoft Store Claude Desktop install path.\n * Store apps use a virtualized filesystem under LocalCache\\Roaming.\n */\nexport function getStoreClaudePath(): string | null {\n try {\n const localAppData = process.env.LOCALAPPDATA || join(homedir(), \"AppData\", \"Local\");\n const packagesDir = join(localAppData, \"Packages\");\n const dirs = readdirSync(packagesDir).filter((d) => d.startsWith(\"Claude_\"));\n if (dirs.length > 0) {\n return join(\n packagesDir,\n dirs[0],\n \"LocalCache\",\n \"Roaming\",\n \"Claude\",\n \"claude_desktop_config.json\"\n );\n }\n } catch {\n // Not a Store install or can't read Packages dir\n }\n return null;\n}\n\n/**\n * Get the standard (non-Store) Claude Desktop config path on Windows.\n */\nexport function getStandardClaudeDesktopPath(): string {\n const home = homedir();\n return join(\n process.env.APPDATA || join(home, \"AppData\", \"Roaming\"),\n \"Claude\",\n \"claude_desktop_config.json\"\n );\n}\n\n/**\n * Get the Claude Desktop config file path for the current platform.\n * On Windows, prefers the Microsoft Store virtualized path if detected.\n */\nexport function getClaudeDesktopConfigPath(): string {\n const home = getHomeDir();\n const p = getPlatform();\n\n // WSL: Claude Desktop is a Windows app — write to the Windows AppData path\n if (p === \"linux\" && isWSL()) {\n const winHome = getWindowsHomeFromWSL();\n if (winHome) {\n return join(winHome, \"AppData\", \"Roaming\", \"Claude\", \"claude_desktop_config.json\");\n }\n }\n\n switch (p) {\n case \"macos\":\n return join(\n home,\n \"Library\",\n \"Application Support\",\n \"Claude\",\n \"claude_desktop_config.json\"\n );\n case \"windows\": {\n // Prefer Microsoft Store path if installed (virtualized filesystem)\n const storePath = getStoreClaudePath();\n if (storePath) return storePath;\n return getStandardClaudeDesktopPath();\n }\n case \"linux\":\n return join(home, \".config\", \"Claude\", \"claude_desktop_config.json\");\n }\n}\n\n/**\n * Get the Cursor MCP config file path for the current platform.\n */\nexport function getCursorConfigPath(): string {\n const home = getHomeDir();\n return join(home, \".cursor\", \"mcp.json\");\n}\n\n/**\n * Get the VS Code MCP config file path for the current platform.\n */\nexport function getVSCodeMcpConfigPath(): string {\n const home = getHomeDir();\n return join(home, \".vscode\", \"mcp.json\");\n}\n\n/**\n * Get the Antigravity MCP config file path for the current platform.\n */\nexport function getAntigravityConfigPath(): string {\n const home = getHomeDir();\n return join(home, \".gemini\", \"antigravity\", \"mcp_config.json\");\n}\n\n/**\n * Get the Codex (OpenAI) config file path.\n * Shared by both Codex CLI and Codex IDE extension.\n */\nexport function getCodexConfigPath(): string {\n const home = getHomeDir();\n return join(home, \".codex\", \"config.toml\");\n}\n"],"mappings":";;;AAAA,SAAS,YAAY;;;ACArB,SAAS,SAAS,gBAAgB;AAClC,SAAS,YAAY;AACrB,SAAS,cAAc,mBAAmB;AAC1C,SAAS,gBAAgB;AAGlB,SAAS,aAAqB;AACnC,SAAO,QAAQ;AACjB;AAGO,SAAS,cAA6C;AAC3D,QAAM,IAAI,SAAS;AACnB,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,QAAS,QAAO;AAC1B,SAAO;AACT;AAGO,SAAS,QAAiB;AAC/B,MAAI,YAAY,MAAM,QAAS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QAAQ,aAAa,SAAS;AAChC,kBAAQ,OAAO,MAAM,aAAa,IAAI,OAAO;AAAA,CAAK;AAAA,QACpD;AAAA,MACF;AACA,cAAQ;AAAA,IACV,CAAC;AAAA,EACH,CAAC;AACH;","names":["platform"]}
|
package/dist/cli.js
CHANGED
|
@@ -4,12 +4,11 @@ import {
|
|
|
4
4
|
CONFIG_DIR_NAME,
|
|
5
5
|
CONFIG_FILE_NAME,
|
|
6
6
|
CREDENTIALS_FILE_NAME,
|
|
7
|
-
DEFAULT_API_KEY,
|
|
8
7
|
DEFAULT_MCPS,
|
|
9
8
|
DEFAULT_SERVER_URL,
|
|
10
9
|
MCP_NAMES,
|
|
11
10
|
PROTOCOL_VERSION
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-35KL5IIO.js";
|
|
13
12
|
import {
|
|
14
13
|
getAntigravityConfigPath,
|
|
15
14
|
getClaudeDesktopConfigPath,
|
|
@@ -22,7 +21,7 @@ import {
|
|
|
22
21
|
getVSCodeMcpConfigPath,
|
|
23
22
|
isWSL,
|
|
24
23
|
openBrowser
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-IP6OU4O3.js";
|
|
26
25
|
|
|
27
26
|
// bin/cli.ts
|
|
28
27
|
import { Command } from "commander";
|
|
@@ -2301,7 +2300,7 @@ function getEffectiveApiKey() {
|
|
|
2301
2300
|
if (creds?.apiKey) return creds.apiKey;
|
|
2302
2301
|
const config = readConfig();
|
|
2303
2302
|
if (config?.apiKey) return config.apiKey;
|
|
2304
|
-
return
|
|
2303
|
+
return "";
|
|
2305
2304
|
}
|
|
2306
2305
|
|
|
2307
2306
|
// src/wizard/routes.ts
|
|
@@ -2673,7 +2672,14 @@ async function runSetup() {
|
|
|
2673
2672
|
log(" If the browser didn't open, visit:");
|
|
2674
2673
|
log(` ${url}`);
|
|
2675
2674
|
log("");
|
|
2676
|
-
|
|
2675
|
+
if (process.platform === "win32") {
|
|
2676
|
+
log(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
2677
|
+
log(" The setup wizard is running in your browser.");
|
|
2678
|
+
log(" Keep this window open until setup completes.");
|
|
2679
|
+
log(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
2680
|
+
} else {
|
|
2681
|
+
log(" Waiting for setup to complete (press Ctrl+C to cancel)...");
|
|
2682
|
+
}
|
|
2677
2683
|
const cleanup = async () => {
|
|
2678
2684
|
log("\n Setup cancelled.");
|
|
2679
2685
|
await close();
|
|
@@ -3724,6 +3730,79 @@ async function startStdioServer(options) {
|
|
|
3724
3730
|
}
|
|
3725
3731
|
initialized = true;
|
|
3726
3732
|
}
|
|
3733
|
+
const VIBE_CODING_GUIDE_TOOL = {
|
|
3734
|
+
name: "vibe_coding_guide",
|
|
3735
|
+
description: "IMPORTANT: Call this tool FIRST before building any new application. Returns the required Cortex workflow for creating branded, production-ready apps deployed to Vercel with GitHub, Supabase, and Sonance Brand integration. This ensures every app follows the correct pipeline: branded proof-of-concept \u2192 user approval \u2192 infrastructure setup \u2192 code with brand components \u2192 deploy \u2192 verify.",
|
|
3736
|
+
inputSchema: {
|
|
3737
|
+
type: "object",
|
|
3738
|
+
properties: {
|
|
3739
|
+
project_type: {
|
|
3740
|
+
type: "string",
|
|
3741
|
+
description: "Optional: 'new' for greenfield apps, 'existing' for changes to existing projects. Defaults to 'new'."
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
};
|
|
3746
|
+
const VIBE_CODING_GUIDE_RESPONSE = [
|
|
3747
|
+
"# Cortex Vibe Coding Workflow",
|
|
3748
|
+
"",
|
|
3749
|
+
"Follow this pipeline when building apps with Cortex MCP tools.",
|
|
3750
|
+
"",
|
|
3751
|
+
"## New App (Greenfield)",
|
|
3752
|
+
"",
|
|
3753
|
+
"### Phase 1: Design & Approve",
|
|
3754
|
+
"1. Call `sonance_brand__design_app` with the app description to get the branded starter blueprint (CSS, components, layout)",
|
|
3755
|
+
"2. Call `sonance_brand__get_css_theme` for the full CSS variables and Tailwind config",
|
|
3756
|
+
"3. Create a single branded HTML proof-of-concept file and show the user",
|
|
3757
|
+
"4. Ask the user: 'Does this look right? Ready to build the full app?'",
|
|
3758
|
+
"5. Do NOT proceed until the user approves",
|
|
3759
|
+
"",
|
|
3760
|
+
"### Phase 2: Plan Infrastructure",
|
|
3761
|
+
"6. Determine if the app needs a database (user accounts, persistent data \u2192 yes; static content \u2192 no)",
|
|
3762
|
+
"7. Determine if the app needs authentication (multi-user, personalized data \u2192 yes; public content \u2192 no)",
|
|
3763
|
+
"8. Present the plan to the user: 'Your app needs: GitHub repo, Vercel deployment, [Supabase DB + auth / no DB]'",
|
|
3764
|
+
"",
|
|
3765
|
+
"### Phase 3: Build with Brand",
|
|
3766
|
+
"9. Write Next.js + TypeScript code using Sonance Brand components:",
|
|
3767
|
+
" - Call `sonance_brand__get_components_by_category` for pre-built UI components",
|
|
3768
|
+
" - Call `sonance_brand__get_component` for specific components",
|
|
3769
|
+
" - Use brand CSS tokens for all colors/typography \u2014 never hardcode hex values",
|
|
3770
|
+
"10. Structure code modularly: components in /components, utilities in /lib, routes in /app",
|
|
3771
|
+
" - No single file over 300 lines",
|
|
3772
|
+
" - Always use TypeScript (.tsx/.ts)",
|
|
3773
|
+
"",
|
|
3774
|
+
"### Phase 4: Deploy",
|
|
3775
|
+
"11. If auth needed: call `supabase__setup_cortex_auth` \u2014 returns client_id, client_secret, cortex_url",
|
|
3776
|
+
" - Include auth template files: login page, callback route, middleware, sign-out",
|
|
3777
|
+
"12. Create private GitHub repo: `github__create_repository` + `github__push_files`",
|
|
3778
|
+
" - Include .gitignore, .env.example, README.md \u2014 NEVER push .env or secrets",
|
|
3779
|
+
"13. Set ALL env vars on Vercel using `vercel__set_env_vars_batch` BEFORE deploying:",
|
|
3780
|
+
" - Supabase: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY",
|
|
3781
|
+
" - Auth: NEXT_PUBLIC_CORTEX_URL, NEXT_PUBLIC_CORTEX_CLIENT_ID, CORTEX_CLIENT_ID, CORTEX_CLIENT_SECRET",
|
|
3782
|
+
" - Extract ALL values from tool responses \u2014 NEVER ask the user to copy keys",
|
|
3783
|
+
"14. Deploy: `vercel__deploy` then verify with `vercel__get_deployment`",
|
|
3784
|
+
" - If ERROR: get logs, fix code, push fix, retry until READY",
|
|
3785
|
+
" - NEVER tell the user the app is live without confirming READY status",
|
|
3786
|
+
"15. If auth: register redirect URI with `supabase__add_redirect_uri`",
|
|
3787
|
+
"",
|
|
3788
|
+
"### Phase 5: Quality",
|
|
3789
|
+
"16. Run `security_scan__scan_code_security`, `code_analysis__lint_directory`, `code_review__review_directory`",
|
|
3790
|
+
"17. Call `sonance_brand__evaluate_design` \u2014 must score Tier 3+ (>= 60) before finalizing",
|
|
3791
|
+
"",
|
|
3792
|
+
"## Existing Project",
|
|
3793
|
+
"",
|
|
3794
|
+
"If the user references an existing repo/project ('add auth to...', 'fix the deployment on...'),",
|
|
3795
|
+
"skip the POC and go directly to the requested changes. Still apply:",
|
|
3796
|
+
"- Brand components and CSS tokens for any new UI",
|
|
3797
|
+
"- Env vars before deploying",
|
|
3798
|
+
"- Deployment verification",
|
|
3799
|
+
"- Quality checks and brand evaluation",
|
|
3800
|
+
"",
|
|
3801
|
+
"## Key Rules",
|
|
3802
|
+
"- The user should NEVER manually set env vars, copy keys, or configure auth",
|
|
3803
|
+
"- Always use Next.js + TypeScript, never plain React or HTML for production apps",
|
|
3804
|
+
"- Always use Sonance Brand components \u2014 never write custom Button/Card/Navbar with hardcoded styles"
|
|
3805
|
+
].join("\n");
|
|
3727
3806
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
3728
3807
|
await ensureInitialized();
|
|
3729
3808
|
const response = await cortex.listTools();
|
|
@@ -3732,12 +3811,18 @@ async function startStdioServer(options) {
|
|
|
3732
3811
|
}
|
|
3733
3812
|
const result = response.result;
|
|
3734
3813
|
const tools = (result.tools || []).map(overrideUploadToolSchema);
|
|
3735
|
-
return { tools };
|
|
3814
|
+
return { tools: [VIBE_CODING_GUIDE_TOOL, ...tools] };
|
|
3736
3815
|
});
|
|
3737
3816
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
3738
3817
|
await ensureInitialized();
|
|
3739
3818
|
const { name, arguments: args } = request.params;
|
|
3740
3819
|
const typedArgs = args ?? {};
|
|
3820
|
+
if (name === "vibe_coding_guide") {
|
|
3821
|
+
return {
|
|
3822
|
+
content: [{ type: "text", text: VIBE_CODING_GUIDE_RESPONSE }],
|
|
3823
|
+
isError: false
|
|
3824
|
+
};
|
|
3825
|
+
}
|
|
3741
3826
|
const baseName = name.includes("__") ? name.split("__").pop() : name;
|
|
3742
3827
|
if (UPLOAD_TOOLS.has(baseName) && typedArgs.file_path) {
|
|
3743
3828
|
return handleLocalFileUpload(cortex, name, typedArgs);
|
|
@@ -3766,10 +3851,11 @@ async function runServe() {
|
|
|
3766
3851
|
const config = readConfig();
|
|
3767
3852
|
const serverUrl = config?.server || DEFAULT_SERVER_URL;
|
|
3768
3853
|
const apiKey = getEffectiveApiKey();
|
|
3769
|
-
if (apiKey
|
|
3854
|
+
if (!apiKey) {
|
|
3770
3855
|
process.stderr.write(
|
|
3771
|
-
"
|
|
3856
|
+
"Error: No API key found. Please log in first:\n npx @danainnovations/cortex-mcp@latest login\n\n"
|
|
3772
3857
|
);
|
|
3858
|
+
process.exit(1);
|
|
3773
3859
|
}
|
|
3774
3860
|
await startStdioServer({ serverUrl, apiKey });
|
|
3775
3861
|
}
|
|
@@ -4446,6 +4532,21 @@ async function runDisconnect(provider) {
|
|
|
4446
4532
|
}
|
|
4447
4533
|
|
|
4448
4534
|
// bin/cli.ts
|
|
4535
|
+
if (process.platform === "win32") {
|
|
4536
|
+
process.on("uncaughtException", (err2) => {
|
|
4537
|
+
console.error("\n Error: " + err2.message);
|
|
4538
|
+
console.error("\n Press Enter to close...");
|
|
4539
|
+
process.stdin.resume();
|
|
4540
|
+
process.stdin.once("data", () => process.exit(1));
|
|
4541
|
+
});
|
|
4542
|
+
process.on("unhandledRejection", (err2) => {
|
|
4543
|
+
const msg = err2 instanceof Error ? err2.message : String(err2);
|
|
4544
|
+
console.error("\n Error: " + msg);
|
|
4545
|
+
console.error("\n Press Enter to close...");
|
|
4546
|
+
process.stdin.resume();
|
|
4547
|
+
process.stdin.once("data", () => process.exit(1));
|
|
4548
|
+
});
|
|
4549
|
+
}
|
|
4449
4550
|
var program = new Command();
|
|
4450
4551
|
program.name("cortex-mcp").description(
|
|
4451
4552
|
"Connect your AI tools to Asana, GitHub, Microsoft 365, Monday.com, Salesforce, Vercel & Supabase via Cortex \u2014 supports Claude, Cursor, Codex & more"
|
|
@@ -4529,8 +4630,8 @@ program.command("disconnect <provider>").description("Remove your personal OAuth
|
|
|
4529
4630
|
}
|
|
4530
4631
|
});
|
|
4531
4632
|
program.command("connect-mobile").description("Connect Cortex to Claude on mobile \u2014 opens setup page in browser").action(async () => {
|
|
4532
|
-
const { DEFAULT_SERVER_URL: DEFAULT_SERVER_URL3 } = await import("./constants-
|
|
4533
|
-
const { openBrowser: openBrowser2 } = await import("./browser-
|
|
4633
|
+
const { DEFAULT_SERVER_URL: DEFAULT_SERVER_URL3 } = await import("./constants-AJADVACN.js");
|
|
4634
|
+
const { openBrowser: openBrowser2 } = await import("./browser-QVN3U6IX.js");
|
|
4534
4635
|
const url = `${DEFAULT_SERVER_URL3}/connect`;
|
|
4535
4636
|
console.log("\nOpening Cortex connect page...");
|
|
4536
4637
|
console.log(` ${url}
|
|
@@ -4539,7 +4640,12 @@ program.command("connect-mobile").description("Connect Cortex to Claude on mobil
|
|
|
4539
4640
|
console.log("Once connected, tools will be available on web, desktop, and mobile.\n");
|
|
4540
4641
|
await openBrowser2(url);
|
|
4541
4642
|
});
|
|
4542
|
-
|
|
4643
|
+
var knownCommands = program.commands.map((c) => c.name());
|
|
4644
|
+
var userArgs = process.argv.slice(1);
|
|
4645
|
+
var hasCommand = userArgs.some(
|
|
4646
|
+
(arg) => knownCommands.includes(arg) || arg.startsWith("-")
|
|
4647
|
+
);
|
|
4648
|
+
if (!hasCommand) {
|
|
4543
4649
|
process.argv.push("setup");
|
|
4544
4650
|
}
|
|
4545
4651
|
program.parse();
|