@cloudstreamsoftware/claude-tools 1.2.4 → 1.2.6
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/bin/cloudstream-setup.js +22 -11
- package/mcp/knowledge-connector.json +1 -1
- package/package.json +1 -1
package/bin/cloudstream-setup.js
CHANGED
|
@@ -305,31 +305,42 @@ async function storeCredentials(licenseKey, installType) {
|
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* Configure MCP server connection
|
|
308
|
+
* Merges into settings.json (same pattern as mergeHooksIntoSettings)
|
|
308
309
|
*/
|
|
309
310
|
async function configureMcpServer(licenseKey) {
|
|
310
|
-
const
|
|
311
|
+
const settingsPath = path.join(CONFIG.claudeDir, 'settings.json');
|
|
311
312
|
|
|
312
|
-
|
|
313
|
+
// Read existing settings or create empty object
|
|
314
|
+
let settings = {};
|
|
313
315
|
try {
|
|
314
|
-
const content = await fs.readFile(
|
|
315
|
-
|
|
316
|
+
const content = await fs.readFile(settingsPath, 'utf8');
|
|
317
|
+
settings = JSON.parse(content);
|
|
316
318
|
} catch {
|
|
317
|
-
// File doesn't exist
|
|
319
|
+
// File doesn't exist, start fresh
|
|
318
320
|
}
|
|
319
321
|
|
|
320
|
-
//
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
// Merge MCP server into settings
|
|
323
|
+
settings.mcpServers = settings.mcpServers || {};
|
|
324
|
+
settings.mcpServers['cloudstream-knowledge'] = {
|
|
323
325
|
command: 'npx',
|
|
324
|
-
args: ['@
|
|
326
|
+
args: ['@cloudstreamsoftware/knowledge-mcp-client'],
|
|
325
327
|
env: {
|
|
326
328
|
CLOUDSTREAM_LICENSE: licenseKey,
|
|
327
329
|
CLOUDSTREAM_API: CONFIG.knowledgeApiUrl
|
|
328
330
|
}
|
|
329
331
|
};
|
|
330
332
|
|
|
331
|
-
await fs.writeFile(
|
|
332
|
-
logSuccess('MCP server configured');
|
|
333
|
+
await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2));
|
|
334
|
+
logSuccess('MCP server configured in settings.json');
|
|
335
|
+
|
|
336
|
+
// Clean up orphaned mcp.json if it exists (from previous installs)
|
|
337
|
+
const orphanedMcpPath = path.join(CONFIG.claudeDir, 'mcp.json');
|
|
338
|
+
try {
|
|
339
|
+
await fs.unlink(orphanedMcpPath);
|
|
340
|
+
logSuccess('Cleaned up orphaned mcp.json');
|
|
341
|
+
} catch {
|
|
342
|
+
// File doesn't exist, nothing to clean up
|
|
343
|
+
}
|
|
333
344
|
}
|
|
334
345
|
|
|
335
346
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"version": "1.0.0",
|
|
6
6
|
"server": {
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["@
|
|
8
|
+
"args": ["@cloudstreamsoftware/knowledge-mcp-client"],
|
|
9
9
|
"env": {
|
|
10
10
|
"CLOUDSTREAM_LICENSE": "${LICENSE_KEY}",
|
|
11
11
|
"CLOUDSTREAM_API": "https://knowledge.cloudstreamsoftware.com"
|
package/package.json
CHANGED