kaax-mcp 0.1.0 → 0.1.1
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 +16 -8
- package/dist/index.js +59 -10
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +27 -0
- package/dist/init.js +228 -0
- package/dist/init.js.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Kaax MCP server
|
|
3
|
+
* Kaax MCP entry point — bifurcates between server mode and CLI mode based
|
|
4
|
+
* on the first positional argument:
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* `npx -y kaax-mcp` → boots the stdio MCP server (the normal
|
|
7
|
+
* runtime path that Claude Desktop /
|
|
8
|
+
* Cursor / Windsurf use).
|
|
9
|
+
* `npx -y kaax-mcp init` → runs the interactive installer that
|
|
10
|
+
* edits MCP client config files so the
|
|
11
|
+
* user never has to paste JSON.
|
|
12
|
+
* `npx -y kaax-mcp init --yes` → same, no prompts (scripted use).
|
|
13
|
+
* `npx -y kaax-mcp --help` → quick usage.
|
|
8
14
|
*
|
|
9
|
-
*
|
|
10
|
-
* • KAAX_API_KEY (
|
|
15
|
+
* Server-mode env:
|
|
16
|
+
* • KAAX_API_KEY (optional) — issued at /dashboard/api-manage. Without
|
|
17
|
+
* it the MCP runs in onboarding mode and the
|
|
18
|
+
* agent walks the user through signup.
|
|
11
19
|
* • KAAX_BASE_URL (optional) — defaults to https://www.kaax-agritech.com.
|
|
20
|
+
* • KAAX_LOCALE (optional) — "es" (default) or "en".
|
|
12
21
|
*
|
|
13
|
-
*
|
|
14
|
-
* outputs.
|
|
22
|
+
* stderr only for logs — the LLM never sees them, only tool outputs.
|
|
15
23
|
*/
|
|
16
24
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Kaax MCP server
|
|
3
|
+
* Kaax MCP entry point — bifurcates between server mode and CLI mode based
|
|
4
|
+
* on the first positional argument:
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* `npx -y kaax-mcp` → boots the stdio MCP server (the normal
|
|
7
|
+
* runtime path that Claude Desktop /
|
|
8
|
+
* Cursor / Windsurf use).
|
|
9
|
+
* `npx -y kaax-mcp init` → runs the interactive installer that
|
|
10
|
+
* edits MCP client config files so the
|
|
11
|
+
* user never has to paste JSON.
|
|
12
|
+
* `npx -y kaax-mcp init --yes` → same, no prompts (scripted use).
|
|
13
|
+
* `npx -y kaax-mcp --help` → quick usage.
|
|
8
14
|
*
|
|
9
|
-
*
|
|
10
|
-
* • KAAX_API_KEY (
|
|
15
|
+
* Server-mode env:
|
|
16
|
+
* • KAAX_API_KEY (optional) — issued at /dashboard/api-manage. Without
|
|
17
|
+
* it the MCP runs in onboarding mode and the
|
|
18
|
+
* agent walks the user through signup.
|
|
11
19
|
* • KAAX_BASE_URL (optional) — defaults to https://www.kaax-agritech.com.
|
|
20
|
+
* • KAAX_LOCALE (optional) — "es" (default) or "en".
|
|
12
21
|
*
|
|
13
|
-
*
|
|
14
|
-
* outputs.
|
|
22
|
+
* stderr only for logs — the LLM never sees them, only tool outputs.
|
|
15
23
|
*/
|
|
16
24
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
17
25
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -20,13 +28,54 @@ import { KaaxClient } from "./client.js";
|
|
|
20
28
|
import { buildTools } from "./tools.js";
|
|
21
29
|
import { buildResources } from "./resources.js";
|
|
22
30
|
import { buildPrompts } from "./prompts.js";
|
|
31
|
+
import { runInit } from "./init.js";
|
|
23
32
|
const SERVER_NAME = "kaax-mcp";
|
|
24
|
-
const SERVER_VERSION = "0.1.
|
|
33
|
+
const SERVER_VERSION = "0.1.1";
|
|
25
34
|
function bail(msg) {
|
|
26
35
|
// stderr only — MCP clients pipe stdout for protocol traffic.
|
|
27
36
|
process.stderr.write(`[${SERVER_NAME}] ${msg}\n`);
|
|
28
37
|
process.exit(1);
|
|
29
38
|
}
|
|
39
|
+
function printHelp() {
|
|
40
|
+
process.stdout.write([
|
|
41
|
+
"kaax-mcp — MCP server for Kaax (agritech AI platform).",
|
|
42
|
+
"",
|
|
43
|
+
"Usage:",
|
|
44
|
+
" npx -y kaax-mcp Start the MCP server (stdio transport).",
|
|
45
|
+
" npx -y kaax-mcp init Interactive installer — adds Kaax to your",
|
|
46
|
+
" MCP clients (Claude Desktop, Claude Code,",
|
|
47
|
+
" Cursor, Windsurf) so you never paste JSON.",
|
|
48
|
+
" npx -y kaax-mcp init --yes Same, no prompts.",
|
|
49
|
+
" npx -y kaax-mcp --help This help.",
|
|
50
|
+
"",
|
|
51
|
+
"Environment:",
|
|
52
|
+
" KAAX_API_KEY apiKey from /dashboard/api-manage. Optional — without it,",
|
|
53
|
+
" the MCP runs in onboarding mode.",
|
|
54
|
+
" KAAX_BASE_URL Override the Kaax server URL (default: production).",
|
|
55
|
+
" KAAX_LOCALE 'es' (default) or 'en' for user-facing messages.",
|
|
56
|
+
"",
|
|
57
|
+
"Docs: https://github.com/Ahau-x/Kaax-LandingPage/tree/main/mcp",
|
|
58
|
+
"",
|
|
59
|
+
].join("\n"));
|
|
60
|
+
}
|
|
61
|
+
async function dispatch() {
|
|
62
|
+
const args = process.argv.slice(2);
|
|
63
|
+
const cmd = args[0];
|
|
64
|
+
if (cmd === "--help" || cmd === "-h" || cmd === "help") {
|
|
65
|
+
printHelp();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (cmd === "init") {
|
|
69
|
+
const yes = args.includes("--yes") || args.includes("-y");
|
|
70
|
+
await runInit({ yes });
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (cmd && !cmd.startsWith("-")) {
|
|
74
|
+
process.stderr.write(`[${SERVER_NAME}] Unknown command: ${cmd}. Run \`kaax-mcp --help\`.\n`);
|
|
75
|
+
process.exit(2);
|
|
76
|
+
}
|
|
77
|
+
await main();
|
|
78
|
+
}
|
|
30
79
|
async function main() {
|
|
31
80
|
// KAAX_API_KEY is OPTIONAL. The MCP must be able to boot without it so a
|
|
32
81
|
// brand-new user can run `kaax_start_onboarding` to provision an account
|
|
@@ -100,7 +149,7 @@ async function main() {
|
|
|
100
149
|
const keyState = client.hasApiKey() ? "configured" : "missing (onboarding mode)";
|
|
101
150
|
process.stderr.write(`[${SERVER_NAME}] v${SERVER_VERSION} ready · tools=${tools.length} resources=${resources.length} prompts=${prompts.length} · apiKey=${keyState}\n`);
|
|
102
151
|
}
|
|
103
|
-
|
|
152
|
+
dispatch().catch((err) => {
|
|
104
153
|
bail(`fatal: ${err instanceof Error ? err.stack ?? err.message : String(err)}`);
|
|
105
154
|
});
|
|
106
155
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAA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kBAAkB,KAAK,CAAC,MAAM,cAAc,SAAS,CAAC,MAAM,YAAY,OAAO,CAAC,MAAM,aAAa,QAAQ,IAAI,CACnJ,CAAC;AACJ,CAAC;AAED,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACvB,IAAI,CAAC,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC"}
|
package/dist/init.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kaax-mcp init` — interactive installer.
|
|
3
|
+
*
|
|
4
|
+
* The whole point: a brand-new user runs ONE command in their terminal
|
|
5
|
+
*
|
|
6
|
+
* npx -y kaax-mcp init
|
|
7
|
+
*
|
|
8
|
+
* and walks away with Kaax registered in every MCP-aware agent they have
|
|
9
|
+
* installed locally. No JSON copying, no path-hunting.
|
|
10
|
+
*
|
|
11
|
+
* Design:
|
|
12
|
+
* - We probe well-known config paths per client (Claude Desktop, Claude
|
|
13
|
+
* Code, Cursor, Windsurf, Zed). Anything that exists is offered to
|
|
14
|
+
* the user; anything that does not is silently skipped.
|
|
15
|
+
* - Edits are **non-destructive**: we read the existing JSON, splice
|
|
16
|
+
* our `kaax` entry into `mcpServers`, and write it back preserving
|
|
17
|
+
* every other server the user already had configured.
|
|
18
|
+
* - We back the file up to `<config>.bak` before the first write, so
|
|
19
|
+
* the user can revert with a simple rename.
|
|
20
|
+
* - We never store the apiKey — only env scaffolding. The user fills
|
|
21
|
+
* it in later, or starts in onboarding mode.
|
|
22
|
+
*
|
|
23
|
+
* Output is in the locale chosen by KAAX_LOCALE (default 'es').
|
|
24
|
+
*/
|
|
25
|
+
export declare function runInit(opts?: {
|
|
26
|
+
yes?: boolean;
|
|
27
|
+
}): Promise<void>;
|
package/dist/init.js
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kaax-mcp init` — interactive installer.
|
|
3
|
+
*
|
|
4
|
+
* The whole point: a brand-new user runs ONE command in their terminal
|
|
5
|
+
*
|
|
6
|
+
* npx -y kaax-mcp init
|
|
7
|
+
*
|
|
8
|
+
* and walks away with Kaax registered in every MCP-aware agent they have
|
|
9
|
+
* installed locally. No JSON copying, no path-hunting.
|
|
10
|
+
*
|
|
11
|
+
* Design:
|
|
12
|
+
* - We probe well-known config paths per client (Claude Desktop, Claude
|
|
13
|
+
* Code, Cursor, Windsurf, Zed). Anything that exists is offered to
|
|
14
|
+
* the user; anything that does not is silently skipped.
|
|
15
|
+
* - Edits are **non-destructive**: we read the existing JSON, splice
|
|
16
|
+
* our `kaax` entry into `mcpServers`, and write it back preserving
|
|
17
|
+
* every other server the user already had configured.
|
|
18
|
+
* - We back the file up to `<config>.bak` before the first write, so
|
|
19
|
+
* the user can revert with a simple rename.
|
|
20
|
+
* - We never store the apiKey — only env scaffolding. The user fills
|
|
21
|
+
* it in later, or starts in onboarding mode.
|
|
22
|
+
*
|
|
23
|
+
* Output is in the locale chosen by KAAX_LOCALE (default 'es').
|
|
24
|
+
*/
|
|
25
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, copyFileSync } from "fs";
|
|
26
|
+
import { homedir, platform } from "os";
|
|
27
|
+
import { dirname, join } from "path";
|
|
28
|
+
import { createInterface } from "readline/promises";
|
|
29
|
+
import { stdin, stdout } from "process";
|
|
30
|
+
import { getLocale } from "./i18n.js";
|
|
31
|
+
const KAAX_ENTRY = {
|
|
32
|
+
command: "npx",
|
|
33
|
+
args: ["-y", "kaax-mcp"],
|
|
34
|
+
env: {
|
|
35
|
+
// Placeholder so the user notices it and fills it in. Empty string is
|
|
36
|
+
// ignored by the server — it boots in onboarding mode just fine.
|
|
37
|
+
KAAX_API_KEY: "",
|
|
38
|
+
KAAX_LOCALE: "es",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
function home() {
|
|
42
|
+
return process.env.HOME || process.env.USERPROFILE || homedir();
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Resolve well-known MCP client config paths for the current OS. Returns
|
|
46
|
+
* one entry per client even if its file doesn't exist yet — we'll create
|
|
47
|
+
* the file on write, as long as its parent directory exists or we can
|
|
48
|
+
* make it.
|
|
49
|
+
*/
|
|
50
|
+
function detectTargets() {
|
|
51
|
+
const os = platform();
|
|
52
|
+
const h = home();
|
|
53
|
+
const targets = [];
|
|
54
|
+
// Claude Desktop
|
|
55
|
+
if (os === "win32") {
|
|
56
|
+
targets.push({
|
|
57
|
+
name: "Claude Desktop",
|
|
58
|
+
configPath: join(process.env.APPDATA || join(h, "AppData", "Roaming"), "Claude", "claude_desktop_config.json"),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else if (os === "darwin") {
|
|
62
|
+
targets.push({
|
|
63
|
+
name: "Claude Desktop",
|
|
64
|
+
configPath: join(h, "Library", "Application Support", "Claude", "claude_desktop_config.json"),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
targets.push({
|
|
69
|
+
name: "Claude Desktop",
|
|
70
|
+
configPath: join(h, ".config", "Claude", "claude_desktop_config.json"),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
// Claude Code (CLI)
|
|
74
|
+
targets.push({
|
|
75
|
+
name: "Claude Code",
|
|
76
|
+
configPath: join(h, ".claude.json"),
|
|
77
|
+
});
|
|
78
|
+
// Cursor
|
|
79
|
+
targets.push({
|
|
80
|
+
name: "Cursor",
|
|
81
|
+
configPath: join(h, ".cursor", "mcp.json"),
|
|
82
|
+
});
|
|
83
|
+
// Windsurf
|
|
84
|
+
targets.push({
|
|
85
|
+
name: "Windsurf",
|
|
86
|
+
configPath: join(h, ".codeium", "windsurf", "mcp_config.json"),
|
|
87
|
+
});
|
|
88
|
+
return targets.map((t) => ({ ...t, exists: existsSync(t.configPath) }));
|
|
89
|
+
}
|
|
90
|
+
function readConfig(path) {
|
|
91
|
+
if (!existsSync(path))
|
|
92
|
+
return {};
|
|
93
|
+
try {
|
|
94
|
+
const raw = readFileSync(path, "utf8");
|
|
95
|
+
if (!raw.trim())
|
|
96
|
+
return {};
|
|
97
|
+
return JSON.parse(raw);
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
// Corrupt JSON — bail rather than overwriting.
|
|
101
|
+
throw new Error(`Could not parse ${path}. Fix the file by hand and re-run \`npx -y kaax-mcp init\`.`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function writeConfig(path, config) {
|
|
105
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
106
|
+
writeFileSync(path, JSON.stringify(config, null, 2) + "\n", "utf8");
|
|
107
|
+
}
|
|
108
|
+
function backupOnce(path) {
|
|
109
|
+
if (!existsSync(path))
|
|
110
|
+
return;
|
|
111
|
+
const bak = path + ".bak";
|
|
112
|
+
if (existsSync(bak))
|
|
113
|
+
return; // never clobber an existing backup
|
|
114
|
+
copyFileSync(path, bak);
|
|
115
|
+
}
|
|
116
|
+
function applyKaaxEntry(config) {
|
|
117
|
+
config.mcpServers ||= {};
|
|
118
|
+
const existing = config.mcpServers["kaax"];
|
|
119
|
+
config.mcpServers["kaax"] = KAAX_ENTRY;
|
|
120
|
+
return { added: !existing, replaced: !!existing };
|
|
121
|
+
}
|
|
122
|
+
const STRINGS = {
|
|
123
|
+
es: {
|
|
124
|
+
banner: "\n🌱 Kaax MCP installer\n" +
|
|
125
|
+
" Conecta Kaax a tu agente (Claude Desktop, Claude Code, Cursor, Windsurf).\n",
|
|
126
|
+
noTargets: "No detecté ningún cliente MCP instalado. Instalá Claude Desktop, Claude Code, Cursor o Windsurf y volvé a correr este comando.",
|
|
127
|
+
found: (name, path) => ` ✓ Encontrado: ${name} → ${path}`,
|
|
128
|
+
notFound: (name) => ` · No encontrado: ${name} (lo creo igual si confirmás)`,
|
|
129
|
+
promptInstall: (name) => `\n¿Agregar Kaax MCP a ${name}? [Y/n]: `,
|
|
130
|
+
installed: (name, replaced) => replaced ? ` ✅ Actualizado en ${name}` : ` ✅ Agregado a ${name}`,
|
|
131
|
+
skipped: (name) => ` ⏭️ Saltado: ${name}`,
|
|
132
|
+
failed: (name, err) => ` ❌ Falló en ${name}: ${err}`,
|
|
133
|
+
done: "\n🎉 ¡Listo! Reiniciá tu cliente para cargar el MCP.",
|
|
134
|
+
tryThese: "\nProbá pedirle a tu agente:",
|
|
135
|
+
examples: [
|
|
136
|
+
' "Crea cuenta en Kaax y guíame paso a paso"',
|
|
137
|
+
' "Sugerime tags para una parcela de caña en Escuintla"',
|
|
138
|
+
' "Convertí este shapefile a KML: C:\\path\\a\\parcela.shp"',
|
|
139
|
+
],
|
|
140
|
+
apiKeyHint: "\nℹ️ Si ya tenés un apiKey de Kaax (Pro), pegalo en la env `KAAX_API_KEY`\n del bloque kaax dentro de cada config. Sin él el MCP arranca en modo\n onboarding y te ayuda a crear cuenta.",
|
|
141
|
+
yes: ["y", "yes", "s", "si", "sí"],
|
|
142
|
+
no: ["n", "no"],
|
|
143
|
+
},
|
|
144
|
+
en: {
|
|
145
|
+
banner: "\n🌱 Kaax MCP installer\n" +
|
|
146
|
+
" Connect Kaax to your agent (Claude Desktop, Claude Code, Cursor, Windsurf).\n",
|
|
147
|
+
noTargets: "Did not detect any MCP client. Install Claude Desktop, Claude Code, Cursor or Windsurf and re-run.",
|
|
148
|
+
found: (name, path) => ` ✓ Found: ${name} → ${path}`,
|
|
149
|
+
notFound: (name) => ` · Not found: ${name} (I'll create it if you confirm)`,
|
|
150
|
+
promptInstall: (name) => `\nAdd Kaax MCP to ${name}? [Y/n]: `,
|
|
151
|
+
installed: (name, replaced) => replaced ? ` ✅ Updated in ${name}` : ` ✅ Added to ${name}`,
|
|
152
|
+
skipped: (name) => ` ⏭️ Skipped: ${name}`,
|
|
153
|
+
failed: (name, err) => ` ❌ Failed on ${name}: ${err}`,
|
|
154
|
+
done: "\n🎉 Done! Restart your client to load the MCP.",
|
|
155
|
+
tryThese: "\nTry asking your agent:",
|
|
156
|
+
examples: [
|
|
157
|
+
' "Create a Kaax account and guide me step by step"',
|
|
158
|
+
' "Suggest tags for a sugarcane parcel in Escuintla"',
|
|
159
|
+
' "Convert this shapefile to KML: C:\\path\\to\\parcel.shp"',
|
|
160
|
+
],
|
|
161
|
+
apiKeyHint: "\nℹ️ If you already have a Kaax apiKey (Pro), paste it into the\n `KAAX_API_KEY` env of the kaax block in each config. Without it the\n MCP boots in onboarding mode and helps you create an account.",
|
|
162
|
+
yes: ["y", "yes"],
|
|
163
|
+
no: ["n", "no"],
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
167
|
+
// Main
|
|
168
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
169
|
+
export async function runInit(opts = {}) {
|
|
170
|
+
const locale = getLocale();
|
|
171
|
+
const s = STRINGS[locale];
|
|
172
|
+
// stdout is consumed by the MCP transport when running as a server. In
|
|
173
|
+
// CLI mode we write to stdout normally. The two never overlap because
|
|
174
|
+
// `runInit` is only invoked via `kaax-mcp init`, never alongside the
|
|
175
|
+
// stdio transport.
|
|
176
|
+
process.stdout.write(s.banner);
|
|
177
|
+
const targets = detectTargets();
|
|
178
|
+
const reachable = targets.filter((t) => t.exists);
|
|
179
|
+
if (reachable.length === 0) {
|
|
180
|
+
process.stdout.write("\n" + s.noTargets + "\n");
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
for (const t of targets) {
|
|
184
|
+
if (t.exists) {
|
|
185
|
+
process.stdout.write("\n" + s.found(t.name, t.configPath));
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
// Skip non-existent clients in non-interactive mode; never create
|
|
189
|
+
// bogus configs for tools the user has not installed.
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const rl = createInterface({ input: stdin, output: stdout });
|
|
194
|
+
try {
|
|
195
|
+
for (const t of reachable) {
|
|
196
|
+
let go = opts.yes;
|
|
197
|
+
if (!go) {
|
|
198
|
+
const answer = (await rl.question(s.promptInstall(t.name))).trim().toLowerCase();
|
|
199
|
+
// Default = yes (empty answer).
|
|
200
|
+
go = answer === "" || s.yes.includes(answer);
|
|
201
|
+
if (!go) {
|
|
202
|
+
process.stdout.write(s.skipped(t.name) + "\n");
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
try {
|
|
207
|
+
backupOnce(t.configPath);
|
|
208
|
+
const config = readConfig(t.configPath);
|
|
209
|
+
const { replaced } = applyKaaxEntry(config);
|
|
210
|
+
writeConfig(t.configPath, config);
|
|
211
|
+
process.stdout.write(s.installed(t.name, replaced) + "\n");
|
|
212
|
+
}
|
|
213
|
+
catch (err) {
|
|
214
|
+
process.stdout.write(s.failed(t.name, err.message) + "\n");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
finally {
|
|
219
|
+
rl.close();
|
|
220
|
+
}
|
|
221
|
+
process.stdout.write(s.done + "\n");
|
|
222
|
+
process.stdout.write(s.tryThese + "\n");
|
|
223
|
+
for (const example of s.examples) {
|
|
224
|
+
process.stdout.write(example + "\n");
|
|
225
|
+
}
|
|
226
|
+
process.stdout.write(s.apiKeyHint + "\n");
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=init.js.map
|
package/dist/init.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EAAE,OAAO,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AAC;IACH,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACxC,KAAK,MAAM,OAAO,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;QACjC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaax-mcp",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "MCP server for Kaax —
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "MCP server for Kaax — one-liner installer (`npx -y kaax-mcp init`) that wires Kaax into Claude Desktop, Claude Code, Cursor and Windsurf. Onboards new users, queries analyses, suggests configurations, converts shapefiles to KML and guides downloads.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"kaax-mcp": "./dist/index.js"
|