serena-slim 0.0.1-slim.1.1 → 0.0.1-slim.1.2
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/mcpslim-windows-x64.exe +0 -0
- package/index.js +38 -1
- package/package.json +1 -1
|
Binary file
|
package/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* npx serena-slim --setup # Auto-configure (interactive)
|
|
9
9
|
* npx serena-slim --setup claude # Auto-configure for Claude Desktop
|
|
10
10
|
* npx serena-slim --setup cursor # Auto-configure for Cursor
|
|
11
|
+
* npx serena-slim --setup claude-code # Auto-configure for Claude Code CLI
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
const { spawn, execSync } = require('child_process');
|
|
@@ -132,11 +133,47 @@ async function interactiveSetup() {
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
function setupClaudeCode() {
|
|
137
|
+
// 환경변수 플래그 생성
|
|
138
|
+
const envFlags = REQUIRED_ENV_VARS.map(v => `--env ${v}=<YOUR_${v.split('_').pop()}>`).join(' ');
|
|
139
|
+
|
|
140
|
+
let cmd = `claude mcp add ${MCP_NAME}`;
|
|
141
|
+
if (REQUIRED_ENV_VARS.length > 0) {
|
|
142
|
+
cmd += ` ${envFlags}`;
|
|
143
|
+
}
|
|
144
|
+
cmd += ` -- npx -y ${PACKAGE_NAME}`;
|
|
145
|
+
|
|
146
|
+
console.log(`\n🔧 Adding ${MCP_NAME} to Claude Code...\n`);
|
|
147
|
+
console.log(`Running: ${cmd}\n`);
|
|
148
|
+
|
|
149
|
+
try {
|
|
150
|
+
execSync(cmd, { stdio: 'inherit', shell: true });
|
|
151
|
+
console.log(`\n🎉 Setup complete! ${MCP_NAME} is now available in Claude Code.\n`);
|
|
152
|
+
if (REQUIRED_ENV_VARS.length > 0) {
|
|
153
|
+
console.log(`⚠️ Don't forget to set environment variables:`);
|
|
154
|
+
for (const envVar of REQUIRED_ENV_VARS) {
|
|
155
|
+
console.log(` - ${envVar}`);
|
|
156
|
+
}
|
|
157
|
+
console.log('');
|
|
158
|
+
}
|
|
159
|
+
return true;
|
|
160
|
+
} catch (err) {
|
|
161
|
+
console.error(`\n❌ Failed to add MCP. Is Claude Code CLI installed?\n`);
|
|
162
|
+
console.log(`Try running manually:\n ${cmd}\n`);
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
135
167
|
function setupClient(client) {
|
|
168
|
+
// Claude Code CLI는 별도 처리
|
|
169
|
+
if (client === 'claude-code') {
|
|
170
|
+
return setupClaudeCode();
|
|
171
|
+
}
|
|
172
|
+
|
|
136
173
|
const configPath = CONFIG_PATHS[client];
|
|
137
174
|
if (!configPath) {
|
|
138
175
|
console.error(`❌ Unknown client: ${client}`);
|
|
139
|
-
console.log('Supported: claude, claude-desktop, cursor');
|
|
176
|
+
console.log('Supported: claude, claude-desktop, cursor, claude-code');
|
|
140
177
|
return false;
|
|
141
178
|
}
|
|
142
179
|
|