@kiran_nandi_123/conxa 1.0.6 → 1.0.7
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/lib/cli.js +9 -8
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -85,14 +85,15 @@ function _releaseLock() {
|
|
|
85
85
|
|
|
86
86
|
// ─── Claude Code integration ─────────────────────────────────────────────────
|
|
87
87
|
|
|
88
|
-
function _registerGlobalMcp() {
|
|
89
|
-
let claudeJson = {};
|
|
90
|
-
try { claudeJson = JSON.parse(fs.readFileSync(CLAUDE_JSON, "utf8")); } catch (_) {}
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
claudeJson.mcpServers.
|
|
95
|
-
|
|
88
|
+
function _registerGlobalMcp() {
|
|
89
|
+
let claudeJson = {};
|
|
90
|
+
try { claudeJson = JSON.parse(fs.readFileSync(CLAUDE_JSON, "utf8")); } catch (_) {}
|
|
91
|
+
const nodeCommand = process.execPath || "node";
|
|
92
|
+
const existing = claudeJson.mcpServers && claudeJson.mcpServers.conxa;
|
|
93
|
+
if (existing && existing.type === "stdio" && existing.command === nodeCommand && existing.args && existing.args[0] === SERVER_JS) return;
|
|
94
|
+
if (!claudeJson.mcpServers) claudeJson.mcpServers = {};
|
|
95
|
+
claudeJson.mcpServers.conxa = { type: "stdio", command: nodeCommand, args: [SERVER_JS] };
|
|
96
|
+
try {
|
|
96
97
|
_atomicWrite(CLAUDE_JSON, JSON.stringify(claudeJson, null, 2) + "\n");
|
|
97
98
|
process.stderr.write(`[conxa] Registered conxa MCP server in ${CLAUDE_JSON}\n`);
|
|
98
99
|
} catch (e) {
|