syntax-map-mcp 0.1.6 → 0.1.8

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/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.1.8 - 2026-05-07
6
+
7
+ - `docs/tools.md`의 도구 목록이 실제 MCP `listTools()` 응답과 일치하는지 검증하도록 했습니다.
8
+ - MCP `listTools()` 응답의 공개 tool 이름과 주요 input schema 필드를 검증하는 테스트를 추가했습니다.
9
+ - `release:check`가 npm 패키지를 tarball로 설치한 뒤 MCP 초기화 응답을 확인하는 smoke test를 실행하도록 했습니다.
10
+
11
+ ## 0.1.7 - 2026-05-07
12
+
13
+ - `release:check`가 npm 패키징 dry-run 결과의 필수 파일 포함 여부를 자동 검증하도록 했습니다.
14
+ - MCP 서버 metadata의 version이 `package.json` 버전과 동기화되도록 했습니다.
15
+
5
16
  ## 0.1.6 - 2026-05-06
6
17
 
7
18
  - 하위 디렉터리의 `.gitignore` 패턴도 인덱싱 대상 파일 제외에 반영하도록 했습니다.
package/dist/server.js CHANGED
@@ -1,10 +1,24 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
1
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
5
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
6
  import { registerTools } from './tools.js';
4
7
  import { createWorkspace } from './workspace.js';
8
+ export async function createServerInfo() {
9
+ const packageJsonPath = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
10
+ const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf8'));
11
+ if (typeof packageJson.version !== 'string') {
12
+ throw new Error('package.json version is missing');
13
+ }
14
+ return {
15
+ name: 'syntax-map-mcp',
16
+ version: packageJson.version
17
+ };
18
+ }
5
19
  export async function createServer(options) {
6
20
  const workspace = await createWorkspace(options.workspaceRoot);
7
- const server = new McpServer({ name: 'syntax-map-mcp', version: '0.1.0' }, {
21
+ const server = new McpServer(await createServerInfo(), {
8
22
  instructions: 'Analyze JavaScript, TypeScript, and Python source files under the configured workspaceRoot only.'
9
23
  });
10
24
  registerTools(server, workspace);
package/docs/tools.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  syntax-map-mcp의 주요 MCP 도구 입력과 응답 예시입니다. 응답 예시는 핵심 필드만 보여줍니다.
4
4
 
5
- ## summarize_file
5
+ ## list_symbols
6
6
 
7
7
  입력:
8
8
 
@@ -19,28 +19,26 @@ syntax-map-mcp의 주요 MCP 도구 입력과 응답 예시입니다. 응답 예
19
19
  "ok": true,
20
20
  "path": "src/index.ts",
21
21
  "language": "typescript",
22
- "imports": ["import { createServer } from './server.js';"],
23
- "exports": ["export async function main() {"],
24
- "sources": {
25
- "symbols": "ast",
26
- "imports": "ast",
27
- "exports": "ast"
28
- }
22
+ "symbols": [
23
+ {
24
+ "name": "main",
25
+ "kind": "function",
26
+ "line": 3,
27
+ "column": 1
28
+ }
29
+ ]
29
30
  }
30
31
  ```
31
32
 
32
- ## search_symbols
33
+ ## find_definition
33
34
 
34
35
  입력:
35
36
 
36
37
  ```json
37
38
  {
38
- "query": "UserService",
39
- "kinds": ["class"],
40
- "refreshIfStale": true,
41
- "contextBefore": 2,
42
- "contextAfter": 2,
43
- "includePreview": true
39
+ "name": "UserService",
40
+ "paths": ["src/users.ts", "src/index.ts"],
41
+ "kinds": ["class"]
44
42
  }
45
43
  ```
46
44
 
@@ -49,34 +47,24 @@ syntax-map-mcp의 주요 MCP 도구 입력과 응답 예시입니다. 응답 예
49
47
  ```json
50
48
  {
51
49
  "ok": true,
52
- "isStale": false,
53
- "refreshed": true,
54
- "symbols": [
50
+ "definitions": [
55
51
  {
56
52
  "path": "src/users.ts",
57
53
  "name": "UserService",
58
- "kind": "class",
59
- "snippet": "export class UserService {",
60
- "context": {
61
- "before": ["export type UserId = User['id'];", ""],
62
- "after": [" constructor(private readonly users: User[]) {}", ""]
63
- },
64
- "previewMarkdown": "src/users.ts:8\n\n```typescript\nexport type UserId = User['id'];\n\nexport class UserService {\n constructor(private readonly users: User[]) {}\n\n```"
54
+ "kind": "class"
65
55
  }
66
56
  ]
67
57
  }
68
58
  ```
69
59
 
70
- ## find_indexed_definition
60
+ ## find_references
71
61
 
72
62
  입력:
73
63
 
74
64
  ```json
75
65
  {
76
- "name": "UserService",
77
- "refreshIfStale": true,
78
- "contextBefore": 1,
79
- "contextAfter": 1
66
+ "name": "formatUser",
67
+ "paths": ["src/users.ts", "src/index.ts"]
80
68
  }
81
69
  ```
82
70
 
@@ -85,27 +73,23 @@ syntax-map-mcp의 주요 MCP 도구 입력과 응답 예시입니다. 응답 예
85
73
  ```json
86
74
  {
87
75
  "ok": true,
88
- "total": 1,
89
- "definitions": [
76
+ "references": [
90
77
  {
91
- "path": "src/users.ts",
92
- "name": "UserService",
93
- "kind": "class",
94
- "snippet": "export class UserService {"
78
+ "path": "src/index.ts",
79
+ "name": "formatUser",
80
+ "nodeType": "identifier"
95
81
  }
96
82
  ]
97
83
  }
98
84
  ```
99
85
 
100
- ## find_indexed_references
86
+ ## summarize_file
101
87
 
102
88
  입력:
103
89
 
104
90
  ```json
105
91
  {
106
- "name": "formatUser",
107
- "limit": 20,
108
- "refreshIfStale": true
92
+ "path": "src/index.ts"
109
93
  }
110
94
  ```
111
95
 
@@ -114,12 +98,43 @@ syntax-map-mcp의 주요 MCP 도구 입력과 응답 예시입니다. 응답 예
114
98
  ```json
115
99
  {
116
100
  "ok": true,
117
- "references": [
101
+ "path": "src/index.ts",
102
+ "language": "typescript",
103
+ "imports": ["import { createServer } from './server.js';"],
104
+ "exports": ["export async function main() {"],
105
+ "sources": {
106
+ "symbols": "ast",
107
+ "imports": "ast",
108
+ "exports": "ast"
109
+ }
110
+ }
111
+ ```
112
+
113
+ ## run_query
114
+
115
+ 입력:
116
+
117
+ ```json
118
+ {
119
+ "path": "src/users.ts",
120
+ "query": "(class_declaration name: (type_identifier) @class.name)"
121
+ }
122
+ ```
123
+
124
+ 응답 일부:
125
+
126
+ ```json
127
+ {
128
+ "ok": true,
129
+ "matches": [
118
130
  {
119
- "path": "src/users.ts",
120
- "name": "formatUser",
121
- "nodeType": "identifier",
122
- "snippet": "formatUser(defaultUser);"
131
+ "pattern": 0,
132
+ "captures": [
133
+ {
134
+ "name": "class.name",
135
+ "text": "UserService"
136
+ }
137
+ ]
123
138
  }
124
139
  ]
125
140
  }
@@ -187,6 +202,122 @@ syntax-map-mcp의 주요 MCP 도구 입력과 응답 예시입니다. 응답 예
187
202
  }
188
203
  ```
189
204
 
205
+ ## index_workspace
206
+
207
+ 입력:
208
+
209
+ ```json
210
+ {}
211
+ ```
212
+
213
+ 응답 일부:
214
+
215
+ ```json
216
+ {
217
+ "ok": true,
218
+ "indexedFiles": 12,
219
+ "symbols": 84,
220
+ "references": 231,
221
+ "indexPath": "/workspace/.syntax-map-mcp/index.sqlite"
222
+ }
223
+ ```
224
+
225
+ ## search_symbols
226
+
227
+ 입력:
228
+
229
+ ```json
230
+ {
231
+ "query": "UserService",
232
+ "kinds": ["class"],
233
+ "refreshIfStale": true,
234
+ "contextBefore": 2,
235
+ "contextAfter": 2,
236
+ "includePreview": true
237
+ }
238
+ ```
239
+
240
+ 응답 일부:
241
+
242
+ ```json
243
+ {
244
+ "ok": true,
245
+ "isStale": false,
246
+ "refreshed": true,
247
+ "symbols": [
248
+ {
249
+ "path": "src/users.ts",
250
+ "name": "UserService",
251
+ "kind": "class",
252
+ "snippet": "export class UserService {",
253
+ "context": {
254
+ "before": ["export type UserId = User['id'];", ""],
255
+ "after": [" constructor(private readonly users: User[]) {}", ""]
256
+ },
257
+ "previewMarkdown": "src/users.ts:8\n\n```typescript\nexport type UserId = User['id'];\n\nexport class UserService {\n constructor(private readonly users: User[]) {}\n\n```"
258
+ }
259
+ ]
260
+ }
261
+ ```
262
+
263
+ ## find_indexed_definition
264
+
265
+ 입력:
266
+
267
+ ```json
268
+ {
269
+ "name": "UserService",
270
+ "refreshIfStale": true,
271
+ "contextBefore": 1,
272
+ "contextAfter": 1
273
+ }
274
+ ```
275
+
276
+ 응답 일부:
277
+
278
+ ```json
279
+ {
280
+ "ok": true,
281
+ "total": 1,
282
+ "definitions": [
283
+ {
284
+ "path": "src/users.ts",
285
+ "name": "UserService",
286
+ "kind": "class",
287
+ "snippet": "export class UserService {"
288
+ }
289
+ ]
290
+ }
291
+ ```
292
+
293
+ ## find_indexed_references
294
+
295
+ 입력:
296
+
297
+ ```json
298
+ {
299
+ "name": "formatUser",
300
+ "limit": 20,
301
+ "refreshIfStale": true
302
+ }
303
+ ```
304
+
305
+ 응답 일부:
306
+
307
+ ```json
308
+ {
309
+ "ok": true,
310
+ "references": [
311
+ {
312
+ "path": "src/users.ts",
313
+ "name": "formatUser",
314
+ "nodeType": "identifier",
315
+ "snippet": "formatUser(defaultUser);"
316
+ }
317
+ ]
318
+ }
319
+ ```
320
+
190
321
  ## get_index_status
191
322
 
192
323
  입력:
@@ -206,3 +337,21 @@ syntax-map-mcp의 주요 MCP 도구 입력과 응답 예시입니다. 응답 예
206
337
  "staleFiles": 0
207
338
  }
208
339
  ```
340
+
341
+ ## clear_index
342
+
343
+ 입력:
344
+
345
+ ```json
346
+ {}
347
+ ```
348
+
349
+ 응답 일부:
350
+
351
+ ```json
352
+ {
353
+ "ok": true,
354
+ "indexPath": "/workspace/.syntax-map-mcp/index.sqlite",
355
+ "deleted": true
356
+ }
357
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syntax-map-mcp",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Tree-sitter based code analysis MCP server",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "test": "vitest run",
32
32
  "test:watch": "vitest",
33
33
  "typecheck": "tsc -p tsconfig.json --noEmit",
34
- "release:check": "npm run typecheck && npm test && npm run build && npm pack --dry-run"
34
+ "release:check": "npm run typecheck && npm test && npm run build && node scripts/check-package-files.mjs && node scripts/smoke-package-install.mjs"
35
35
  },
36
36
  "dependencies": {
37
37
  "@modelcontextprotocol/sdk": "^1.29.0",