@j0hanz/filesystem-context-mcp 1.0.1 β 1.0.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/README.md +571 -532
- package/dist/__tests__/lib/errors.test.js +36 -1
- package/dist/__tests__/lib/errors.test.js.map +1 -1
- package/dist/__tests__/lib/file-operations.test.js +1 -1
- package/dist/__tests__/lib/file-operations.test.js.map +1 -1
- package/dist/__tests__/lib/formatters.test.d.ts +2 -0
- package/dist/__tests__/lib/formatters.test.d.ts.map +1 -0
- package/dist/__tests__/lib/formatters.test.js +251 -0
- package/dist/__tests__/lib/formatters.test.js.map +1 -0
- package/dist/__tests__/lib/image-parsing.test.d.ts +2 -0
- package/dist/__tests__/lib/image-parsing.test.d.ts.map +1 -0
- package/dist/__tests__/lib/image-parsing.test.js +265 -0
- package/dist/__tests__/lib/image-parsing.test.js.map +1 -0
- package/dist/__tests__/schemas/validators.test.d.ts +2 -0
- package/dist/__tests__/schemas/validators.test.d.ts.map +1 -0
- package/dist/__tests__/schemas/validators.test.js +142 -0
- package/dist/__tests__/schemas/validators.test.js.map +1 -0
- package/dist/config/types.d.ts +29 -3
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/index.js +5 -12
- package/dist/index.js.map +1 -1
- package/dist/lib/constants.d.ts +8 -0
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +10 -0
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors.d.ts +2 -6
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +59 -58
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/file-operations.d.ts +0 -12
- package/dist/lib/file-operations.d.ts.map +1 -1
- package/dist/lib/file-operations.js +70 -207
- package/dist/lib/file-operations.js.map +1 -1
- package/dist/lib/fs-helpers.d.ts.map +1 -1
- package/dist/lib/fs-helpers.js +50 -11
- package/dist/lib/fs-helpers.js.map +1 -1
- package/dist/lib/image-parsing.d.ts +8 -0
- package/dist/lib/image-parsing.d.ts.map +1 -0
- package/dist/lib/image-parsing.js +119 -0
- package/dist/lib/image-parsing.js.map +1 -0
- package/dist/lib/path-validation.d.ts.map +1 -1
- package/dist/lib/path-validation.js +1 -4
- package/dist/lib/path-validation.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/inputs.d.ts.map +1 -1
- package/dist/schemas/inputs.js +9 -4
- package/dist/schemas/inputs.js.map +1 -1
- package/dist/schemas/outputs.d.ts +12 -9
- package/dist/schemas/outputs.d.ts.map +1 -1
- package/dist/schemas/outputs.js +10 -3
- package/dist/schemas/outputs.js.map +1 -1
- package/dist/schemas/validators.d.ts +12 -0
- package/dist/schemas/validators.d.ts.map +1 -0
- package/dist/schemas/validators.js +35 -0
- package/dist/schemas/validators.js.map +1 -0
- package/dist/server.d.ts +3 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +26 -15
- package/dist/server.js.map +1 -1
- package/dist/tools/analyze-directory.js +1 -1
- package/dist/tools/analyze-directory.js.map +1 -1
- package/dist/tools/directory-tree.js +1 -1
- package/dist/tools/directory-tree.js.map +1 -1
- package/dist/tools/list-directory.js +1 -1
- package/dist/tools/list-directory.js.map +1 -1
- package/dist/tools/read-file.d.ts.map +1 -1
- package/dist/tools/read-file.js +3 -0
- package/dist/tools/read-file.js.map +1 -1
- package/dist/tools/read-multiple-files.d.ts.map +1 -1
- package/dist/tools/read-multiple-files.js +3 -0
- package/dist/tools/read-multiple-files.js.map +1 -1
- package/dist/tools/search-content.d.ts.map +1 -1
- package/dist/tools/search-content.js +4 -3
- package/dist/tools/search-content.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,532 +1,571 @@
|
|
|
1
|
-
# Filesystem Context MCP Server
|
|
2
|
-
|
|
3
|
-
A secure, read-only MCP server for filesystem scanning, searching, and analysis with comprehensive security validation.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@j0hanz/filesystem-context-mcp)
|
|
6
|
-
[](LICENSE)
|
|
7
|
-
[](https://nodejs.org)
|
|
8
|
-
[](https://www.typescriptlang.org/)
|
|
9
|
-
[](https://modelcontextprotocol.io)
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
###
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
###
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
###
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
| `
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
|
225
|
-
|
|
|
226
|
-
| `
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
| `
|
|
244
|
-
| `
|
|
245
|
-
| `
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
|
272
|
-
|
|
|
273
|
-
| `
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
### `
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
| Parameter
|
|
305
|
-
|
|
|
306
|
-
| `path`
|
|
307
|
-
| `
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
</details>
|
|
371
|
-
|
|
372
|
-
<details>
|
|
373
|
-
<summary><b>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
"
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
β
|
|
468
|
-
|
|
469
|
-
β
|
|
470
|
-
β
|
|
471
|
-
β
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
-
|
|
530
|
-
-
|
|
531
|
-
|
|
532
|
-
|
|
1
|
+
# Filesystem Context MCP Server
|
|
2
|
+
|
|
3
|
+
A secure, read-only MCP server for filesystem scanning, searching, and analysis with comprehensive security validation.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@j0hanz/filesystem-context-mcp)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://nodejs.org)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://modelcontextprotocol.io)
|
|
10
|
+
|
|
11
|
+
## One-Click Install
|
|
12
|
+
|
|
13
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=filesystem-context&inputs=%5B%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-context-mcp%40latest%22%2C%22%24%7BworkspaceFolder%7D%22%5D%7D)[](https://insiders.vscode.dev/redirect/mcp/install?name=filesystem-context&inputs=%5B%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-context-mcp%40latest%22%2C%22%24%7BworkspaceFolder%7D%22%5D%7D&quality=insiders)
|
|
14
|
+
|
|
15
|
+
[](https://cursor.com/install-mcp?name=filesystem-context&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmlsZXN5c3RlbS1jb250ZXh0LW1jcEBsYXRlc3QiLCIke3dvcmtzcGFjZUZvbGRlcn0iXX0=)
|
|
16
|
+
|
|
17
|
+
## β¨ Features
|
|
18
|
+
|
|
19
|
+
| Feature | Description |
|
|
20
|
+
| -------------------------- | ---------------------------------------------------------------------- |
|
|
21
|
+
| π **Directory Listing** | List and explore directory contents with recursive support |
|
|
22
|
+
| π **File Search** | Find files using glob patterns like `**/*.ts` |
|
|
23
|
+
| π **Content Search** | Search text within files using regex with context lines |
|
|
24
|
+
| π **Directory Analysis** | Get statistics, file types, largest files, and recently modified files |
|
|
25
|
+
| π³ **Directory Tree** | JSON tree structure optimized for AI parsing |
|
|
26
|
+
| π **File Reading** | Read single or multiple files with head/tail and line range support |
|
|
27
|
+
| πΌοΈ **Media File Support** | Read binary files (images, audio, video) as base64 |
|
|
28
|
+
| π **Security First** | Path validation, symlink escape protection, and access control |
|
|
29
|
+
| β‘ **Parallel Operations** | Efficient batch file reading with configurable concurrency |
|
|
30
|
+
|
|
31
|
+
## π― When to Use
|
|
32
|
+
|
|
33
|
+
| Task | Tool |
|
|
34
|
+
| -------------------------------- | -------------------------- |
|
|
35
|
+
| Explore project structure | `list_directory` |
|
|
36
|
+
| Find specific file types | `search_files` |
|
|
37
|
+
| Search for code patterns/text | `search_content` |
|
|
38
|
+
| Understand codebase statistics | `analyze_directory` |
|
|
39
|
+
| Get AI-friendly project overview | `directory_tree` |
|
|
40
|
+
| Read source code | `read_file` |
|
|
41
|
+
| Batch read multiple files | `read_multiple_files` |
|
|
42
|
+
| Get file metadata (size, dates) | `get_file_info` |
|
|
43
|
+
| Read images or binary files | `read_media_file` |
|
|
44
|
+
| Check available directories | `list_allowed_directories` |
|
|
45
|
+
|
|
46
|
+
## π Quick Start
|
|
47
|
+
|
|
48
|
+
### NPX (Recommended - Zero Config)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Works in current directory automatically!
|
|
52
|
+
npx -y @j0hanz/filesystem-context-mcp@latest
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Or specify directories explicitly:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx -y @j0hanz/filesystem-context-mcp@latest /path/to/your/project
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### VS Code (with workspace folder)
|
|
62
|
+
|
|
63
|
+
Add to your VS Code settings (`.vscode/mcp.json`):
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"servers": {
|
|
68
|
+
"filesystem-context": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": [
|
|
71
|
+
"-y",
|
|
72
|
+
"@j0hanz/filesystem-context-mcp@latest",
|
|
73
|
+
"${workspaceFolder}"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
> **Tip:** `${workspaceFolder}` automatically uses your current VS Code workspace. You can also omit it and the server will use its current working directory.
|
|
81
|
+
|
|
82
|
+
### Claude Desktop
|
|
83
|
+
|
|
84
|
+
Add to your Claude Desktop configuration (`claude_desktop_config.json`):
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"filesystem-context": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["-y", "@j0hanz/filesystem-context-mcp@latest"]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
> **Note:** Claude Desktop will use the current working directory automatically. No path arguments needed!
|
|
98
|
+
|
|
99
|
+
## π¦ Installation
|
|
100
|
+
|
|
101
|
+
### NPX (No Installation)
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npx -y @j0hanz/filesystem-context-mcp@latest /path/to/dir1 /path/to/dir2
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Global Installation
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm install -g @j0hanz/filesystem-context-mcp
|
|
111
|
+
filesystem-context-mcp /path/to/your/project
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### From Source
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
git clone https://github.com/j0hanz/filesystem-context-mcp-server.git
|
|
118
|
+
cd filesystem-context-mcp-server
|
|
119
|
+
npm install
|
|
120
|
+
npm run build
|
|
121
|
+
node dist/index.js /path/to/your/project
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## βοΈ Configuration
|
|
125
|
+
|
|
126
|
+
### Directory Resolution (Priority Order)
|
|
127
|
+
|
|
128
|
+
The server determines which directories to access in this order:
|
|
129
|
+
|
|
130
|
+
1. **CLI Arguments** - Explicitly passed paths take highest priority
|
|
131
|
+
2. **MCP Roots Protocol** - Directories provided by the MCP client
|
|
132
|
+
3. **Current Working Directory** - Automatic fallback for plug-and-play experience
|
|
133
|
+
|
|
134
|
+
This means you can run the server with zero configuration and it will work!
|
|
135
|
+
|
|
136
|
+
### Command Line Arguments
|
|
137
|
+
|
|
138
|
+
Optionally specify one or more directory paths as arguments:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
filesystem-context-mcp /home/user/project /home/user/docs
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### MCP Roots Protocol
|
|
145
|
+
|
|
146
|
+
If no CLI arguments are provided, the server will use the MCP Roots protocol to receive allowed directories from the client (if supported).
|
|
147
|
+
|
|
148
|
+
### Zero-Config Mode
|
|
149
|
+
|
|
150
|
+
If neither CLI arguments nor MCP Roots provide directories, the server automatically uses the current working directory. This makes it truly plug-and-play!
|
|
151
|
+
|
|
152
|
+
### Environment Variables
|
|
153
|
+
|
|
154
|
+
| Variable | Description |
|
|
155
|
+
| ---------- | --------------------------------------------- |
|
|
156
|
+
| `NODE_ENV` | Set to `production` for optimized performance |
|
|
157
|
+
|
|
158
|
+
## π§ Tools
|
|
159
|
+
|
|
160
|
+
### `list_allowed_directories`
|
|
161
|
+
|
|
162
|
+
List all directories that this server is allowed to access.
|
|
163
|
+
|
|
164
|
+
| Parameter | Type | Required | Default | Description |
|
|
165
|
+
| --------- | ---- | -------- | ------- | ---------------------- |
|
|
166
|
+
| _(none)_ | - | - | - | No parameters required |
|
|
167
|
+
|
|
168
|
+
**Returns:** Array of allowed directory paths.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### `list_directory`
|
|
173
|
+
|
|
174
|
+
List contents of a directory with optional recursive listing.
|
|
175
|
+
|
|
176
|
+
| Parameter | Type | Required | Default | Description |
|
|
177
|
+
| ----------------------- | ------- | -------- | ------- | ------------------------------------------- |
|
|
178
|
+
| `path` | string | β
| - | Directory path to list |
|
|
179
|
+
| `recursive` | boolean | β | `false` | List recursively |
|
|
180
|
+
| `includeHidden` | boolean | β | `false` | Include hidden files |
|
|
181
|
+
| `maxDepth` | number | β | `10` | Maximum depth for recursive listing (0-100) |
|
|
182
|
+
| `maxEntries` | number | β | - | Maximum entries to return (1-100,000) |
|
|
183
|
+
| `sortBy` | string | β | `name` | Sort by: `name`, `size`, `modified`, `type` |
|
|
184
|
+
| `includeSymlinkTargets` | boolean | β | `false` | Include symlink target paths |
|
|
185
|
+
|
|
186
|
+
**Returns:** List of entries with name, type, size, and modified date.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
### `search_files`
|
|
191
|
+
|
|
192
|
+
Search for files using glob patterns.
|
|
193
|
+
|
|
194
|
+
| Parameter | Type | Required | Default | Description |
|
|
195
|
+
| ----------------- | -------- | -------- | ------- | --------------------------------------------- |
|
|
196
|
+
| `path` | string | β
| - | Base directory to search from |
|
|
197
|
+
| `pattern` | string | β
| - | Glob pattern (e.g., `**/*.ts`, `src/**/*.js`) |
|
|
198
|
+
| `excludePatterns` | string[] | β | `[]` | Patterns to exclude |
|
|
199
|
+
| `maxResults` | number | β | - | Maximum matches to return (1-10,000) |
|
|
200
|
+
| `sortBy` | string | β | `path` | Sort by: `name`, `size`, `modified`, `path` |
|
|
201
|
+
| `maxDepth` | number | β | - | Maximum directory depth to search (1-100) |
|
|
202
|
+
|
|
203
|
+
**Returns:** List of matching files with path, type, size, and modified date.
|
|
204
|
+
|
|
205
|
+
**Example:**
|
|
206
|
+
|
|
207
|
+
```json
|
|
208
|
+
{
|
|
209
|
+
"path": "/project",
|
|
210
|
+
"pattern": "**/*.ts",
|
|
211
|
+
"excludePatterns": ["node_modules/**", "dist/**"]
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
### `read_file`
|
|
218
|
+
|
|
219
|
+
Read the contents of a text file.
|
|
220
|
+
|
|
221
|
+
| Parameter | Type | Required | Default | Description |
|
|
222
|
+
| ----------- | ------ | -------- | ------- | ------------------------------------------------ |
|
|
223
|
+
| `path` | string | β
| - | File path to read |
|
|
224
|
+
| `encoding` | string | β | `utf-8` | File encoding (`utf-8`, `ascii`, `base64`, etc.) |
|
|
225
|
+
| `maxSize` | number | β | 10MB | Maximum file size in bytes |
|
|
226
|
+
| `lineStart` | number | β | - | Start line (1-indexed) for reading a range |
|
|
227
|
+
| `lineEnd` | number | β | - | End line (inclusive) for reading a range |
|
|
228
|
+
| `head` | number | β | - | Read only first N lines |
|
|
229
|
+
| `tail` | number | β | - | Read only last N lines |
|
|
230
|
+
|
|
231
|
+
> **Note:** Cannot specify both `head` and `tail` simultaneously. Use `lineStart`/`lineEnd` for range reading.
|
|
232
|
+
|
|
233
|
+
**Returns:** File contents as text.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### `read_multiple_files`
|
|
238
|
+
|
|
239
|
+
Read multiple files in parallel for efficient batch operations.
|
|
240
|
+
|
|
241
|
+
| Parameter | Type | Required | Default | Description |
|
|
242
|
+
| ---------- | -------- | -------- | ------- | ------------------------------------ |
|
|
243
|
+
| `paths` | string[] | β
| - | Array of file paths (max 100) |
|
|
244
|
+
| `encoding` | string | β | `utf-8` | File encoding |
|
|
245
|
+
| `maxSize` | number | β | 10MB | Maximum file size per file |
|
|
246
|
+
| `head` | number | β | - | Read only first N lines of each file |
|
|
247
|
+
| `tail` | number | β | - | Read only last N lines of each file |
|
|
248
|
+
|
|
249
|
+
**Returns:** Array of results with content or error for each file.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### `get_file_info`
|
|
254
|
+
|
|
255
|
+
Get detailed metadata about a file or directory.
|
|
256
|
+
|
|
257
|
+
| Parameter | Type | Required | Default | Description |
|
|
258
|
+
| --------- | ------ | -------- | ------- | ------------------------- |
|
|
259
|
+
| `path` | string | β
| - | Path to file or directory |
|
|
260
|
+
|
|
261
|
+
**Returns:** Metadata including name, type, size, created/modified/accessed timestamps, permissions, MIME type, and symlink target (if applicable).
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### `search_content`
|
|
266
|
+
|
|
267
|
+
Search for text content within files using regular expressions.
|
|
268
|
+
|
|
269
|
+
| Parameter | Type | Required | Default | Description |
|
|
270
|
+
| ----------------- | -------- | -------- | ------- | ------------------------------------------------ |
|
|
271
|
+
| `path` | string | β
| - | Base directory to search in |
|
|
272
|
+
| `pattern` | string | β
| - | Regex pattern to search for |
|
|
273
|
+
| `filePattern` | string | β | `**/*` | Glob pattern to filter files |
|
|
274
|
+
| `excludePatterns` | string[] | β | `[]` | Glob patterns to exclude |
|
|
275
|
+
| `caseSensitive` | boolean | β | `false` | Case-sensitive search |
|
|
276
|
+
| `maxResults` | number | β | `100` | Maximum number of results (1-10,000) |
|
|
277
|
+
| `maxFileSize` | number | β | 1MB | Maximum file size to scan |
|
|
278
|
+
| `maxFilesScanned` | number | β | - | Maximum files to scan before stopping |
|
|
279
|
+
| `timeoutMs` | number | β | - | Timeout in milliseconds (100-3,600,000) |
|
|
280
|
+
| `skipBinary` | boolean | β | `true` | Skip binary files |
|
|
281
|
+
| `contextLines` | number | β | `0` | Lines of context before/after match (0-10) |
|
|
282
|
+
| `wholeWord` | boolean | β | `false` | Match whole words only |
|
|
283
|
+
| `isLiteral` | boolean | β | `false` | Treat pattern as literal string (escape special) |
|
|
284
|
+
|
|
285
|
+
**Returns:** Matching lines with file path, line number, content, and optional context.
|
|
286
|
+
|
|
287
|
+
**Example:**
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"path": "/project/src",
|
|
292
|
+
"pattern": "TODO|FIXME",
|
|
293
|
+
"filePattern": "**/*.ts",
|
|
294
|
+
"contextLines": 2
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
### `analyze_directory`
|
|
301
|
+
|
|
302
|
+
Analyze a directory structure and return statistics.
|
|
303
|
+
|
|
304
|
+
| Parameter | Type | Required | Default | Description |
|
|
305
|
+
| ----------------- | -------- | -------- | ------- | -------------------------------------- |
|
|
306
|
+
| `path` | string | β
| - | Directory to analyze |
|
|
307
|
+
| `maxDepth` | number | β | `10` | Maximum depth to analyze (0-100) |
|
|
308
|
+
| `topN` | number | β | `10` | Number of top items to return (1-1000) |
|
|
309
|
+
| `excludePatterns` | string[] | β | `[]` | Glob patterns to exclude |
|
|
310
|
+
| `includeHidden` | boolean | β | `false` | Include hidden files and directories |
|
|
311
|
+
|
|
312
|
+
**Returns:** Statistics including total files/directories, total size, file type distribution, largest files, and recently modified files.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
### `directory_tree`
|
|
317
|
+
|
|
318
|
+
Get a JSON tree structure of a directory, optimized for AI parsing.
|
|
319
|
+
|
|
320
|
+
| Parameter | Type | Required | Default | Description |
|
|
321
|
+
| ----------------- | -------- | -------- | ------- | --------------------------------------- |
|
|
322
|
+
| `path` | string | β
| - | Directory path to build tree from |
|
|
323
|
+
| `maxDepth` | number | β | `5` | Maximum depth to traverse (0-50) |
|
|
324
|
+
| `excludePatterns` | string[] | β | `[]` | Glob patterns to exclude |
|
|
325
|
+
| `includeHidden` | boolean | β | `false` | Include hidden files and directories |
|
|
326
|
+
| `includeSize` | boolean | β | `false` | Include file sizes in the tree |
|
|
327
|
+
| `maxFiles` | number | β | - | Maximum total files to include (1-100k) |
|
|
328
|
+
|
|
329
|
+
**Returns:** Hierarchical tree structure with file/directory nodes.
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
### `read_media_file`
|
|
334
|
+
|
|
335
|
+
Read a binary/media file and return it as base64-encoded data.
|
|
336
|
+
|
|
337
|
+
| Parameter | Type | Required | Default | Description |
|
|
338
|
+
| --------- | ------ | -------- | ------- | -------------------------------------- |
|
|
339
|
+
| `path` | string | β
| - | Path to the media file |
|
|
340
|
+
| `maxSize` | number | β | 50MB | Maximum file size in bytes (max 500MB) |
|
|
341
|
+
|
|
342
|
+
**Supported formats:** Images (PNG, JPG, GIF, WebP, SVG, etc.), Audio (MP3, WAV, FLAC, etc.), Video (MP4, WebM, etc.), Fonts (TTF, WOFF, etc.), PDFs, and more.
|
|
343
|
+
|
|
344
|
+
**Returns:** Base64-encoded data with MIME type, size, and dimensions (for images).
|
|
345
|
+
|
|
346
|
+
## π Client Configuration
|
|
347
|
+
|
|
348
|
+
<details>
|
|
349
|
+
<summary><b>VS Code</b></summary>
|
|
350
|
+
|
|
351
|
+
Add to `.vscode/mcp.json` (recommended) or `.vscode/settings.json`:
|
|
352
|
+
|
|
353
|
+
```json
|
|
354
|
+
{
|
|
355
|
+
"servers": {
|
|
356
|
+
"filesystem-context": {
|
|
357
|
+
"command": "npx",
|
|
358
|
+
"args": [
|
|
359
|
+
"-y",
|
|
360
|
+
"@j0hanz/filesystem-context-mcp@latest",
|
|
361
|
+
"${workspaceFolder}"
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
> **Note:** `${workspaceFolder}` is expanded by VS Code to the current workspace path.
|
|
369
|
+
|
|
370
|
+
</details>
|
|
371
|
+
|
|
372
|
+
<details>
|
|
373
|
+
<summary><b>Claude Desktop</b></summary>
|
|
374
|
+
|
|
375
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
376
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
377
|
+
|
|
378
|
+
```json
|
|
379
|
+
{
|
|
380
|
+
"mcpServers": {
|
|
381
|
+
"filesystem-context": {
|
|
382
|
+
"command": "npx",
|
|
383
|
+
"args": ["-y", "@j0hanz/filesystem-context-mcp@latest"]
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
</details>
|
|
390
|
+
|
|
391
|
+
<details>
|
|
392
|
+
<summary><b>Cursor</b></summary>
|
|
393
|
+
|
|
394
|
+
Add to Cursor's MCP configuration:
|
|
395
|
+
|
|
396
|
+
```json
|
|
397
|
+
{
|
|
398
|
+
"mcpServers": {
|
|
399
|
+
"filesystem-context": {
|
|
400
|
+
"command": "npx",
|
|
401
|
+
"args": ["-y", "@j0hanz/filesystem-context-mcp@latest"]
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
</details>
|
|
408
|
+
|
|
409
|
+
<details>
|
|
410
|
+
<summary><b>Windsurf</b></summary>
|
|
411
|
+
|
|
412
|
+
Add to Windsurf's MCP configuration:
|
|
413
|
+
|
|
414
|
+
```json
|
|
415
|
+
{
|
|
416
|
+
"mcpServers": {
|
|
417
|
+
"filesystem-context": {
|
|
418
|
+
"command": "npx",
|
|
419
|
+
"args": ["-y", "@j0hanz/filesystem-context-mcp@latest"]
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
</details>
|
|
426
|
+
|
|
427
|
+
## π Security
|
|
428
|
+
|
|
429
|
+
This server implements multiple layers of security:
|
|
430
|
+
|
|
431
|
+
| Protection | Description |
|
|
432
|
+
| ----------------------------- | ------------------------------------------------------------------------- |
|
|
433
|
+
| **Access Control** | Only explicitly allowed directories are accessible |
|
|
434
|
+
| **Path Validation** | All paths are validated before any filesystem operation |
|
|
435
|
+
| **Symlink Protection** | Symlinks that resolve outside allowed directories are blocked |
|
|
436
|
+
| **Path Traversal Prevention** | Attempts to escape via `../` are detected and blocked |
|
|
437
|
+
| **Read-Only Operations** | Server only performs read operationsβno writes, deletes, or modifications |
|
|
438
|
+
| **Safe Regex** | Regular expressions are validated to prevent ReDoS attacks |
|
|
439
|
+
| **Size Limits** | Configurable limits prevent resource exhaustion |
|
|
440
|
+
|
|
441
|
+
### Security Model
|
|
442
|
+
|
|
443
|
+
```text
|
|
444
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
445
|
+
β MCP Client β
|
|
446
|
+
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
|
|
447
|
+
β
|
|
448
|
+
βΌ
|
|
449
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
450
|
+
β Filesystem Context MCP Server β
|
|
451
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
452
|
+
β β Path Validation Layer β β
|
|
453
|
+
β β β’ Normalize paths β β
|
|
454
|
+
β β β’ Check against allowed directories β β
|
|
455
|
+
β β β’ Resolve and validate symlinks β β
|
|
456
|
+
β β β’ Block traversal attempts β β
|
|
457
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
458
|
+
β β β
|
|
459
|
+
β βΌ β
|
|
460
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
461
|
+
β β Read-Only File Operations β β
|
|
462
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
463
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
464
|
+
β
|
|
465
|
+
βΌ
|
|
466
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
467
|
+
β Allowed Directories Only β
|
|
468
|
+
β /home/user/project β
β
|
|
469
|
+
β /home/user/docs β
β
|
|
470
|
+
β /etc/passwd β (blocked) β
|
|
471
|
+
β ../../../etc β (blocked) β
|
|
472
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
## π οΈ Development
|
|
476
|
+
|
|
477
|
+
### Prerequisites
|
|
478
|
+
|
|
479
|
+
- Node.js >= 20.0.0
|
|
480
|
+
- npm
|
|
481
|
+
|
|
482
|
+
### Scripts
|
|
483
|
+
|
|
484
|
+
| Command | Description |
|
|
485
|
+
| ----------------------- | -------------------------------- |
|
|
486
|
+
| `npm run build` | Compile TypeScript to JavaScript |
|
|
487
|
+
| `npm run dev` | Watch mode with tsx |
|
|
488
|
+
| `npm run start` | Run compiled server |
|
|
489
|
+
| `npm run test` | Run tests with Vitest |
|
|
490
|
+
| `npm run test:watch` | Run tests in watch mode |
|
|
491
|
+
| `npm run test:coverage` | Run tests with coverage report |
|
|
492
|
+
| `npm run lint` | Run ESLint |
|
|
493
|
+
| `npm run format` | Format code with Prettier |
|
|
494
|
+
| `npm run type-check` | TypeScript type checking |
|
|
495
|
+
| `npm run inspector` | Test with MCP Inspector |
|
|
496
|
+
|
|
497
|
+
### Project Structure
|
|
498
|
+
|
|
499
|
+
```text
|
|
500
|
+
src/
|
|
501
|
+
βββ index.ts # Entry point, CLI argument parsing
|
|
502
|
+
βββ server.ts # MCP server setup, roots protocol handling
|
|
503
|
+
βββ config/
|
|
504
|
+
β βββ types.ts # Shared TypeScript types
|
|
505
|
+
βββ lib/
|
|
506
|
+
β βββ constants.ts # Configuration constants and limits
|
|
507
|
+
β βββ errors.ts # Error handling utilities
|
|
508
|
+
β βββ file-operations.ts# Core filesystem operations
|
|
509
|
+
β βββ formatters.ts # Output formatting utilities
|
|
510
|
+
β βββ fs-helpers.ts # Low-level filesystem helpers
|
|
511
|
+
β βββ image-parsing.ts # Image dimension parsing
|
|
512
|
+
β βββ path-utils.ts # Path manipulation utilities
|
|
513
|
+
β βββ path-validation.ts# Security: path validation layer
|
|
514
|
+
βββ schemas/
|
|
515
|
+
β βββ common.ts # Shared Zod schemas
|
|
516
|
+
β βββ inputs.ts # Input validation schemas
|
|
517
|
+
β βββ outputs.ts # Output validation schemas
|
|
518
|
+
β βββ validators.ts # Custom validation functions
|
|
519
|
+
β βββ index.ts # Schema exports
|
|
520
|
+
βββ tools/
|
|
521
|
+
β βββ analyze-directory.ts
|
|
522
|
+
β βββ directory-tree.ts
|
|
523
|
+
β βββ get-file-info.ts
|
|
524
|
+
β βββ list-allowed-dirs.ts
|
|
525
|
+
β βββ list-directory.ts
|
|
526
|
+
β βββ read-file.ts
|
|
527
|
+
β βββ read-media-file.ts
|
|
528
|
+
β βββ read-multiple-files.ts
|
|
529
|
+
β βββ search-content.ts
|
|
530
|
+
β βββ search-files.ts
|
|
531
|
+
β βββ index.ts # Tool registration
|
|
532
|
+
βββ __tests__/ # Test files
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Testing with MCP Inspector
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
npm run inspector
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
This launches the MCP Inspector for interactive testing of all tools.
|
|
542
|
+
|
|
543
|
+
## β Troubleshooting
|
|
544
|
+
|
|
545
|
+
| Issue | Solution |
|
|
546
|
+
| --------------------------- | ---------------------------------------------------------------------------------------- |
|
|
547
|
+
| "Access denied" error | Ensure the path is within an allowed directory. Use `list_allowed_directories` to check. |
|
|
548
|
+
| "Path does not exist" error | Verify the path exists. Use `list_directory` to explore available files. |
|
|
549
|
+
| "File too large" error | Use `head` or `tail` parameters for partial reading, or increase `maxSize`. |
|
|
550
|
+
| "Binary file" warning | Use `read_media_file` for binary files, or set `skipBinary=false` in content search. |
|
|
551
|
+
| Unexpected directory access | Server defaults to CWD if no args/roots provided. Pass explicit paths to restrict. |
|
|
552
|
+
| Symlink blocked | Symlinks that resolve outside allowed directories are blocked for security. |
|
|
553
|
+
| Regex timeout | Simplify the regex pattern or use `isLiteral=true` for literal string search. |
|
|
554
|
+
|
|
555
|
+
## π€ Contributing
|
|
556
|
+
|
|
557
|
+
Contributions are welcome! Please follow these steps:
|
|
558
|
+
|
|
559
|
+
1. Fork the repository
|
|
560
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
561
|
+
3. Run tests and linting (`npm run lint && npm run test`)
|
|
562
|
+
4. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
563
|
+
5. Push to the branch (`git push origin feature/amazing-feature`)
|
|
564
|
+
6. Open a Pull Request
|
|
565
|
+
|
|
566
|
+
### Code Style
|
|
567
|
+
|
|
568
|
+
- Use TypeScript with strict mode
|
|
569
|
+
- Follow ESLint configuration
|
|
570
|
+
- Use Prettier for formatting
|
|
571
|
+
- Write tests for new features
|