serena-slim 0.0.1-slim.1 → 0.0.1-slim.1.10

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MCPSlim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # serena-slim
2
2
 
3
- > **Serena MCP server optimized for AI assistants** — Reduce context window tokens by 51.2% while keeping full functionality. Compatible with Claude, ChatGPT, Gemini, Cursor, and all MCP clients.
3
+ > **Serena MCP server optimized for AI assistants** — Reduce context window tokens by 50.3% while keeping full functionality. Compatible with Claude, ChatGPT, Gemini, Cursor, and all MCP clients.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/serena-slim.svg)](https://www.npmjs.com/package/serena-slim)
6
6
  [![Test Status](https://img.shields.io/badge/tests-passing-brightgreen)](https://github.com/mcpslim/mcpslim)
@@ -18,7 +18,7 @@ The original `serena` loads **29 tools** consuming approximately **~23,878 token
18
18
 
19
19
  ### The Solution
20
20
 
21
- `serena-slim` intelligently **groups 29 tools into 18 semantic operations**, reducing token usage by **51.2%** — with **zero functionality loss**.
21
+ `serena-slim` intelligently **groups 29 tools into 18 semantic operations**, reducing token usage by **50.3%** — with **zero functionality loss**.
22
22
 
23
23
  Your AI assistant sees fewer, smarter tools. Every original capability remains available.
24
24
 
@@ -27,8 +27,8 @@ Your AI assistant sees fewer, smarter tools. Every original capability remains a
27
27
  | Metric | Original | Slim | Reduction |
28
28
  |--------|----------|------|-----------|
29
29
  | Tools | 29 | 18 | **-38%** |
30
- | Schema Tokens | 7,348 | 1,395 | **81.0%** |
31
- | Claude Code (est.) | ~23,878 | ~11,655 | **~51.2%** |
30
+ | Schema Tokens | 7,348 | 1,614 | **78.0%** |
31
+ | Claude Code (est.) | ~23,878 | ~11,874 | **~50.3%** |
32
32
 
33
33
  > **Benchmark Info**
34
34
  > - Original: `serena@0.0.1`
@@ -55,11 +55,14 @@ Done! Restart your app to use serena.
55
55
  ### CLI Tools (already have CLI?)
56
56
 
57
57
  ```bash
58
- # Claude Code
59
- claude mcp add serena -- npx -y serena-slim
58
+ # Claude Code (creates .mcp.json in project root)
59
+ claude mcp add serena -s project -- npx -y serena-slim@latest
60
+
61
+ # Windows: use cmd /c wrapper
62
+ claude mcp add serena -s project -- cmd /c npx -y serena-slim@latest
60
63
 
61
64
  # VS Code (Copilot, Cline, Roo Code)
62
- code --add-mcp '{"name":"serena","command":"npx","args":["-y","serena-slim"]}'
65
+ code --add-mcp '{"name":"serena","command":"npx","args":["-y","serena-slim@latest"]}'
63
66
  ```
64
67
 
65
68
  ## Manual Setup
@@ -81,7 +84,7 @@ Add to your `claude_desktop_config.json`:
81
84
  "mcpServers": {
82
85
  "serena": {
83
86
  "command": "npx",
84
- "args": ["-y", "serena-slim"]
87
+ "args": ["-y", "serena-slim@latest"]
85
88
  }
86
89
  }
87
90
  }
@@ -96,7 +99,7 @@ Add to `.cursor/mcp.json` (global) or `<project>/.cursor/mcp.json` (project):
96
99
  "mcpServers": {
97
100
  "serena": {
98
101
  "command": "npx",
99
- "args": ["-y", "serena-slim"]
102
+ "args": ["-y", "serena-slim@latest"]
100
103
  }
101
104
  }
102
105
  }
@@ -121,7 +124,7 @@ MCPSlim acts as a **transparent bridge** between AI models and the original MCP
121
124
  │ │ │ │ │
122
125
  │ Sees 18 grouped Translates to Executes actual │
123
126
  │ tools only original call tool & returns │
124
- │ (~11,655 tokens) │
127
+ │ (~11,874 tokens) │
125
128
  └─────────────────────────────────────────────────────────────────┘
126
129
  ```
127
130
 
@@ -133,7 +136,7 @@ MCPSlim acts as a **transparent bridge** between AI models and the original MCP
133
136
  4. **Original MCP executes** — Real server processes the request
134
137
  5. **Response returned** — Result passes back unchanged
135
138
 
136
- **Zero functionality loss. 51.2% token savings.**
139
+ **Zero functionality loss. 50.3% token savings.**
137
140
 
138
141
  ## Available Tool Groups
139
142
 
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');
@@ -16,7 +17,7 @@ const os = require('os');
16
17
  const fs = require('fs');
17
18
  const readline = require('readline');
18
19
 
19
- const MCP_NAME = 'serena';
20
+ const MCP_NAME = 'serena-slim';
20
21
  const PACKAGE_NAME = 'serena-slim';
21
22
 
22
23
  // 환경변수 요구사항 (빌드 시 주입)
@@ -116,14 +117,15 @@ async function interactiveSetup() {
116
117
  case '3':
117
118
  console.log('\nRun this command:\n');
118
119
  if (REQUIRED_ENV_VARS.length > 0) {
119
- console.log(` claude mcp add ${MCP_NAME} ${envFlags} -- npx -y ${PACKAGE_NAME}\n`);
120
+ console.log(` claude mcp add ${MCP_NAME} -s project ${envFlags} -- npx -y ${PACKAGE_NAME}@latest\n`);
120
121
  } else {
121
- console.log(` claude mcp add ${MCP_NAME} -- npx -y ${PACKAGE_NAME}\n`);
122
+ console.log(` claude mcp add ${MCP_NAME} -s project -- npx -y ${PACKAGE_NAME}@latest\n`);
122
123
  }
124
+ console.log(' (Windows: use "cmd /c npx" instead of "npx")\n');
123
125
  return true;
124
126
  case '4':
125
127
  console.log('\nRun this command:\n');
126
- console.log(` code --add-mcp '{"name":"${MCP_NAME}","command":"npx","args":["-y","${PACKAGE_NAME}"]${envJson}}'\n`);
128
+ console.log(` code --add-mcp '{"name":"${MCP_NAME}","command":"npx","args":["-y","${PACKAGE_NAME}@latest"]${envJson}}'\n`);
127
129
  return true;
128
130
  case '5':
129
131
  default:
@@ -132,17 +134,56 @@ async function interactiveSetup() {
132
134
  }
133
135
  }
134
136
 
137
+ function setupClaudeCode() {
138
+ // 환경변수 플래그 생성
139
+ const envFlags = REQUIRED_ENV_VARS.map(v => `--env ${v}=<YOUR_${v.split('_').pop()}>`).join(' ');
140
+
141
+ // Windows에서는 cmd /c wrapper 필요
142
+ const npxCmd = os.platform() === 'win32' ? 'cmd /c npx' : 'npx';
143
+
144
+ let cmd = `claude mcp add ${MCP_NAME} -s project`;
145
+ if (REQUIRED_ENV_VARS.length > 0) {
146
+ cmd += ` ${envFlags}`;
147
+ }
148
+ cmd += ` -- ${npxCmd} -y ${PACKAGE_NAME}@latest`;
149
+
150
+ console.log(`\n🔧 Adding ${MCP_NAME} to Claude Code...\n`);
151
+ console.log(`Running: ${cmd}\n`);
152
+
153
+ try {
154
+ execSync(cmd, { stdio: 'inherit', shell: true });
155
+ console.log(`\n🎉 Setup complete! ${MCP_NAME} is now available in Claude Code.\n`);
156
+ if (REQUIRED_ENV_VARS.length > 0) {
157
+ console.log(`⚠️ Don't forget to set environment variables:`);
158
+ for (const envVar of REQUIRED_ENV_VARS) {
159
+ console.log(` - ${envVar}`);
160
+ }
161
+ console.log('');
162
+ }
163
+ return true;
164
+ } catch (err) {
165
+ console.error(`\n❌ Failed to add MCP. Is Claude Code CLI installed?\n`);
166
+ console.log(`Try running manually:\n ${cmd}\n`);
167
+ return false;
168
+ }
169
+ }
170
+
135
171
  function setupClient(client) {
172
+ // Claude Code CLI는 별도 처리
173
+ if (client === 'claude-code') {
174
+ return setupClaudeCode();
175
+ }
176
+
136
177
  const configPath = CONFIG_PATHS[client];
137
178
  if (!configPath) {
138
179
  console.error(`❌ Unknown client: ${client}`);
139
- console.log('Supported: claude, claude-desktop, cursor');
180
+ console.log('Supported: claude, claude-desktop, cursor, claude-code');
140
181
  return false;
141
182
  }
142
183
 
143
184
  const mcpConfig = {
144
185
  command: 'npx',
145
- args: ['-y', PACKAGE_NAME]
186
+ args: ['-y', PACKAGE_NAME + '@latest']
146
187
  };
147
188
 
148
189
  // 환경변수가 필요한 경우 env 블록 추가 (플레이스홀더)
@@ -193,7 +234,20 @@ if (setupIndex !== -1) {
193
234
  // Normal Mode: Run MCP server
194
235
  // ============================================
195
236
 
196
- const binName = os.platform() === 'win32' ? 'mcpslim.exe' : 'mcpslim';
237
+ // 플랫폼별 바이너리 이름 결정
238
+ function getBinaryName() {
239
+ const platform = os.platform();
240
+ const arch = os.arch();
241
+ if (platform === 'win32') {
242
+ return 'mcpslim-windows-x64.exe';
243
+ } else if (platform === 'darwin') {
244
+ return arch === 'arm64' ? 'mcpslim-darwin-arm64' : 'mcpslim-darwin-x64';
245
+ } else {
246
+ return 'mcpslim-linux-x64';
247
+ }
248
+ }
249
+
250
+ const binName = getBinaryName();
197
251
  const mcpslimBin = path.join(__dirname, 'bin', binName);
198
252
  const recipePath = path.join(__dirname, 'recipes', 'serena.json');
199
253
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "serena-slim",
3
- "version": "0.0.1-slim.1",
4
- "description": "Slimmed serena MCP - 38% token reduction for AI models",
3
+ "version": "0.0.1-slim.1.10",
4
+ "description": "serena MCP (38% less tokens). Quick setup: npx serena-slim --setup",
5
5
  "bin": {
6
6
  "serena-slim": "./index.js"
7
7
  },
@@ -24,8 +24,7 @@
24
24
  ],
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "https://github.com/palan-k/mcpslim.git",
28
- "directory": "packages/serena-slim"
27
+ "url": "https://github.com/mcpslim/serena-slim.git"
29
28
  },
30
29
  "mcpslim": {
31
30
  "originalPackage": "serena",
@@ -33,5 +32,9 @@
33
32
  "originalTools": 29,
34
33
  "slimTools": 18,
35
34
  "tokenReduction": "38%"
35
+ },
36
+ "homepage": "https://mcpslim.github.io/serena-slim",
37
+ "bugs": {
38
+ "url": "https://github.com/mcpslim/serena-slim/issues"
36
39
  }
37
- }
40
+ }
@@ -4,12 +4,12 @@
4
4
  "algorithm_version": "v2.1",
5
5
  "rules": {
6
6
  "default_minifier": "first_sentence",
7
- "remove_params_description": true
7
+ "remove_params_description": false
8
8
  },
9
9
  "groups": [
10
10
  {
11
11
  "name": "read",
12
- "description": "Access file contents or relevant memory data to provide contextual information for the current task.",
12
+ "description": "read operations",
13
13
  "mapping": {
14
14
  "file": "read_file",
15
15
  "memory": "read_memory"
@@ -25,18 +25,22 @@
25
25
  ]
26
26
  },
27
27
  "relative_path": {
28
- "type": "string"
28
+ "type": "string",
29
+ "description": "relative path to the file to read."
29
30
  },
30
31
  "start_line": {
31
32
  "type": "integer",
32
- "default": 0
33
+ "default": 0,
34
+ "description": "0-based index of the first line to be retrieved."
33
35
  },
34
36
  "end_line": {
35
- "default": null
37
+ "default": null,
38
+ "description": "0-based index of the last line to be retrieved (inclusive)."
36
39
  },
37
40
  "max_answer_chars": {
38
41
  "type": "integer",
39
- "default": -1
42
+ "default": -1,
43
+ "description": "If the file (chunk) is longer than this number of characters,\nno content will be returned."
40
44
  },
41
45
  "memory_file_name": {
42
46
  "type": "string"
@@ -51,7 +55,7 @@
51
55
  },
52
56
  {
53
57
  "name": "list",
54
- "description": "Explore filesystem contents and available memories to locate specific files or data storage.",
58
+ "description": "list operations",
55
59
  "mapping": {
56
60
  "dir": "list_dir",
57
61
  "memories": "list_memories"
@@ -67,18 +71,22 @@
67
71
  ]
68
72
  },
69
73
  "relative_path": {
70
- "type": "string"
74
+ "type": "string",
75
+ "description": "relative path to the directory to list; pass \"."
71
76
  },
72
77
  "recursive": {
73
- "type": "boolean"
78
+ "type": "boolean",
79
+ "description": "Whether to scan subdirectories recursively."
74
80
  },
75
81
  "skip_ignored_files": {
76
82
  "type": "boolean",
77
- "default": false
83
+ "default": false,
84
+ "description": "Whether to skip files and directories that are ignored."
78
85
  },
79
86
  "max_answer_chars": {
80
87
  "type": "integer",
81
- "default": -1
88
+ "default": -1,
89
+ "description": "If the output is longer than this number of characters,\nno content will be returned."
82
90
  }
83
91
  },
84
92
  "required": [
@@ -90,7 +98,7 @@
90
98
  },
91
99
  {
92
100
  "name": "find",
93
- "description": "Locate files, discover code symbols, and pinpoint references to specific symbols within a codebase.",
101
+ "description": "find operations",
94
102
  "mapping": {
95
103
  "file": "find_file",
96
104
  "symbol": "find_symbol",
@@ -108,10 +116,12 @@
108
116
  ]
109
117
  },
110
118
  "file_mask": {
111
- "type": "string"
119
+ "type": "string",
120
+ "description": "filename or file mask (using the wildcards * or ?"
112
121
  },
113
122
  "relative_path": {
114
- "type": "string"
123
+ "type": "string",
124
+ "description": "relative path to the directory to search in; pass \"."
115
125
  },
116
126
  "name_path_pattern": {
117
127
  "type": "string"
@@ -161,7 +171,7 @@
161
171
  },
162
172
  {
163
173
  "name": "replace",
164
- "description": "Replace file content via pattern matching or directly substitute the body of identified code symbols.",
174
+ "description": "replace operations",
165
175
  "mapping": {
166
176
  "content": "replace_content",
167
177
  "symbol_body": "replace_symbol_body"
@@ -177,24 +187,29 @@
177
187
  ]
178
188
  },
179
189
  "relative_path": {
180
- "type": "string"
190
+ "type": "string",
191
+ "description": "relative path to the file."
181
192
  },
182
193
  "needle": {
183
- "type": "string"
194
+ "type": "string",
195
+ "description": "string or regex pattern to search for."
184
196
  },
185
197
  "repl": {
186
- "type": "string"
198
+ "type": "string",
199
+ "description": "replacement string (verbatim)."
187
200
  },
188
201
  "mode": {
189
202
  "type": "string",
190
203
  "enum": [
191
204
  "literal",
192
205
  "regex"
193
- ]
206
+ ],
207
+ "description": "Either \"literal\" or \"regex\", specifying how the `needle` parameter is to be interpreted."
194
208
  },
195
209
  "allow_multiple_occurrences": {
196
210
  "type": "boolean",
197
- "default": false
211
+ "default": false,
212
+ "description": "If True, the regex may match multiple occurrences in the file\nand all of them will be replaced."
198
213
  },
199
214
  "name_path": {
200
215
  "type": "string"
@@ -216,7 +231,7 @@
216
231
  },
217
232
  {
218
233
  "name": "get",
219
- "description": "Analyze code symbols within files and display the agent’s current working configuration details.",
234
+ "description": "get operations",
220
235
  "mapping": {
221
236
  "symbols_overview": "get_symbols_overview",
222
237
  "current_config": "get_current_config"
@@ -232,15 +247,18 @@
232
247
  ]
233
248
  },
234
249
  "relative_path": {
235
- "type": "string"
250
+ "type": "string",
251
+ "description": "relative path to the file to get the overview of."
236
252
  },
237
253
  "depth": {
238
254
  "type": "integer",
239
- "default": 0
255
+ "default": 0,
256
+ "description": "Depth up to which descendants of top-level symbols shall be retrieved\n(e."
240
257
  },
241
258
  "max_answer_chars": {
242
259
  "type": "integer",
243
- "default": -1
260
+ "default": -1,
261
+ "description": "If the overview is longer than this number of characters,\nno content will be returned."
244
262
  }
245
263
  },
246
264
  "required": [
@@ -251,7 +269,7 @@
251
269
  },
252
270
  {
253
271
  "name": "insert",
254
- "description": "Modify code by precisely inserting new content either before or after existing symbol definitions.",
272
+ "description": "insert operations",
255
273
  "mapping": {
256
274
  "after_symbol": "insert_after_symbol",
257
275
  "before_symbol": "insert_before_symbol"
@@ -267,13 +285,16 @@
267
285
  ]
268
286
  },
269
287
  "name_path": {
270
- "type": "string"
288
+ "type": "string",
289
+ "description": "Name path of the symbol after which to insert content (definitions in the `find_symbol` tool apply)."
271
290
  },
272
291
  "relative_path": {
273
- "type": "string"
292
+ "type": "string",
293
+ "description": "relative path to the file containing the symbol."
274
294
  },
275
295
  "body": {
276
- "type": "string"
296
+ "type": "string",
297
+ "description": "body/content to be inserted."
277
298
  }
278
299
  },
279
300
  "required": [
@@ -286,7 +307,7 @@
286
307
  },
287
308
  {
288
309
  "name": "think",
289
- "description": "Evaluate gathered information, task progress, and completion status to guide effective AI assistant reasoning.",
310
+ "description": "think operations",
290
311
  "mapping": {
291
312
  "about_collected_information": "think_about_collected_information",
292
313
  "about_task_adherence": "think_about_task_adherence",
@@ -311,7 +332,7 @@
311
332
  },
312
333
  {
313
334
  "name": "memory",
314
- "description": "Manage persistent project knowledge by storing, deleting, and regex-based updating of markdown files.",
335
+ "description": "memory operations",
315
336
  "mapping": {
316
337
  "write": "write_memory",
317
338
  "delete": "delete_memory",
@@ -374,7 +395,5 @@
374
395
  "onboarding",
375
396
  "prepare_for_new_conversation",
376
397
  "initial_instructions"
377
- ],
378
- "ai_enhanced": true,
379
- "enhanced_at": "2026-01-05T07:32:33.116Z"
398
+ ]
380
399
  }
Binary file
Binary file
Binary file