@j0hanz/filesystem-context-mcp 1.2.9 → 1.3.1
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 +254 -453
- package/dist/__tests__/lib/file-operations/compute-checksums.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/compute-checksums.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/compute-checksums.test.js +59 -0
- package/dist/__tests__/lib/file-operations/compute-checksums.test.js.map +1 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.js +46 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-content-edge-cases.test.js +1 -1
- package/dist/__tests__/lib/file-operations/search-content-edge-cases.test.js.map +1 -1
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.js +43 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.d.ts +7 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.js +113 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.test.js +153 -280
- package/dist/__tests__/lib/file-operations/search-definitions.test.js.map +1 -1
- package/dist/__tests__/lib/file-operations/sorting.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/sorting.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/sorting.test.js +22 -0
- package/dist/__tests__/lib/file-operations/sorting.test.js.map +1 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.d.ts +2 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.d.ts.map +1 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.js +43 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.js.map +1 -0
- package/dist/__tests__/lib/path-validation-errors.test.d.ts +2 -0
- package/dist/__tests__/lib/path-validation-errors.test.d.ts.map +1 -0
- package/dist/__tests__/lib/path-validation-errors.test.js +35 -0
- package/dist/__tests__/lib/path-validation-errors.test.js.map +1 -0
- package/dist/__tests__/lib/path-validation-roots.test.d.ts +2 -0
- package/dist/__tests__/lib/path-validation-roots.test.d.ts.map +1 -0
- package/dist/__tests__/lib/path-validation-roots.test.js +42 -0
- package/dist/__tests__/lib/path-validation-roots.test.js.map +1 -0
- package/dist/__tests__/lib/path-validation.test.js +22 -0
- package/dist/__tests__/lib/path-validation.test.js.map +1 -1
- package/dist/__tests__/security/filesystem-boundary.test.js +20 -12
- package/dist/__tests__/security/filesystem-boundary.test.js.map +1 -1
- package/dist/config/formatting.d.ts +14 -0
- package/dist/config/formatting.d.ts.map +1 -0
- package/dist/config/formatting.js +34 -0
- package/dist/config/formatting.js.map +1 -0
- package/dist/config/types.d.ts +12 -75
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.md +159 -149
- package/dist/lib/constants.d.ts +1 -5
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +31 -11
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors.d.ts +0 -2
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +2 -30
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/file-operations/analyze-directory-helpers.d.ts +24 -0
- package/dist/lib/file-operations/analyze-directory-helpers.d.ts.map +1 -0
- package/dist/lib/file-operations/analyze-directory-helpers.js +50 -0
- package/dist/lib/file-operations/analyze-directory-helpers.js.map +1 -0
- package/dist/lib/file-operations/analyze-directory.d.ts +1 -0
- package/dist/lib/file-operations/analyze-directory.d.ts.map +1 -1
- package/dist/lib/file-operations/analyze-directory.js +11 -59
- package/dist/lib/file-operations/analyze-directory.js.map +1 -1
- package/dist/lib/file-operations/batch-results.d.ts +13 -0
- package/dist/lib/file-operations/batch-results.d.ts.map +1 -0
- package/dist/lib/file-operations/batch-results.js +23 -0
- package/dist/lib/file-operations/batch-results.js.map +1 -0
- package/dist/lib/file-operations/compute-checksums.d.ts +10 -0
- package/dist/lib/file-operations/compute-checksums.d.ts.map +1 -0
- package/dist/lib/file-operations/compute-checksums.js +134 -0
- package/dist/lib/file-operations/compute-checksums.js.map +1 -0
- package/dist/lib/file-operations/directory-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-helpers.js +18 -10
- package/dist/lib/file-operations/directory-helpers.js.map +1 -1
- package/dist/lib/file-operations/directory-tree-builders.d.ts +7 -0
- package/dist/lib/file-operations/directory-tree-builders.d.ts.map +1 -0
- package/dist/lib/file-operations/directory-tree-builders.js +58 -0
- package/dist/lib/file-operations/directory-tree-builders.js.map +1 -0
- package/dist/lib/file-operations/directory-tree-helpers.d.ts +0 -5
- package/dist/lib/file-operations/directory-tree-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-tree-helpers.js +21 -64
- package/dist/lib/file-operations/directory-tree-helpers.js.map +1 -1
- package/dist/lib/file-operations/directory-tree.d.ts +1 -0
- package/dist/lib/file-operations/directory-tree.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-tree.js +5 -10
- package/dist/lib/file-operations/directory-tree.js.map +1 -1
- package/dist/lib/file-operations/file-info.d.ts +3 -1
- package/dist/lib/file-operations/file-info.d.ts.map +1 -1
- package/dist/lib/file-operations/file-info.js +16 -5
- package/dist/lib/file-operations/file-info.js.map +1 -1
- package/dist/lib/file-operations/get-multiple-file-info.d.ts +7 -0
- package/dist/lib/file-operations/get-multiple-file-info.d.ts.map +1 -0
- package/dist/lib/file-operations/get-multiple-file-info.js +57 -0
- package/dist/lib/file-operations/get-multiple-file-info.js.map +1 -0
- package/dist/lib/file-operations/list-directory-entry.d.ts +18 -0
- package/dist/lib/file-operations/list-directory-entry.d.ts.map +1 -0
- package/dist/lib/file-operations/list-directory-entry.js +93 -0
- package/dist/lib/file-operations/list-directory-entry.js.map +1 -0
- package/dist/lib/file-operations/list-directory-helpers.d.ts +6 -1
- package/dist/lib/file-operations/list-directory-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/list-directory-helpers.js +83 -97
- package/dist/lib/file-operations/list-directory-helpers.js.map +1 -1
- package/dist/lib/file-operations/list-directory.d.ts +2 -0
- package/dist/lib/file-operations/list-directory.d.ts.map +1 -1
- package/dist/lib/file-operations/list-directory.js +11 -11
- package/dist/lib/file-operations/list-directory.js.map +1 -1
- package/dist/lib/file-operations/read-media-file.d.ts.map +1 -1
- package/dist/lib/file-operations/read-media-file.js +5 -1
- package/dist/lib/file-operations/read-media-file.js.map +1 -1
- package/dist/lib/file-operations/read-multiple-files.d.ts +8 -0
- package/dist/lib/file-operations/read-multiple-files.d.ts.map +1 -1
- package/dist/lib/file-operations/read-multiple-files.js +15 -7
- package/dist/lib/file-operations/read-multiple-files.js.map +1 -1
- package/dist/lib/file-operations/search/engine-options.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine-options.js +1 -8
- package/dist/lib/file-operations/search/engine-options.js.map +1 -1
- package/dist/lib/file-operations/search/engine-stream.d.ts +1 -1
- package/dist/lib/file-operations/search/engine-stream.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine-stream.js +21 -5
- package/dist/lib/file-operations/search/engine-stream.js.map +1 -1
- package/dist/lib/file-operations/search/engine.d.ts +1 -1
- package/dist/lib/file-operations/search/engine.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine.js +43 -3
- package/dist/lib/file-operations/search/engine.js.map +1 -1
- package/dist/lib/file-operations/search/file-processor.d.ts.map +1 -1
- package/dist/lib/file-operations/search/file-processor.js +94 -54
- package/dist/lib/file-operations/search/file-processor.js.map +1 -1
- package/dist/lib/file-operations/search/match-strategy.d.ts.map +1 -1
- package/dist/lib/file-operations/search/match-strategy.js +2 -1
- package/dist/lib/file-operations/search/match-strategy.js.map +1 -1
- package/dist/lib/file-operations/search/types.d.ts +1 -0
- package/dist/lib/file-operations/search/types.d.ts.map +1 -1
- package/dist/lib/file-operations/search-content.d.ts +1 -0
- package/dist/lib/file-operations/search-content.d.ts.map +1 -1
- package/dist/lib/file-operations/search-content.js +1 -1
- package/dist/lib/file-operations/search-content.js.map +1 -1
- package/dist/lib/file-operations/search-definitions/matchers.d.ts +12 -0
- package/dist/lib/file-operations/search-definitions/matchers.d.ts.map +1 -0
- package/dist/lib/file-operations/search-definitions/matchers.js +122 -0
- package/dist/lib/file-operations/search-definitions/matchers.js.map +1 -0
- package/dist/lib/file-operations/search-definitions/patterns.d.ts +14 -0
- package/dist/lib/file-operations/search-definitions/patterns.d.ts.map +1 -0
- package/dist/lib/file-operations/search-definitions/patterns.js +83 -0
- package/dist/lib/file-operations/search-definitions/patterns.js.map +1 -0
- package/dist/lib/file-operations/search-definitions.d.ts.map +1 -1
- package/dist/lib/file-operations/search-definitions.js +25 -199
- package/dist/lib/file-operations/search-definitions.js.map +1 -1
- package/dist/lib/file-operations/search-files-helpers.d.ts +3 -27
- package/dist/lib/file-operations/search-files-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files-helpers.js +18 -45
- package/dist/lib/file-operations/search-files-helpers.js.map +1 -1
- package/dist/lib/file-operations/search-files-options.d.ts +33 -0
- package/dist/lib/file-operations/search-files-options.d.ts.map +1 -0
- package/dist/lib/file-operations/search-files-options.js +33 -0
- package/dist/lib/file-operations/search-files-options.js.map +1 -0
- package/dist/lib/file-operations/search-files.d.ts +1 -1
- package/dist/lib/file-operations/search-files.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files.js +9 -3
- package/dist/lib/file-operations/search-files.js.map +1 -1
- package/dist/lib/file-operations/sorting.d.ts.map +1 -1
- package/dist/lib/file-operations/sorting.js +39 -14
- package/dist/lib/file-operations/sorting.js.map +1 -1
- package/dist/lib/file-operations.d.ts +1 -4
- package/dist/lib/file-operations.d.ts.map +1 -1
- package/dist/lib/file-operations.js +1 -4
- package/dist/lib/file-operations.js.map +1 -1
- package/dist/lib/fs-helpers/binary-detect.d.ts.map +1 -1
- package/dist/lib/fs-helpers/binary-detect.js +13 -16
- package/dist/lib/fs-helpers/binary-detect.js.map +1 -1
- package/dist/lib/fs-helpers/concurrency.d.ts +1 -1
- package/dist/lib/fs-helpers/concurrency.d.ts.map +1 -1
- package/dist/lib/fs-helpers/concurrency.js +37 -3
- package/dist/lib/fs-helpers/concurrency.js.map +1 -1
- package/dist/lib/fs-helpers/readers/head-file.js +1 -1
- package/dist/lib/fs-helpers/readers/head-file.js.map +1 -1
- package/dist/lib/fs-helpers/readers/read-buffer.d.ts +2 -0
- package/dist/lib/fs-helpers/readers/read-buffer.d.ts.map +1 -0
- package/dist/lib/fs-helpers/readers/read-buffer.js +52 -0
- package/dist/lib/fs-helpers/readers/read-buffer.js.map +1 -0
- package/dist/lib/fs-helpers/readers/read-file-content.d.ts +36 -0
- package/dist/lib/fs-helpers/readers/read-file-content.d.ts.map +1 -0
- package/dist/lib/fs-helpers/readers/read-file-content.js +49 -0
- package/dist/lib/fs-helpers/readers/read-file-content.js.map +1 -0
- package/dist/lib/fs-helpers/readers/read-file.d.ts +9 -0
- package/dist/lib/fs-helpers/readers/read-file.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers/read-file.js +56 -36
- package/dist/lib/fs-helpers/readers/read-file.js.map +1 -1
- package/dist/lib/fs-helpers/readers/tail-file.js +1 -1
- package/dist/lib/fs-helpers/readers/tail-file.js.map +1 -1
- package/dist/lib/merge-defined.d.ts +2 -0
- package/dist/lib/merge-defined.d.ts.map +1 -0
- package/dist/lib/merge-defined.js +8 -0
- package/dist/lib/merge-defined.js.map +1 -0
- package/dist/lib/path-utils.d.ts +1 -0
- package/dist/lib/path-utils.d.ts.map +1 -1
- package/dist/lib/path-utils.js +12 -0
- package/dist/lib/path-utils.js.map +1 -1
- package/dist/lib/path-validation/allowed-directories.d.ts.map +1 -1
- package/dist/lib/path-validation/allowed-directories.js +2 -9
- package/dist/lib/path-validation/allowed-directories.js.map +1 -1
- package/dist/lib/path-validation/errors.js +2 -2
- package/dist/lib/path-validation/errors.js.map +1 -1
- package/dist/lib/path-validation/validators.d.ts.map +1 -1
- package/dist/lib/path-validation/validators.js +11 -1
- package/dist/lib/path-validation/validators.js.map +1 -1
- package/dist/schemas/common.d.ts +0 -18
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +0 -10
- package/dist/schemas/common.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/input-helpers.d.ts +1 -4
- package/dist/schemas/input-helpers.d.ts.map +1 -1
- package/dist/schemas/input-helpers.js +9 -33
- package/dist/schemas/input-helpers.js.map +1 -1
- package/dist/schemas/inputs/checksums.d.ts +8 -0
- package/dist/schemas/inputs/checksums.d.ts.map +1 -0
- package/dist/schemas/inputs/checksums.js +25 -0
- package/dist/schemas/inputs/checksums.js.map +1 -0
- package/dist/schemas/inputs/directory.d.ts +13 -0
- package/dist/schemas/inputs/directory.d.ts.map +1 -0
- package/dist/schemas/inputs/directory.js +33 -0
- package/dist/schemas/inputs/directory.js.map +1 -0
- package/dist/schemas/inputs/file-info.d.ts +9 -0
- package/dist/schemas/inputs/file-info.d.ts.map +1 -0
- package/dist/schemas/inputs/file-info.js +20 -0
- package/dist/schemas/inputs/file-info.js.map +1 -0
- package/dist/schemas/inputs/read.d.ts +22 -0
- package/dist/schemas/inputs/read.d.ts.map +1 -0
- package/dist/schemas/inputs/read.js +39 -0
- package/dist/schemas/inputs/read.js.map +1 -0
- package/dist/schemas/inputs/search.d.ts +33 -0
- package/dist/schemas/inputs/search.d.ts.map +1 -0
- package/dist/schemas/inputs/search.js +89 -0
- package/dist/schemas/inputs/search.js.map +1 -0
- package/dist/schemas/inputs.d.ts +4 -94
- package/dist/schemas/inputs.d.ts.map +1 -1
- package/dist/schemas/inputs.js +4 -227
- package/dist/schemas/inputs.js.map +1 -1
- package/dist/schemas/output-helpers.d.ts +59 -0
- package/dist/schemas/output-helpers.d.ts.map +1 -1
- package/dist/schemas/output-helpers.js +31 -0
- package/dist/schemas/output-helpers.js.map +1 -1
- package/dist/schemas/outputs/checksums.d.ts +93 -0
- package/dist/schemas/outputs/checksums.d.ts.map +1 -0
- package/dist/schemas/outputs/checksums.js +18 -0
- package/dist/schemas/outputs/checksums.js.map +1 -0
- package/dist/schemas/outputs/directory.d.ts +257 -0
- package/dist/schemas/outputs/directory.d.ts.map +1 -0
- package/dist/schemas/outputs/directory.js +63 -0
- package/dist/schemas/outputs/directory.js.map +1 -0
- package/dist/schemas/outputs/file-info.d.ts +270 -0
- package/dist/schemas/outputs/file-info.d.ts.map +1 -0
- package/dist/schemas/outputs/file-info.js +30 -0
- package/dist/schemas/outputs/file-info.js.map +1 -0
- package/dist/schemas/outputs/read.d.ts +282 -0
- package/dist/schemas/outputs/read.d.ts.map +1 -0
- package/dist/schemas/outputs/read.js +62 -0
- package/dist/schemas/outputs/read.js.map +1 -0
- package/dist/schemas/outputs/search.d.ts +370 -0
- package/dist/schemas/outputs/search.d.ts.map +1 -0
- package/dist/schemas/outputs/search.js +96 -0
- package/dist/schemas/outputs/search.js.map +1 -0
- package/dist/schemas/outputs.d.ts +4 -1059
- package/dist/schemas/outputs.d.ts.map +1 -1
- package/dist/schemas/outputs.js +4 -229
- package/dist/schemas/outputs.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +28 -15
- package/dist/server.js.map +1 -1
- package/dist/tools/analyze-directory.d.ts.map +1 -1
- package/dist/tools/analyze-directory.js +26 -28
- package/dist/tools/analyze-directory.js.map +1 -1
- package/dist/tools/compute-checksums.d.ts +3 -0
- package/dist/tools/compute-checksums.d.ts.map +1 -0
- package/dist/tools/compute-checksums.js +69 -0
- package/dist/tools/compute-checksums.js.map +1 -0
- package/dist/tools/directory-tree.d.ts.map +1 -1
- package/dist/tools/directory-tree.js +17 -11
- package/dist/tools/directory-tree.js.map +1 -1
- package/dist/tools/get-file-info.d.ts.map +1 -1
- package/dist/tools/get-file-info.js +8 -44
- package/dist/tools/get-file-info.js.map +1 -1
- package/dist/tools/get-multiple-file-info.d.ts +3 -0
- package/dist/tools/get-multiple-file-info.d.ts.map +1 -0
- package/dist/tools/get-multiple-file-info.js +53 -0
- package/dist/tools/get-multiple-file-info.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list-allowed-dirs.d.ts.map +1 -1
- package/dist/tools/list-allowed-dirs.js +46 -29
- package/dist/tools/list-allowed-dirs.js.map +1 -1
- package/dist/tools/list-directory.d.ts.map +1 -1
- package/dist/tools/list-directory.js +83 -77
- 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 +57 -37
- package/dist/tools/read-file.js.map +1 -1
- package/dist/tools/read-media-file.d.ts.map +1 -1
- package/dist/tools/read-media-file.js +8 -6
- package/dist/tools/read-media-file.js.map +1 -1
- package/dist/tools/read-multiple-files.d.ts.map +1 -1
- package/dist/tools/read-multiple-files.js +58 -23
- 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 +14 -16
- package/dist/tools/search-content.js.map +1 -1
- package/dist/tools/search-definitions.d.ts.map +1 -1
- package/dist/tools/search-definitions.js +59 -42
- package/dist/tools/search-definitions.js.map +1 -1
- package/dist/tools/search-files.d.ts.map +1 -1
- package/dist/tools/search-files.js +65 -45
- package/dist/tools/search-files.js.map +1 -1
- package/dist/tools/shared/file-info.d.ts +17 -0
- package/dist/tools/shared/file-info.d.ts.map +1 -0
- package/dist/tools/shared/file-info.js +40 -0
- package/dist/tools/shared/file-info.js.map +1 -0
- package/dist/tools/shared/formatting.d.ts +5 -0
- package/dist/tools/shared/formatting.d.ts.map +1 -1
- package/dist/tools/shared/formatting.js +21 -1
- package/dist/tools/shared/formatting.js.map +1 -1
- package/dist/tools/shared/read-range.d.ts +7 -0
- package/dist/tools/shared/read-range.d.ts.map +1 -0
- package/dist/tools/shared/read-range.js +22 -0
- package/dist/tools/shared/read-range.js.map +1 -0
- package/dist/tools/shared/search-formatting.d.ts.map +1 -1
- package/dist/tools/shared/search-formatting.js +57 -29
- package/dist/tools/shared/search-formatting.js.map +1 -1
- package/dist/tools/tool-response.d.ts +22 -0
- package/dist/tools/tool-response.d.ts.map +1 -1
- package/dist/tools/tool-response.js +30 -0
- package/dist/tools/tool-response.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Filesystem Context MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="docs/logo.png" alt="Filesystem Context MCP Server Logo" width="125">
|
|
4
4
|
|
|
5
5
|
A secure, read-only MCP server for filesystem scanning, searching, and analysis with comprehensive security validation.
|
|
6
6
|
|
|
@@ -16,54 +16,49 @@ A secure, read-only MCP server for filesystem scanning, searching, and analysis
|
|
|
16
16
|
|
|
17
17
|
[](https://cursor.com/install-mcp?name=filesystem-context&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmlsZXN5c3RlbS1jb250ZXh0LW1jcEBsYXRlc3QiLCIke3dvcmtzcGFjZUZvbGRlcn0iXX0=)
|
|
18
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
|
-
| Read images or binary files | `read_media_file` |
|
|
47
|
-
| Check available directories | `list_allowed_directories` |
|
|
48
|
-
|
|
49
|
-
## 🚀 Quick Start
|
|
50
|
-
|
|
51
|
-
### NPX (Recommended - Zero Config)
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- Directory listing with recursive support
|
|
22
|
+
- File search with glob patterns
|
|
23
|
+
- Content search with regex and context lines
|
|
24
|
+
- File reading with head/tail/line ranges
|
|
25
|
+
- Batch reads and metadata lookups in parallel
|
|
26
|
+
- Security: path validation, symlink escape protection, read-only operations
|
|
27
|
+
|
|
28
|
+
## When to Use
|
|
29
|
+
|
|
30
|
+
| Task | Tool |
|
|
31
|
+
| ------------------------------- | -------------------------- |
|
|
32
|
+
| Explore project structure | `list_directory` |
|
|
33
|
+
| Find specific file types | `search_files` |
|
|
34
|
+
| Search for code patterns/text | `search_content` |
|
|
35
|
+
| Read source code | `read_file` |
|
|
36
|
+
| Batch read multiple files | `read_multiple_files` |
|
|
37
|
+
| Get file metadata (size, dates) | `get_file_info` |
|
|
38
|
+
| Batch get file metadata | `get_multiple_file_info` |
|
|
39
|
+
| Check available directories | `list_allowed_directories` |
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
### NPX (recommended)
|
|
44
|
+
|
|
45
|
+
Allow the current working directory explicitly:
|
|
52
46
|
|
|
53
47
|
```bash
|
|
54
|
-
|
|
55
|
-
npx -y @j0hanz/filesystem-context-mcp@latest
|
|
48
|
+
npx -y @j0hanz/filesystem-context-mcp@latest --allow-cwd
|
|
56
49
|
```
|
|
57
50
|
|
|
58
|
-
Or
|
|
51
|
+
Or pass explicit directories:
|
|
59
52
|
|
|
60
53
|
```bash
|
|
61
|
-
npx -y @j0hanz/filesystem-context-mcp@latest /path/to/
|
|
54
|
+
npx -y @j0hanz/filesystem-context-mcp@latest /path/to/project /path/to/docs
|
|
62
55
|
```
|
|
63
56
|
|
|
64
|
-
|
|
57
|
+
If your MCP client supports the Roots protocol, you can omit directory arguments and let the client provide allowed directories. Otherwise, pass explicit directories or use `--allow-cwd`.
|
|
65
58
|
|
|
66
|
-
|
|
59
|
+
### VS Code (workspace folder)
|
|
60
|
+
|
|
61
|
+
Add to `.vscode/mcp.json`:
|
|
67
62
|
|
|
68
63
|
```json
|
|
69
64
|
{
|
|
@@ -80,41 +75,22 @@ Add to your VS Code settings (`.vscode/mcp.json`):
|
|
|
80
75
|
}
|
|
81
76
|
```
|
|
82
77
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### Claude Desktop
|
|
78
|
+
## Installation
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"mcpServers": {
|
|
92
|
-
"filesystem-context": {
|
|
93
|
-
"command": "npx",
|
|
94
|
-
"args": ["-y", "@j0hanz/filesystem-context-mcp@latest"]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
> **Note:** Claude Desktop will use the current working directory automatically. No path arguments needed!
|
|
101
|
-
|
|
102
|
-
## 📦 Installation
|
|
103
|
-
|
|
104
|
-
### NPX (No Installation)
|
|
80
|
+
### NPX (no install)
|
|
105
81
|
|
|
106
82
|
```bash
|
|
107
83
|
npx -y @j0hanz/filesystem-context-mcp@latest /path/to/dir1 /path/to/dir2
|
|
108
84
|
```
|
|
109
85
|
|
|
110
|
-
### Global
|
|
86
|
+
### Global installation
|
|
111
87
|
|
|
112
88
|
```bash
|
|
113
89
|
npm install -g @j0hanz/filesystem-context-mcp
|
|
114
90
|
filesystem-context-mcp /path/to/your/project
|
|
115
91
|
```
|
|
116
92
|
|
|
117
|
-
### From
|
|
93
|
+
### From source
|
|
118
94
|
|
|
119
95
|
```bash
|
|
120
96
|
git clone https://github.com/j0hanz/filesystem-context-mcp-server.git
|
|
@@ -124,116 +100,107 @@ npm run build
|
|
|
124
100
|
node dist/index.js /path/to/your/project
|
|
125
101
|
```
|
|
126
102
|
|
|
127
|
-
##
|
|
128
|
-
|
|
129
|
-
### Directory Resolution (Priority Order)
|
|
103
|
+
## Directory Access and Resolution
|
|
130
104
|
|
|
131
|
-
|
|
105
|
+
Access is always restricted to explicitly allowed directories.
|
|
132
106
|
|
|
133
|
-
1.
|
|
134
|
-
2.
|
|
135
|
-
3.
|
|
107
|
+
1. CLI directories are validated and added first (if provided).
|
|
108
|
+
2. `--allow-cwd` optionally adds the current working directory.
|
|
109
|
+
3. MCP Roots from the client are used next:
|
|
110
|
+
- If CLI and/or `--allow-cwd` are provided, only roots inside those baseline directories are accepted.
|
|
111
|
+
- If no baseline is provided, roots become the allowed directories.
|
|
112
|
+
4. If nothing is configured and the client provides no roots, the server has no access and logs a warning.
|
|
136
113
|
|
|
137
|
-
|
|
114
|
+
Notes:
|
|
138
115
|
|
|
139
|
-
|
|
116
|
+
- Windows drive-relative paths like `C:path` are rejected. Use `C:\path` or `C:/path`.
|
|
117
|
+
- Reserved Windows device names (e.g., `CON`, `NUL`) are blocked.
|
|
140
118
|
|
|
141
|
-
|
|
119
|
+
## Configuration
|
|
142
120
|
|
|
143
|
-
|
|
144
|
-
filesystem-context-mcp /home/user/project /home/user/docs
|
|
145
|
-
```
|
|
121
|
+
All configuration is optional. Values are integers unless noted. Sizes are in bytes, timeouts in milliseconds.
|
|
146
122
|
|
|
147
|
-
###
|
|
148
|
-
|
|
149
|
-
If no CLI arguments are provided, the server will use the MCP Roots protocol to receive allowed directories from the client (if supported).
|
|
123
|
+
### Environment Variables
|
|
150
124
|
|
|
151
|
-
|
|
125
|
+
| Variable | Default | Range | Description |
|
|
126
|
+
| -------------------------------- | ----------------------- | ----------- | ---------------------------------------------------------------- |
|
|
127
|
+
| `UV_THREADPOOL_SIZE` | (unset) | 1-1024 | libuv threadpool size. If set, caps parallelism. |
|
|
128
|
+
| `FILESYSTEM_CONTEXT_CONCURRENCY` | Auto (2x cores, cap 50) | 1-100 | Parallel file operations. Further capped by `UV_THREADPOOL_SIZE` |
|
|
129
|
+
| `TRAVERSAL_JOBS` | 8 | 1-50 | Directory traversal concurrency |
|
|
130
|
+
| `REGEX_TIMEOUT` | 100 | 50-1000 | Regex timeout per line (prevents ReDoS) |
|
|
131
|
+
| `MAX_FILE_SIZE` | 10MB | 1MB-100MB | Max text file size (`read_file`, `read_multiple_files`) |
|
|
132
|
+
| `MAX_SEARCH_SIZE` | 1MB | 100KB-10MB | Max file size for content search (`search_content`) |
|
|
133
|
+
| `DEFAULT_DEPTH` | 10 | 1-100 | Default max depth (`list_directory`, `search_files`) |
|
|
134
|
+
| `DEFAULT_RESULTS` | 100 | 10-10000 | Default max results (`search_files`, `search_content`) |
|
|
135
|
+
| `DEFAULT_LIST_MAX_ENTRIES` | 10000 | 100-100000 | Default max entries (`list_directory`) |
|
|
136
|
+
| `DEFAULT_SEARCH_MAX_FILES` | 20000 | 100-100000 | Default max files scanned (`search_files`, `search_content`) |
|
|
137
|
+
| `DEFAULT_SEARCH_TIMEOUT` | 30000 | 100-3600000 | Default search timeout (`search_files`, `search_content`) |
|
|
152
138
|
|
|
153
|
-
|
|
139
|
+
See [CONFIGURATION.md](CONFIGURATION.md) for profiles and examples.
|
|
154
140
|
|
|
155
|
-
|
|
141
|
+
## Tools
|
|
156
142
|
|
|
157
|
-
All
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
| -------------------------------- | --------------- | ----------- | ---------------------------------------- |
|
|
161
|
-
| `FILESYSTEM_CONTEXT_CONCURRENCY` | Auto (2x cores) | 1-100 | Maximum parallel file operations |
|
|
162
|
-
| `TRAVERSAL_JOBS` | 8 | 1-50 | Directory traversal concurrency |
|
|
163
|
-
| `REGEX_TIMEOUT` | 100 | 50-1000 | Regex matching timeout (milliseconds) |
|
|
164
|
-
| `MAX_FILE_SIZE` | 10MB | 1MB-100MB | Maximum text file size (bytes) |
|
|
165
|
-
| `MAX_MEDIA_SIZE` | 50MB | 1MB-500MB | Maximum media file size (bytes) |
|
|
166
|
-
| `MAX_SEARCH_SIZE` | 1MB | 100KB-10MB | Maximum file size for content search |
|
|
167
|
-
| `DEFAULT_DEPTH` | 10 | 1-100 | Default maximum recursion depth |
|
|
168
|
-
| `DEFAULT_RESULTS` | 100 | 10-10000 | Default maximum search results |
|
|
169
|
-
| `DEFAULT_LIST_MAX_ENTRIES` | 10000 | 100-100000 | Default max entries for list_directory |
|
|
170
|
-
| `DEFAULT_SEARCH_MAX_FILES` | 20000 | 100-100000 | Default max files to scan in searches |
|
|
171
|
-
| `DEFAULT_SEARCH_TIMEOUT` | 30000 | 100-3600000 | Default search timeout (milliseconds) |
|
|
172
|
-
| `DEFAULT_TOP` | 10 | 1-1000 | Default top N items in analysis |
|
|
173
|
-
| `DEFAULT_ANALYZE_MAX_ENTRIES` | 20000 | 100-100000 | Default max entries in analyze_directory |
|
|
174
|
-
| `DEFAULT_TREE` | 5 | 1-50 | Default directory tree depth |
|
|
175
|
-
| `DEFAULT_TREE_MAX_FILES` | 5000 | 100-200000 | Default max files in directory tree |
|
|
176
|
-
|
|
177
|
-
> **💡 Tip:** See [CONFIGURATION.md](CONFIGURATION.md) for detailed environment variable usage examples, configuration profiles, and best practices for different use cases.
|
|
178
|
-
|
|
179
|
-
## 🔧 Tools
|
|
143
|
+
All tools return both human-readable text and structured JSON. Structured
|
|
144
|
+
responses include `ok`, `error` (with `code`, `message`, `path`, `suggestion`),
|
|
145
|
+
and `effectiveOptions`/`summary` fields where applicable.
|
|
180
146
|
|
|
181
147
|
### `list_allowed_directories`
|
|
182
148
|
|
|
183
|
-
List all directories that this server
|
|
149
|
+
List all directories that this server can access.
|
|
184
150
|
|
|
185
|
-
| Parameter | Type | Required | Default | Description
|
|
186
|
-
| --------- | ---- | -------- | ------- |
|
|
187
|
-
|
|
|
151
|
+
| Parameter | Type | Required | Default | Description |
|
|
152
|
+
| --------- | ---- | -------- | ------- | ----------- |
|
|
153
|
+
| (none) | - | - | - | - |
|
|
188
154
|
|
|
189
|
-
|
|
155
|
+
Returns: Allowed directory paths plus access status (accessible/readable),
|
|
156
|
+
count, and a configuration hint in structured output.
|
|
190
157
|
|
|
191
158
|
---
|
|
192
159
|
|
|
193
160
|
### `list_directory`
|
|
194
161
|
|
|
195
|
-
List contents of a directory with optional
|
|
196
|
-
|
|
197
|
-
| Parameter | Type
|
|
198
|
-
| ----------------------- |
|
|
199
|
-
| `path` | string
|
|
200
|
-
| `recursive` | boolean
|
|
201
|
-
| `includeHidden` | boolean
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
206
|
-
|
|
207
|
-
|
|
162
|
+
List contents of a directory with optional recursion.
|
|
163
|
+
|
|
164
|
+
| Parameter | Type | Required | Default | Description |
|
|
165
|
+
| ----------------------- | -------- | -------- | ------- | -------------------------------------------------------- |
|
|
166
|
+
| `path` | string | Yes | - | Directory path to list |
|
|
167
|
+
| `recursive` | boolean | No | `false` | List subdirectories recursively |
|
|
168
|
+
| `includeHidden` | boolean | No | `false` | Include hidden files and directories |
|
|
169
|
+
| `excludePatterns` | string[] | No | `[]` | Glob patterns to exclude |
|
|
170
|
+
| `pattern` | string | No | - | Glob pattern to include (relative, no `..`) |
|
|
171
|
+
| `maxDepth` | number | No | `10` | Maximum depth for recursive listing (0-100) |
|
|
172
|
+
| `maxEntries` | number | No | `10000` | Maximum entries to return (1-100000) |
|
|
173
|
+
| `sortBy` | string | No | `name` | Sort by: `name`, `size`, `modified`, `type` |
|
|
174
|
+
| `includeSymlinkTargets` | boolean | No | `false` | Include symlink target paths (symlinks are not followed) |
|
|
175
|
+
|
|
176
|
+
Returns: Entries with name, relativePath, type, extension, size, modified time,
|
|
177
|
+
and symlink target. Structured output includes `effectiveOptions` and a
|
|
178
|
+
`summary` (totals, maxDepthReached, truncated/stoppedReason, entriesScanned,
|
|
179
|
+
entriesVisible, skippedInaccessible, symlinksNotFollowed).
|
|
208
180
|
|
|
209
181
|
---
|
|
210
182
|
|
|
211
183
|
### `search_files`
|
|
212
184
|
|
|
213
|
-
Search for files using glob patterns.
|
|
214
|
-
|
|
215
|
-
| Parameter | Type | Required | Default
|
|
216
|
-
| ----------------- | -------- | -------- |
|
|
217
|
-
| `path` | string |
|
|
218
|
-
| `pattern` | string |
|
|
219
|
-
| `excludePatterns` | string[] |
|
|
220
|
-
| `maxResults` | number |
|
|
221
|
-
| `sortBy` | string |
|
|
222
|
-
| `maxDepth` | number |
|
|
223
|
-
| `maxFilesScanned` | number |
|
|
224
|
-
| `timeoutMs` | number |
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
"path": "/project",
|
|
233
|
-
"pattern": "**/*.ts",
|
|
234
|
-
"excludePatterns": ["node_modules/**", "dist/**"]
|
|
235
|
-
}
|
|
236
|
-
```
|
|
185
|
+
Search for files (not directories) using glob patterns.
|
|
186
|
+
|
|
187
|
+
| Parameter | Type | Required | Default | Description |
|
|
188
|
+
| ----------------- | -------- | -------- | --------------------- | ------------------------------------------------------------ |
|
|
189
|
+
| `path` | string | Yes | - | Base directory to search from |
|
|
190
|
+
| `pattern` | string | Yes | - | Glob pattern (e.g., `**/*.ts`, `src/**/*.js`) |
|
|
191
|
+
| `excludePatterns` | string[] | No | built-in exclude list | Glob patterns to exclude |
|
|
192
|
+
| `maxResults` | number | No | `100` | Maximum matches to return (1-10000) |
|
|
193
|
+
| `sortBy` | string | No | `path` | Sort by: `name`, `size`, `modified`, `path` |
|
|
194
|
+
| `maxDepth` | number | No | `10` | Maximum directory depth to search (0-100) |
|
|
195
|
+
| `maxFilesScanned` | number | No | `20000` | Maximum files to scan before stopping |
|
|
196
|
+
| `timeoutMs` | number | No | `30000` | Timeout in milliseconds |
|
|
197
|
+
| `baseNameMatch` | boolean | No | `false` | Match patterns without slashes against basenames |
|
|
198
|
+
| `skipSymlinks` | boolean | No | `true` | Must remain true; symlink traversal is disabled for security |
|
|
199
|
+
| `includeHidden` | boolean | No | `false` | Include hidden files and directories |
|
|
200
|
+
|
|
201
|
+
Returns: Matching files with relative path, type, size, and modified date.
|
|
202
|
+
Structured output includes `effectiveOptions` and a `summary` (matched,
|
|
203
|
+
filesScanned, truncated/stoppedReason, skippedInaccessible).
|
|
237
204
|
|
|
238
205
|
---
|
|
239
206
|
|
|
@@ -241,38 +208,48 @@ Search for files using glob patterns.
|
|
|
241
208
|
|
|
242
209
|
Read the contents of a text file.
|
|
243
210
|
|
|
244
|
-
| Parameter
|
|
245
|
-
|
|
|
246
|
-
| `path`
|
|
247
|
-
| `encoding`
|
|
248
|
-
| `maxSize`
|
|
249
|
-
| `
|
|
250
|
-
| `
|
|
251
|
-
| `
|
|
252
|
-
| `
|
|
211
|
+
| Parameter | Type | Required | Default | Description |
|
|
212
|
+
| ------------ | ------- | -------- | ------- | ----------------------------------------------------------- |
|
|
213
|
+
| `path` | string | Yes | - | File path to read |
|
|
214
|
+
| `encoding` | string | No | `utf-8` | File encoding (`utf-8`, `ascii`, `base64`, `hex`, `latin1`) |
|
|
215
|
+
| `maxSize` | number | No | 10MB | Maximum file size in bytes (capped by `MAX_FILE_SIZE`) |
|
|
216
|
+
| `skipBinary` | boolean | No | `true` | Reject likely-binary files |
|
|
217
|
+
| `lineStart` | number | No | - | Start line (1-indexed) for range reading |
|
|
218
|
+
| `lineEnd` | number | No | - | End line (inclusive) for range reading |
|
|
219
|
+
| `head` | number | No | - | Read only first N lines |
|
|
220
|
+
| `tail` | number | No | - | Read only last N lines |
|
|
253
221
|
|
|
254
|
-
|
|
222
|
+
Notes:
|
|
255
223
|
|
|
256
|
-
|
|
224
|
+
- `head`, `tail`, and `lineStart/lineEnd` are mutually exclusive.
|
|
225
|
+
|
|
226
|
+
Returns: File content plus structured metadata (readMode, linesRead,
|
|
227
|
+
totalLines, hasMoreLines, truncated, effectiveOptions).
|
|
257
228
|
|
|
258
229
|
---
|
|
259
230
|
|
|
260
231
|
### `read_multiple_files`
|
|
261
232
|
|
|
262
|
-
Read multiple files in parallel
|
|
233
|
+
Read multiple files in parallel.
|
|
234
|
+
|
|
235
|
+
| Parameter | Type | Required | Default | Description |
|
|
236
|
+
| -------------- | -------- | -------- | ------- | ---------------------------------------------------------- |
|
|
237
|
+
| `paths` | string[] | Yes | - | Array of file paths (max 100) |
|
|
238
|
+
| `encoding` | string | No | `utf-8` | File encoding |
|
|
239
|
+
| `maxSize` | number | No | 10MB | Maximum size per file in bytes (capped by `MAX_FILE_SIZE`) |
|
|
240
|
+
| `maxTotalSize` | number | No | 100MB | Maximum total size across all files |
|
|
241
|
+
| `head` | number | No | - | Read only first N lines of each file |
|
|
242
|
+
| `tail` | number | No | - | Read only last N lines of each file |
|
|
243
|
+
| `lineStart` | number | No | - | Start line (1-indexed) for each file |
|
|
244
|
+
| `lineEnd` | number | No | - | End line (inclusive) for each file |
|
|
263
245
|
|
|
264
|
-
|
|
265
|
-
| -------------- | -------- | -------- | ------- | ----------------------------------------- |
|
|
266
|
-
| `paths` | string[] | ✅ | - | Array of file paths (max 100) |
|
|
267
|
-
| `encoding` | string | ❌ | `utf-8` | File encoding |
|
|
268
|
-
| `maxSize` | number | ❌ | 10MB | Maximum file size per file |
|
|
269
|
-
| `maxTotalSize` | number | ❌ | 100MB | Maximum total size for all files combined |
|
|
270
|
-
| `head` | number | ❌ | - | Read only first N lines of each file |
|
|
271
|
-
| `tail` | number | ❌ | - | Read only last N lines of each file |
|
|
246
|
+
Notes:
|
|
272
247
|
|
|
273
|
-
|
|
248
|
+
- `lineStart` and `lineEnd` must be provided together.
|
|
249
|
+
- `head`, `tail`, and `lineStart/lineEnd` are mutually exclusive.
|
|
274
250
|
|
|
275
|
-
|
|
251
|
+
Returns: Per-file content or error, plus structured summary and
|
|
252
|
+
effectiveOptions.
|
|
276
253
|
|
|
277
254
|
---
|
|
278
255
|
|
|
@@ -282,145 +259,80 @@ Get detailed metadata about a file or directory.
|
|
|
282
259
|
|
|
283
260
|
| Parameter | Type | Required | Default | Description |
|
|
284
261
|
| --------- | ------ | -------- | ------- | ------------------------- |
|
|
285
|
-
| `path` | string |
|
|
262
|
+
| `path` | string | Yes | - | Path to file or directory |
|
|
286
263
|
|
|
287
|
-
|
|
264
|
+
Returns: name, path, type, size, created/modified/accessed timestamps,
|
|
265
|
+
permissions, isHidden, MIME type, and symlink target (if applicable).
|
|
288
266
|
|
|
289
267
|
---
|
|
290
268
|
|
|
291
|
-
### `
|
|
269
|
+
### `get_multiple_file_info`
|
|
292
270
|
|
|
293
|
-
|
|
271
|
+
Get metadata for multiple files/directories in parallel.
|
|
294
272
|
|
|
295
|
-
| Parameter | Type | Required | Default | Description
|
|
296
|
-
| ----------------- | -------- | -------- | ------- |
|
|
297
|
-
| `
|
|
298
|
-
| `
|
|
299
|
-
| `filePattern` | string | ❌ | `**/*` | Glob pattern to filter files |
|
|
300
|
-
| `excludePatterns` | string[] | ❌ | `[]` | Glob patterns to exclude |
|
|
301
|
-
| `caseSensitive` | boolean | ❌ | `false` | Case-sensitive search |
|
|
302
|
-
| `maxResults` | number | ❌ | `100` | Maximum number of results (1-10,000) |
|
|
303
|
-
| `maxFileSize` | number | ❌ | 1MB | Maximum file size to scan |
|
|
304
|
-
| `maxFilesScanned` | number | ❌ | `20000` | Maximum files to scan before stopping |
|
|
305
|
-
| `timeoutMs` | number | ❌ | `30000` | Timeout in milliseconds (100-3,600,000) |
|
|
306
|
-
| `skipBinary` | boolean | ❌ | `true` | Skip binary files |
|
|
307
|
-
| `includeHidden` | boolean | ❌ | `false` | Include hidden files and directories |
|
|
308
|
-
| `contextLines` | number | ❌ | `0` | Lines of context before/after match (0-10) |
|
|
309
|
-
| `wholeWord` | boolean | ❌ | `false` | Match whole words only |
|
|
310
|
-
| `isLiteral` | boolean | ❌ | `false` | Treat pattern as literal string (escape special) |
|
|
311
|
-
|
|
312
|
-
**Returns:** Matching lines with file path, line number, content, and optional context.
|
|
313
|
-
|
|
314
|
-
**Example:**
|
|
273
|
+
| Parameter | Type | Required | Default | Description |
|
|
274
|
+
| ----------------- | -------- | -------- | ------- | --------------------------------- |
|
|
275
|
+
| `paths` | string[] | Yes | - | Array of paths to query (max 100) |
|
|
276
|
+
| `includeMimeType` | boolean | No | `true` | Include MIME type detection |
|
|
315
277
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
"path": "/project/src",
|
|
319
|
-
"pattern": "TODO|FIXME",
|
|
320
|
-
"filePattern": "**/*.ts",
|
|
321
|
-
"contextLines": 2
|
|
322
|
-
}
|
|
323
|
-
```
|
|
278
|
+
Returns: Array of file info with individual success/error status, plus summary
|
|
279
|
+
(total, succeeded, failed, totalSize).
|
|
324
280
|
|
|
325
281
|
---
|
|
326
282
|
|
|
327
|
-
### `
|
|
328
|
-
|
|
329
|
-
Find code definitions (classes, functions, interfaces, types, enums, variables) in TypeScript/JavaScript files without manual regex construction.
|
|
330
|
-
|
|
331
|
-
| Parameter | Type | Required | Default | Description |
|
|
332
|
-
| ----------------- | -------- | -------- | ------- | ------------------------------------------------------------------------------------- |
|
|
333
|
-
| `path` | string | ❌ | - | Base directory to search in |
|
|
334
|
-
| `name` | string | ❌ | - | Definition name to search for |
|
|
335
|
-
| `type` | string | ❌ | - | Definition type to find: `class`, `function`, `interface`, `type`, `enum`, `variable` |
|
|
336
|
-
| `caseSensitive` | boolean | ❌ | `true` | Case-sensitive name matching |
|
|
337
|
-
| `maxResults` | number | ❌ | `100` | Maximum number of results (1-10,000) |
|
|
338
|
-
| `excludePatterns` | string[] | ❌ | `[]` | Glob patterns to exclude |
|
|
339
|
-
| `includeHidden` | boolean | ❌ | `false` | Include hidden files and directories |
|
|
340
|
-
| `contextLines` | number | ❌ | `0` | Lines of context before/after match (0-10) |
|
|
341
|
-
|
|
342
|
-
**Returns:** List of definitions with name, type (class/function/interface/type/enum/variable), file path, line number, exported status, and code preview.
|
|
343
|
-
|
|
344
|
-
**Use cases:**
|
|
345
|
-
|
|
346
|
-
- **Find by name:** Search for a specific definition like `UserService`
|
|
347
|
-
- **Discovery mode:** Find all definitions of a type (e.g., all interfaces)
|
|
348
|
-
- **Combined:** Find definitions matching a name pattern and type
|
|
349
|
-
|
|
350
|
-
**Examples:**
|
|
351
|
-
|
|
352
|
-
```json
|
|
353
|
-
{
|
|
354
|
-
"path": "/project/src",
|
|
355
|
-
"name": "UserService"
|
|
356
|
-
}
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
```json
|
|
360
|
-
{
|
|
361
|
-
"path": "/project/src",
|
|
362
|
-
"type": "interface"
|
|
363
|
-
}
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
```json
|
|
367
|
-
{
|
|
368
|
-
"path": "/project/src",
|
|
369
|
-
"name": "Handler",
|
|
370
|
-
"type": "class"
|
|
371
|
-
}
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
---
|
|
375
|
-
|
|
376
|
-
### `analyze_directory`
|
|
377
|
-
|
|
378
|
-
Analyze a directory structure and return statistics.
|
|
379
|
-
|
|
380
|
-
| Parameter | Type | Required | Default | Description |
|
|
381
|
-
| ----------------- | -------- | -------- | ------- | ---------------------------------------- |
|
|
382
|
-
| `path` | string | ✅ | - | Directory to analyze |
|
|
383
|
-
| `maxDepth` | number | ❌ | `10` | Maximum depth to analyze (0-100) |
|
|
384
|
-
| `topN` | number | ❌ | `10` | Number of top items to return (max 1000) |
|
|
385
|
-
| `maxEntries` | number | ? | `20000` | Maximum entries to scan (1-100,000) |
|
|
386
|
-
| `excludePatterns` | string[] | ❌ | `[]` | Glob patterns to exclude |
|
|
387
|
-
| `includeHidden` | boolean | ❌ | `false` | Include hidden files and directories |
|
|
388
|
-
|
|
389
|
-
**Returns:** Statistics including total files/directories, total size, file type distribution, largest files, and recently modified files.
|
|
390
|
-
|
|
391
|
-
---
|
|
392
|
-
|
|
393
|
-
### `directory_tree`
|
|
394
|
-
|
|
395
|
-
Get a JSON tree structure of a directory, optimized for AI parsing.
|
|
283
|
+
### `search_content`
|
|
396
284
|
|
|
397
|
-
|
|
398
|
-
| ----------------- | -------- | -------- | ------- | -------------------------------------------- |
|
|
399
|
-
| `path` | string | ✅ | - | Directory path to build tree from |
|
|
400
|
-
| `maxDepth` | number | ❌ | `5` | Maximum depth to traverse (0-50) |
|
|
401
|
-
| `excludePatterns` | string[] | ❌ | `[]` | Glob patterns to exclude |
|
|
402
|
-
| `includeHidden` | boolean | ❌ | `false` | Include hidden files and directories |
|
|
403
|
-
| `includeSize` | boolean | ❌ | `false` | Include file sizes in the tree |
|
|
404
|
-
| `maxFiles` | number | ❌ | - | Maximum total files to include (max 100,000) |
|
|
285
|
+
Search for text content within files using regular expressions.
|
|
405
286
|
|
|
406
|
-
|
|
287
|
+
| Parameter | Type | Required | Default | Description |
|
|
288
|
+
| ------------------------ | -------- | -------- | --------------------- | ---------------------------------------------------------- |
|
|
289
|
+
| `path` | string | Yes | - | Base directory to search in |
|
|
290
|
+
| `pattern` | string | Yes | - | Regex pattern to search for |
|
|
291
|
+
| `filePattern` | string | No | `**/*` | Glob pattern to filter files |
|
|
292
|
+
| `excludePatterns` | string[] | No | built-in exclude list | Glob patterns to exclude |
|
|
293
|
+
| `caseSensitive` | boolean | No | `false` | Case-sensitive search |
|
|
294
|
+
| `maxResults` | number | No | `100` | Maximum number of results |
|
|
295
|
+
| `maxFileSize` | number | No | 1MB | Maximum file size to scan (default from `MAX_SEARCH_SIZE`) |
|
|
296
|
+
| `maxFilesScanned` | number | No | `20000` | Maximum files to scan before stopping |
|
|
297
|
+
| `timeoutMs` | number | No | `30000` | Timeout in milliseconds |
|
|
298
|
+
| `skipBinary` | boolean | No | `true` | Skip likely-binary files |
|
|
299
|
+
| `includeHidden` | boolean | No | `false` | Include hidden files and directories |
|
|
300
|
+
| `contextLines` | number | No | `0` | Lines of context before/after match (0-10) |
|
|
301
|
+
| `wholeWord` | boolean | No | `false` | Match whole words only |
|
|
302
|
+
| `isLiteral` | boolean | No | `false` | Treat pattern as literal string (escape regex chars) |
|
|
303
|
+
| `baseNameMatch` | boolean | No | `false` | Match file patterns without slashes against basenames |
|
|
304
|
+
| `caseSensitiveFileMatch` | boolean | No | `true` | Case-sensitive filename matching |
|
|
305
|
+
|
|
306
|
+
Returns: Matching lines with file path, line number, content, and optional
|
|
307
|
+
context. Structured output includes `effectiveOptions` and a `summary`
|
|
308
|
+
(filesScanned/filesMatched, totalMatches, truncated/stoppedReason,
|
|
309
|
+
skippedTooLarge/skippedBinary/skippedInaccessible,
|
|
310
|
+
linesSkippedDueToRegexTimeout).
|
|
407
311
|
|
|
408
312
|
---
|
|
409
313
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
314
|
+
Built-in exclude list: common dependency/build/output directories (e.g.,
|
|
315
|
+
`node_modules`, `dist`, `build`, `coverage`, `.git`, `.vscode`, `.idea`,
|
|
316
|
+
`.cache`, `.next`, `.nuxt`, `.svelte-kit`). Pass `excludePatterns: []` to
|
|
317
|
+
disable it.
|
|
318
|
+
|
|
319
|
+
## Error Codes
|
|
320
|
+
|
|
321
|
+
| Code | Meaning |
|
|
322
|
+
| ----------------------- | ----------------------------- |
|
|
323
|
+
| `E_ACCESS_DENIED` | Path outside allowed roots |
|
|
324
|
+
| `E_NOT_FOUND` | Path does not exist |
|
|
325
|
+
| `E_NOT_FILE` | Expected file, got directory |
|
|
326
|
+
| `E_NOT_DIRECTORY` | Expected directory, got file |
|
|
327
|
+
| `E_TOO_LARGE` | File exceeds size limits |
|
|
328
|
+
| `E_TIMEOUT` | Operation timed out |
|
|
329
|
+
| `E_INVALID_PATTERN` | Invalid glob/regex pattern |
|
|
330
|
+
| `E_INVALID_INPUT` | Invalid argument(s) |
|
|
331
|
+
| `E_PERMISSION_DENIED` | OS-level permission denied |
|
|
332
|
+
| `E_SYMLINK_NOT_ALLOWED` | Symlink escapes allowed roots |
|
|
333
|
+
| `E_UNKNOWN` | Unexpected error |
|
|
334
|
+
|
|
335
|
+
## Client Configuration
|
|
424
336
|
|
|
425
337
|
<details>
|
|
426
338
|
<summary><b>VS Code</b></summary>
|
|
@@ -442,8 +354,6 @@ Add to `.vscode/mcp.json` (recommended) or `.vscode/settings.json`:
|
|
|
442
354
|
}
|
|
443
355
|
```
|
|
444
356
|
|
|
445
|
-
> **Note:** `${workspaceFolder}` is expanded by VS Code to the current workspace path.
|
|
446
|
-
|
|
447
357
|
</details>
|
|
448
358
|
|
|
449
359
|
<details>
|
|
@@ -457,12 +367,18 @@ Add to `.vscode/mcp.json` (recommended) or `.vscode/settings.json`:
|
|
|
457
367
|
"mcpServers": {
|
|
458
368
|
"filesystem-context": {
|
|
459
369
|
"command": "npx",
|
|
460
|
-
"args": [
|
|
370
|
+
"args": [
|
|
371
|
+
"-y",
|
|
372
|
+
"@j0hanz/filesystem-context-mcp@latest",
|
|
373
|
+
"C:\\path\\to\\project"
|
|
374
|
+
]
|
|
461
375
|
}
|
|
462
376
|
}
|
|
463
377
|
}
|
|
464
378
|
```
|
|
465
379
|
|
|
380
|
+
If your client supports MCP Roots, you can omit the path. Otherwise, pass a path or `--allow-cwd`.
|
|
381
|
+
|
|
466
382
|
</details>
|
|
467
383
|
|
|
468
384
|
<details>
|
|
@@ -475,7 +391,11 @@ Add to Cursor's MCP configuration:
|
|
|
475
391
|
"mcpServers": {
|
|
476
392
|
"filesystem-context": {
|
|
477
393
|
"command": "npx",
|
|
478
|
-
"args": [
|
|
394
|
+
"args": [
|
|
395
|
+
"-y",
|
|
396
|
+
"@j0hanz/filesystem-context-mcp@latest",
|
|
397
|
+
"${workspaceFolder}"
|
|
398
|
+
]
|
|
479
399
|
}
|
|
480
400
|
}
|
|
481
401
|
}
|
|
@@ -488,31 +408,13 @@ Add to Cursor's MCP configuration:
|
|
|
488
408
|
|
|
489
409
|
Add to `~/.codex/config.toml`:
|
|
490
410
|
|
|
491
|
-
**Basic Configuration (auto-detects current directory):**
|
|
492
|
-
|
|
493
|
-
```toml
|
|
494
|
-
[mcp_servers.filesystem-context]
|
|
495
|
-
command = "npx"
|
|
496
|
-
args = ["-y", "@j0hanz/filesystem-context-mcp@latest"]
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
**Configuration with Explicit Directory:**
|
|
500
|
-
|
|
501
411
|
```toml
|
|
502
412
|
[mcp_servers.filesystem-context]
|
|
503
413
|
command = "npx"
|
|
504
414
|
args = ["-y", "@j0hanz/filesystem-context-mcp@latest", "/path/to/your/project"]
|
|
505
415
|
```
|
|
506
416
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
```toml
|
|
510
|
-
[mcp_servers.filesystem-context]
|
|
511
|
-
command = "npx"
|
|
512
|
-
args = ["-y", "@j0hanz/filesystem-context-mcp@latest", "/path/to/project1", "/path/to/project2"]
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
> **Note:** You can access the config file via Codex IDE by clicking the gear icon → "Codex Settings > Open config.toml". If no directories are specified, it will use the current working directory automatically.
|
|
417
|
+
If your client supports MCP Roots, you can omit the path. Otherwise, pass a path or `--allow-cwd`.
|
|
516
418
|
|
|
517
419
|
</details>
|
|
518
420
|
|
|
@@ -526,7 +428,11 @@ Add to Windsurf's MCP configuration:
|
|
|
526
428
|
"mcpServers": {
|
|
527
429
|
"filesystem-context": {
|
|
528
430
|
"command": "npx",
|
|
529
|
-
"args": [
|
|
431
|
+
"args": [
|
|
432
|
+
"-y",
|
|
433
|
+
"@j0hanz/filesystem-context-mcp@latest",
|
|
434
|
+
"${workspaceFolder}"
|
|
435
|
+
]
|
|
530
436
|
}
|
|
531
437
|
}
|
|
532
438
|
}
|
|
@@ -534,55 +440,21 @@ Add to Windsurf's MCP configuration:
|
|
|
534
440
|
|
|
535
441
|
</details>
|
|
536
442
|
|
|
537
|
-
##
|
|
443
|
+
## Security
|
|
538
444
|
|
|
539
445
|
This server implements multiple layers of security:
|
|
540
446
|
|
|
541
|
-
| Protection
|
|
542
|
-
|
|
|
543
|
-
|
|
|
544
|
-
|
|
|
545
|
-
|
|
|
546
|
-
|
|
|
547
|
-
|
|
|
548
|
-
|
|
|
549
|
-
|
|
|
447
|
+
| Protection | Description |
|
|
448
|
+
| ------------------------- | ------------------------------------------------------------- |
|
|
449
|
+
| Access control | Only explicitly allowed directories are accessible |
|
|
450
|
+
| Path validation | All paths are validated before any filesystem operation |
|
|
451
|
+
| Symlink protection | Symlinks that resolve outside allowed directories are blocked |
|
|
452
|
+
| Path traversal prevention | Attempts to escape via `..` are detected and blocked |
|
|
453
|
+
| Read-only operations | No writes, deletes, or modifications |
|
|
454
|
+
| Safe regex | Regex validation and timeouts prevent ReDoS |
|
|
455
|
+
| Size limits | Configurable limits prevent resource exhaustion |
|
|
550
456
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
```text
|
|
554
|
-
┌─────────────────────────────────────────────────────────┐
|
|
555
|
-
│ MCP Client │
|
|
556
|
-
└─────────────────────┬───────────────────────────────────┘
|
|
557
|
-
│
|
|
558
|
-
▼
|
|
559
|
-
┌─────────────────────────────────────────────────────────┐
|
|
560
|
-
│ Filesystem Context MCP Server │
|
|
561
|
-
│ ┌───────────────────────────────────────────────────┐ │
|
|
562
|
-
│ │ Path Validation Layer │ │
|
|
563
|
-
│ │ • Normalize paths │ │
|
|
564
|
-
│ │ • Check against allowed directories │ │
|
|
565
|
-
│ │ • Resolve and validate symlinks │ │
|
|
566
|
-
│ │ • Block traversal attempts │ │
|
|
567
|
-
│ └───────────────────────────────────────────────────┘ │
|
|
568
|
-
│ │ │
|
|
569
|
-
│ ▼ │
|
|
570
|
-
│ ┌───────────────────────────────────────────────────┐ │
|
|
571
|
-
│ │ Read-Only File Operations │ │
|
|
572
|
-
│ └───────────────────────────────────────────────────┘ │
|
|
573
|
-
└─────────────────────────────────────────────────────────┘
|
|
574
|
-
│
|
|
575
|
-
▼
|
|
576
|
-
┌─────────────────────────────────────────────────────────┐
|
|
577
|
-
│ Allowed Directories Only │
|
|
578
|
-
│ /home/user/project ✅ │
|
|
579
|
-
│ /home/user/docs ✅ │
|
|
580
|
-
│ /etc/passwd ❌ (blocked) │
|
|
581
|
-
│ ../../../etc ❌ (blocked) │
|
|
582
|
-
└─────────────────────────────────────────────────────────┘
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
## 🛠️ Development
|
|
457
|
+
## Development
|
|
586
458
|
|
|
587
459
|
### Prerequisites
|
|
588
460
|
|
|
@@ -602,107 +474,36 @@ This server implements multiple layers of security:
|
|
|
602
474
|
| `npm run lint` | Run ESLint |
|
|
603
475
|
| `npm run format` | Format code with Prettier |
|
|
604
476
|
| `npm run type-check` | TypeScript type checking |
|
|
477
|
+
| `npm run bench` | Run benchmarks |
|
|
605
478
|
| `npm run inspector` | Test with MCP Inspector |
|
|
606
479
|
|
|
607
480
|
### Project Structure
|
|
608
481
|
|
|
609
482
|
```text
|
|
610
483
|
src/
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
│ ├── file-operations.ts# Core filesystem operations (exports)
|
|
620
|
-
│ ├── path-utils.ts # Path manipulation utilities
|
|
621
|
-
│ ├── path-validation.ts# Security: path validation layer
|
|
622
|
-
│ ├── fs-helpers.ts # Low-level filesystem helpers (exports)
|
|
623
|
-
│ ├── file-operations/ # Core filesystem operations
|
|
624
|
-
│ │ ├── analyze-directory.ts
|
|
625
|
-
│ │ ├── directory-helpers.ts
|
|
626
|
-
│ │ ├── directory-tree.ts
|
|
627
|
-
│ │ ├── file-info.ts
|
|
628
|
-
│ │ ├── list-directory.ts
|
|
629
|
-
│ │ ├── pattern-validator.ts
|
|
630
|
-
│ │ ├── read-media-file.ts
|
|
631
|
-
│ │ ├── read-multiple-files.ts
|
|
632
|
-
│ │ ├── search-content.ts
|
|
633
|
-
│ │ ├── search-definitions.ts
|
|
634
|
-
│ │ ├── search-files.ts
|
|
635
|
-
│ │ └── sorting.ts
|
|
636
|
-
│ ├── fs-helpers/ # Low-level filesystem helpers
|
|
637
|
-
│ │ ├── binary-detect.ts
|
|
638
|
-
│ │ ├── concurrency.ts
|
|
639
|
-
│ │ ├── fs-utils.ts
|
|
640
|
-
│ │ ├── readers.ts
|
|
641
|
-
│ │ └── readers/ # File reading utilities
|
|
642
|
-
│ │ ├── head-file.ts
|
|
643
|
-
│ │ ├── line-range.ts
|
|
644
|
-
│ │ ├── read-file.ts
|
|
645
|
-
│ │ ├── tail-file.ts
|
|
646
|
-
│ │ └── utf8.ts
|
|
647
|
-
│ └── path-validation/ # Security: path validation
|
|
648
|
-
│ ├── allowed-directories.ts
|
|
649
|
-
│ ├── errors.ts
|
|
650
|
-
│ ├── roots.ts
|
|
651
|
-
│ └── validators.ts
|
|
652
|
-
├── schemas/
|
|
653
|
-
│ ├── common.ts # Shared Zod schemas
|
|
654
|
-
│ ├── input-helpers.ts # Input validation helpers
|
|
655
|
-
│ ├── inputs.ts # Input validation schemas
|
|
656
|
-
│ ├── output-helpers.ts # Output formatting helpers
|
|
657
|
-
│ ├── outputs.ts # Output validation schemas
|
|
658
|
-
│ └── index.ts # Schema exports
|
|
659
|
-
├── tools/
|
|
660
|
-
│ ├── analyze-directory.ts
|
|
661
|
-
│ ├── directory-tree.ts
|
|
662
|
-
│ ├── get-file-info.ts
|
|
663
|
-
│ ├── list-allowed-dirs.ts
|
|
664
|
-
│ ├── list-directory.ts
|
|
665
|
-
│ ├── read-file.ts
|
|
666
|
-
│ ├── read-media-file.ts
|
|
667
|
-
│ ├── read-multiple-files.ts
|
|
668
|
-
│ ├── search-content.ts
|
|
669
|
-
│ ├── search-definitions.ts
|
|
670
|
-
│ ├── search-files.ts
|
|
671
|
-
│ ├── tool-response.ts # Tool response formatting
|
|
672
|
-
│ └── index.ts # Tool registration
|
|
673
|
-
└── __tests__/ # Test files
|
|
674
|
-
├── lib/
|
|
675
|
-
│ ├── errors.test.ts
|
|
676
|
-
│ ├── file-operations.test.ts
|
|
677
|
-
│ ├── fs-helpers.test.ts
|
|
678
|
-
│ └── path-validation.test.ts
|
|
679
|
-
├── schemas/
|
|
680
|
-
│ └── validators.test.ts
|
|
681
|
-
└── security/
|
|
682
|
-
└── filesystem-boundary.test.ts
|
|
484
|
+
index.ts # CLI entry point
|
|
485
|
+
server.ts # MCP server wiring and roots handling
|
|
486
|
+
instructions.md # Tool usage instructions (bundled in dist)
|
|
487
|
+
config/ # Shared types and formatting helpers
|
|
488
|
+
lib/ # Core logic and filesystem operations
|
|
489
|
+
schemas/ # Zod input/output schemas
|
|
490
|
+
tools/ # MCP tool registration
|
|
491
|
+
__tests__/ # Vitest tests
|
|
683
492
|
```
|
|
684
493
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
```bash
|
|
688
|
-
npm run inspector
|
|
689
|
-
```
|
|
690
|
-
|
|
691
|
-
This launches the MCP Inspector for interactive testing of all tools.
|
|
692
|
-
|
|
693
|
-
## ❓ Troubleshooting
|
|
494
|
+
## Troubleshooting
|
|
694
495
|
|
|
695
|
-
| Issue
|
|
696
|
-
|
|
|
697
|
-
| "Access denied" error
|
|
698
|
-
| "Path does not exist"
|
|
699
|
-
| "File too large"
|
|
700
|
-
| "Binary file" warning
|
|
701
|
-
|
|
|
702
|
-
| Symlink blocked
|
|
703
|
-
| Regex timeout
|
|
496
|
+
| Issue | Solution |
|
|
497
|
+
| ------------------------ | ---------------------------------------------------------------------------------------- |
|
|
498
|
+
| "Access denied" error | Ensure the path is within an allowed directory. Use `list_allowed_directories` to check. |
|
|
499
|
+
| "Path does not exist" | Verify the path exists. Use `list_directory` to explore available files. |
|
|
500
|
+
| "File too large" | Use `head`/`tail` or increase `maxSize`. |
|
|
501
|
+
| "Binary file" warning | Set `skipBinary=false` in `read_file` to read as text. |
|
|
502
|
+
| No directories available | Pass explicit paths, use `--allow-cwd`, or ensure the client provides MCP Roots. |
|
|
503
|
+
| Symlink blocked | Symlinks that resolve outside allowed directories are blocked. |
|
|
504
|
+
| Regex timeout | Simplify the regex or increase `REGEX_TIMEOUT`. |
|
|
704
505
|
|
|
705
|
-
##
|
|
506
|
+
## Contributing
|
|
706
507
|
|
|
707
508
|
Contributions are welcome! Please follow these steps:
|
|
708
509
|
|