@infinitedusky/indusk-mcp 1.11.3 → 1.11.5
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/bin/commands/init.js +11 -4
- package/dist/bin/commands/update.js +16 -10
- package/package.json +1 -1
|
@@ -283,14 +283,21 @@ export async function init(projectRoot, options = {}) {
|
|
|
283
283
|
console.info(" skip: codegraphcontext (pipx not found — install pipx first, then: pipx install codegraphcontext)");
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
//
|
|
286
|
+
// Ensure CGC config is correct: localhost, cgc-{project} graph name
|
|
287
287
|
if (existingServers.has("codegraphcontext") && !force) {
|
|
288
288
|
try {
|
|
289
289
|
const mcpConfig = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
|
|
290
290
|
const cgcEnv = mcpConfig.mcpServers?.codegraphcontext?.env;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
const correctGraph = `cgc-${projectName}`;
|
|
292
|
+
if (cgcEnv &&
|
|
293
|
+
(cgcEnv.FALKORDB_HOST !== "localhost" || cgcEnv.FALKORDB_GRAPH_NAME !== correctGraph)) {
|
|
294
|
+
execSync("claude mcp remove -s project codegraphcontext", {
|
|
295
|
+
cwd: projectRoot,
|
|
296
|
+
stdio: "pipe",
|
|
297
|
+
timeout: 10000,
|
|
298
|
+
});
|
|
299
|
+
execSync(`claude mcp add -t stdio -s project -e DATABASE_TYPE=falkordb-remote -e FALKORDB_HOST=localhost -e FALKORDB_GRAPH_NAME=${correctGraph} -- codegraphcontext cgc mcp start`, { cwd: projectRoot, stdio: "pipe", timeout: 10000 });
|
|
300
|
+
console.info(` fixed: codegraphcontext → localhost, ${correctGraph}`);
|
|
294
301
|
}
|
|
295
302
|
}
|
|
296
303
|
catch { }
|
|
@@ -247,19 +247,24 @@ export async function update(projectRoot) {
|
|
|
247
247
|
try {
|
|
248
248
|
const mcpConfig = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
|
|
249
249
|
let mcpChanged = false;
|
|
250
|
-
//
|
|
250
|
+
// Ensure CGC config is correct: localhost, cgc-{project} graph name
|
|
251
251
|
const cgcEnv = mcpConfig.mcpServers?.codegraphcontext?.env;
|
|
252
|
-
if (cgcEnv
|
|
252
|
+
if (cgcEnv) {
|
|
253
253
|
const { basename } = await import("node:path");
|
|
254
254
|
const projectName = basename(projectRoot);
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
255
|
+
const correctHost = "localhost";
|
|
256
|
+
const correctGraph = `cgc-${projectName}`;
|
|
257
|
+
const needsFix = cgcEnv.FALKORDB_HOST !== correctHost || cgcEnv.FALKORDB_GRAPH_NAME !== correctGraph;
|
|
258
|
+
if (needsFix) {
|
|
259
|
+
try {
|
|
260
|
+
run("claude mcp remove -s project codegraphcontext");
|
|
261
|
+
run(`claude mcp add -t stdio -s project -e DATABASE_TYPE=falkordb-remote -e FALKORDB_HOST=${correctHost} -e FALKORDB_GRAPH_NAME=${correctGraph} -- codegraphcontext cgc mcp start`);
|
|
262
|
+
console.info(` fixed: codegraphcontext → ${correctHost}, ${correctGraph}`);
|
|
263
|
+
mcpChanged = true;
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
console.info(" could not fix codegraphcontext — update .mcp.json manually");
|
|
267
|
+
}
|
|
263
268
|
}
|
|
264
269
|
}
|
|
265
270
|
// Migrate indusk: npx without --yes → npx --yes
|
|
@@ -269,6 +274,7 @@ export async function update(projectRoot) {
|
|
|
269
274
|
induskArgs[0] === "@infinitedusky/indusk-mcp" &&
|
|
270
275
|
!induskArgs.includes("--yes")) {
|
|
271
276
|
try {
|
|
277
|
+
run("claude mcp remove -s project indusk");
|
|
272
278
|
run("claude mcp add -t stdio -s project -e PROJECT_ROOT=. -- indusk npx --yes @infinitedusky/indusk-mcp serve");
|
|
273
279
|
console.info(" migrated: indusk MCP → npx --yes");
|
|
274
280
|
mcpChanged = true;
|