@j0hanz/filesystem-mcp 1.14.1 → 1.15.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/LICENSE +21 -0
- package/README.md +126 -56
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 j0hanz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -4,10 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://insiders.vscode.dev/redirect/mcp/install?name=filesystem&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-mcp%40latest%22%5D%7D) [](https://insiders.vscode.dev/redirect/mcp/install?name=filesystem&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-mcp%40latest%22%5D%7D&quality=insiders) [](https://vs-open.link/mcp-install?%7B%22filesystem-mcp%22%3A%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40j0hanz%2Ffilesystem-mcp%40latest%22%5D%7D%7D)
|
|
6
6
|
|
|
7
|
-
[](https://lmstudio.ai/install-mcp?name=filesystem&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmlsZXN5c3RlbS1tY3BAbGF0ZXN0Il19) [](https://cursor.com/en/install-mcp?name=filesystem&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmlsZXN5c3RlbS1tY3BAbGF0ZXN0Il19)
|
|
7
|
+
[](https://lmstudio.ai/install-mcp?name=filesystem&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmlsZXN5c3RlbS1tY3BAbGF0ZXN0Il19) [](https://cursor.com/en/install-mcp?name=filesystem&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmlsZXN5c3RlbS1tY3BAbGF0ZXN0Il19)
|
|
8
8
|
|
|
9
9
|
A local filesystem MCP server that lets LLMs and AI agents read, write, search, diff, patch, and manage files safely and efficiently. Built for reliable, structured, and controlled filesystem interaction.
|
|
10
10
|
|
|
11
|
+
## Table of Contents
|
|
12
|
+
|
|
13
|
+
- [Overview](#overview)
|
|
14
|
+
- [Key Features](#key-features)
|
|
15
|
+
- [Quick Start](#quick-start) — [Docker](#docker) · [CLI Usage](#cli-usage)
|
|
16
|
+
- [Client Configuration](#client-configuration)
|
|
17
|
+
- [Use Cases](#use-cases)
|
|
18
|
+
- [Architecture](#architecture)
|
|
19
|
+
- [MCP Surface](#mcp-surface) — [Tools](#tools) · [Resources](#resources) · [Prompts](#prompts)
|
|
20
|
+
- [MCP Capabilities](#mcp-capabilities) — [Tool Annotations](#tool-annotations) · [Structured Output](#structured-output)
|
|
21
|
+
- [Configuration](#configuration) — [HTTP & Auth](#http--auth) · [File Size Limits](#file-size-limits) · [Access Control](#access-control) · [Output & Inline Limits](#output--inline-limits) · [Tasks](#tasks) · [Logging & Diagnostics](#logging--diagnostics) · [Performance](#performance)
|
|
22
|
+
- [HTTP Endpoints](#http-endpoints)
|
|
23
|
+
- [Security](#security)
|
|
24
|
+
- [Development](#development)
|
|
25
|
+
- [Troubleshooting](#troubleshooting)
|
|
26
|
+
- [Credits](#credits)
|
|
27
|
+
- [Contributing and License](#contributing-and-license)
|
|
28
|
+
|
|
11
29
|
## Overview
|
|
12
30
|
|
|
13
31
|
A secure, production-ready [Model Context Protocol](https://modelcontextprotocol.io) server that gives AI assistants controlled access to the local filesystem. All operations are sandboxed to explicitly allowed directories with path traversal prevention, sensitive file blocking, and optional Bearer token authentication.
|
|
@@ -174,8 +192,6 @@ Add to `<SOLUTIONDIR>.mcp.json` or `%USERPROFILE%\.mcp.json`:
|
|
|
174
192
|
<details>
|
|
175
193
|
<summary><b>Install in Goose</b></summary>
|
|
176
194
|
|
|
177
|
-
[](https://block.github.io/goose/extension?cmd=npx&arg=-y&arg=%40j0hanz%2Ffilesystem-mcp%40latest&id=%40j0hanz%2Ffilesystem-mcp&name=filesystem&description=MCP%20Server%20that%20enables%20LLMs%20to%20interact%20with%20the%20local%20filesystem.)
|
|
178
|
-
|
|
179
195
|
Add to `~/.config/goose/config.yaml`:
|
|
180
196
|
|
|
181
197
|
```yaml
|
|
@@ -469,37 +485,39 @@ Add to VS Code `settings.json` under `augment.advanced`:
|
|
|
469
485
|
|
|
470
486
|
</details>
|
|
471
487
|
|
|
488
|
+
[↑ Back to top](#table-of-contents)
|
|
489
|
+
|
|
472
490
|
## Use Cases
|
|
473
491
|
|
|
474
492
|
### Explore and Understand a Codebase
|
|
475
493
|
|
|
476
494
|
Discover project structure and navigate unfamiliar repositories. Start with `roots` to see allowed directories, use `tree` for an overview, `find` to locate files by pattern, and `read` or `read_many` to inspect contents.
|
|
477
495
|
|
|
478
|
-
**Relevant tools:** `roots
|
|
496
|
+
**Relevant tools:** [`roots`](#roots), [`ls`](#ls), [`find`](#find), [`tree`](#tree), [`read`](#read), [`read_many`](#read_many), [`stat`](#stat)
|
|
479
497
|
|
|
480
498
|
### Search Across Files
|
|
481
499
|
|
|
482
500
|
Locate specific code patterns, function definitions, or configuration values across a project. Use `grep` for content search with regex support and `find` for file name matching.
|
|
483
501
|
|
|
484
|
-
**Relevant tools:** `grep
|
|
502
|
+
**Relevant tools:** [`grep`](#grep), [`find`](#find)
|
|
485
503
|
|
|
486
504
|
### Edit and Refactor Code
|
|
487
505
|
|
|
488
506
|
Make precise, targeted edits to source files. Use `edit` for surgical replacements with dry-run preview, or `search_and_replace` for bulk changes across multiple files matching a glob pattern.
|
|
489
507
|
|
|
490
|
-
**Relevant tools:** `edit
|
|
508
|
+
**Relevant tools:** [`edit`](#edit), [`search_and_replace`](#search_and_replace), [`write`](#write)
|
|
491
509
|
|
|
492
510
|
### Diff and Patch Workflow
|
|
493
511
|
|
|
494
512
|
Compare file versions and apply patches. Generate a unified diff with `diff_files`, preview with `apply_patch(dryRun: true)`, then apply. Supports both single-file and multi-file patches (best-effort per file with per-file `results[]`).
|
|
495
513
|
|
|
496
|
-
**Relevant tools:** `diff_files
|
|
514
|
+
**Relevant tools:** [`diff_files`](#diff_files), [`apply_patch`](#apply_patch)
|
|
497
515
|
|
|
498
516
|
### File Management
|
|
499
517
|
|
|
500
518
|
Create directories, move/rename files, delete files, and verify file integrity via SHA-256 hashing.
|
|
501
519
|
|
|
502
|
-
**Relevant tools:** `mkdir
|
|
520
|
+
**Relevant tools:** [`mkdir`](#mkdir), [`mv`](#mv), [`rm`](#rm), [`calculate_hash`](#calculate_hash), [`write`](#write)
|
|
503
521
|
|
|
504
522
|
## Architecture
|
|
505
523
|
|
|
@@ -565,6 +583,8 @@ Create directories, move/rename files, delete files, and verify file integrity v
|
|
|
565
583
|
|
|
566
584
|
### Tools
|
|
567
585
|
|
|
586
|
+
[`roots`](#roots) · [`ls`](#ls) · [`find`](#find) · [`tree`](#tree) · [`read`](#read) · [`read_many`](#read_many) · [`stat`](#stat) · [`stat_many`](#stat_many) · [`grep`](#grep) · [`mkdir`](#mkdir) · [`write`](#write) · [`edit`](#edit) · [`mv`](#mv) · [`rm`](#rm) · [`calculate_hash`](#calculate_hash) · [`diff_files`](#diff_files) · [`apply_patch`](#apply_patch) · [`search_and_replace`](#search_and_replace)
|
|
587
|
+
|
|
568
588
|
#### `roots`
|
|
569
589
|
|
|
570
590
|
List allowed workspace roots. Call first — all other tools are scoped to these directories.
|
|
@@ -582,8 +602,8 @@ List immediate directory contents: name, path, type, size, modified date.
|
|
|
582
602
|
| `path` | string | no | Base directory (default: root) |
|
|
583
603
|
| `includeHidden` | boolean | no | Include dotfiles. Default: `false` |
|
|
584
604
|
| `includeIgnored` | boolean | no | Include ignored items (node_modules, .git). Default: `false` |
|
|
585
|
-
| `maxDepth` | integer | no | Max recursion depth (1-
|
|
586
|
-
| `maxEntries` | integer | no | Max entries before truncation. Default:
|
|
605
|
+
| `maxDepth` | integer | no | Max recursion depth (1-50) when pattern is provided |
|
|
606
|
+
| `maxEntries` | integer | no | Max entries before truncation. Default: 20000, Max: 20000 |
|
|
587
607
|
| `sortBy` | enum | no | `name` \| `size` \| `modified` \| `type`. Default: `name` |
|
|
588
608
|
| `pattern` | string | no | Relative glob filter (e.g. `**/*.ts`). Absolute paths and `..` are rejected |
|
|
589
609
|
| `includeSymlinkTargets` | boolean | no | Resolve symlink targets. Default: `false` |
|
|
@@ -599,11 +619,11 @@ Find files by glob pattern. Returns matching files with metadata.
|
|
|
599
619
|
| ---------------- | ------- | -------- | ---------------------------------------------------------------------------- |
|
|
600
620
|
| `path` | string | no | Base directory (default: root) |
|
|
601
621
|
| `pattern` | string | **yes** | Relative glob pattern (e.g. `**/*.ts`). Absolute paths and `..` are rejected |
|
|
602
|
-
| `maxResults` | integer | no | Max results (1-
|
|
622
|
+
| `maxResults` | integer | no | Max results (1-10000). Default: 100 |
|
|
603
623
|
| `includeIgnored` | boolean | no | Include ignored items. Default: `false` |
|
|
604
624
|
| `includeHidden` | boolean | no | Include dotfiles. Default: `false` |
|
|
605
625
|
| `sortBy` | enum | no | `path` \| `name` \| `size` \| `modified`. Default: `path` |
|
|
606
|
-
| `maxDepth` | integer | no | Max directory depth (0-
|
|
626
|
+
| `maxDepth` | integer | no | Max directory depth (0-100) |
|
|
607
627
|
| `cursor` | string | no | Pagination cursor |
|
|
608
628
|
|
|
609
629
|
---
|
|
@@ -615,8 +635,8 @@ Render a directory tree with bounded recursion. Returns ASCII tree + structured
|
|
|
615
635
|
| Parameter | Type | Required | Description |
|
|
616
636
|
| ---------------- | ------- | -------- | ---------------------------------------------------- |
|
|
617
637
|
| `path` | string | no | Base directory (default: root) |
|
|
618
|
-
| `maxDepth` | integer | no | Depth (0 = root node only). Default:
|
|
619
|
-
| `maxEntries` | integer | no | Max entries. Default:
|
|
638
|
+
| `maxDepth` | integer | no | Depth (0 = root node only). Default: 5, Max: 50 |
|
|
639
|
+
| `maxEntries` | integer | no | Max entries. Default: 1000, Max: 20000 |
|
|
620
640
|
| `includeHidden` | boolean | no | Include dotfiles. Default: `false` |
|
|
621
641
|
| `includeIgnored` | boolean | no | Include ignored items. Default: `false` |
|
|
622
642
|
| `includeSizes` | boolean | no | Include file sizes in tree entries. Default: `false` |
|
|
@@ -676,18 +696,18 @@ Get metadata for multiple files/directories in one request.
|
|
|
676
696
|
|
|
677
697
|
Search file contents (grep-like). Returns matching lines with optional context.
|
|
678
698
|
|
|
679
|
-
| Parameter | Type | Required | Description
|
|
680
|
-
| ---------------- | ------- | -------- |
|
|
681
|
-
| `path` | string | no | Base directory (default: root)
|
|
682
|
-
| `pattern` | string | **yes** | Search text or RE2 regex when `isRegex=true`
|
|
683
|
-
| `isRegex` | boolean | no | Treat pattern as RE2 regex. Default: `false`
|
|
684
|
-
| `caseSensitive` | boolean | no | Case-sensitive matching. Default: `false`
|
|
685
|
-
| `wholeWord` | boolean | no | Match whole words only. Default: `false`
|
|
686
|
-
| `contextLines` | integer | no | Lines of context before/after (0-50). Default: 0
|
|
687
|
-
| `maxResults` | integer | no | Max match rows (
|
|
688
|
-
| `filePattern` | string | no | Relative glob for candidate files (e.g. `**/*.ts`).
|
|
689
|
-
| `includeHidden` | boolean | no | Include dotfiles. Default: `false`
|
|
690
|
-
| `includeIgnored` | boolean | no | Include ignored items. Default: `false`
|
|
699
|
+
| Parameter | Type | Required | Description |
|
|
700
|
+
| ---------------- | ------- | -------- | ------------------------------------------------------------------- |
|
|
701
|
+
| `path` | string | no | Base directory (default: root) |
|
|
702
|
+
| `pattern` | string | **yes** | Search text or RE2 regex when `isRegex=true` |
|
|
703
|
+
| `isRegex` | boolean | no | Treat pattern as RE2 regex. Default: `false` |
|
|
704
|
+
| `caseSensitive` | boolean | no | Case-sensitive matching. Default: `false` |
|
|
705
|
+
| `wholeWord` | boolean | no | Match whole words only. Default: `false` |
|
|
706
|
+
| `contextLines` | integer | no | Lines of context before/after (0-50). Default: 0 |
|
|
707
|
+
| `maxResults` | integer | no | Max match rows (0-10000). Default: 500 |
|
|
708
|
+
| `filePattern` | string | no | Relative glob for candidate files (e.g. `**/*.ts`). Default: `**/*` |
|
|
709
|
+
| `includeHidden` | boolean | no | Include dotfiles. Default: `false` |
|
|
710
|
+
| `includeIgnored` | boolean | no | Include ignored items. Default: `false` |
|
|
691
711
|
|
|
692
712
|
---
|
|
693
713
|
|
|
@@ -792,19 +812,19 @@ Apply a unified diff patch to one or more files. Single-file: throws on failure.
|
|
|
792
812
|
|
|
793
813
|
Bulk search-and-replace across files matching a glob. Replaces **all** occurrences per file. Always `dryRun: true` first.
|
|
794
814
|
|
|
795
|
-
| Parameter | Type | Required | Description
|
|
796
|
-
| ---------------- | ------- | -------- |
|
|
797
|
-
| `path` | string | no | Base directory (default: root)
|
|
798
|
-
| `filePattern` | string |
|
|
799
|
-
| `searchPattern` | string | **yes** | Text to search. RE2 regex when `isRegex=true`
|
|
800
|
-
| `replacement` | string | **yes** | Replacement text. Supports `$1`, `$2` with regex
|
|
801
|
-
| `isRegex` | boolean | no | Treat as RE2 regex. Default: `false`
|
|
802
|
-
| `dryRun` | boolean | no | Preview matches with diff. Default: `false`
|
|
803
|
-
| `includeHidden` | boolean | no | Include dotfiles. Default: `false`
|
|
804
|
-
| `includeIgnored` | boolean | no | Include ignored items. Default: `false`
|
|
805
|
-
| `returnDiff` | boolean | no | Return diff even when not dry-run. Default: `false`
|
|
806
|
-
| `maxFiles` | integer | no | Max files to process before stopping (1-10000)
|
|
807
|
-
| `caseSensitive` | boolean | no | Case-sensitive matching. Default: `true`
|
|
815
|
+
| Parameter | Type | Required | Description |
|
|
816
|
+
| ---------------- | ------- | -------- | ------------------------------------------------------- |
|
|
817
|
+
| `path` | string | no | Base directory (default: root) |
|
|
818
|
+
| `filePattern` | string | no | Relative glob pattern (e.g. `**/*.ts`). Default: `**/*` |
|
|
819
|
+
| `searchPattern` | string | **yes** | Text to search. RE2 regex when `isRegex=true` |
|
|
820
|
+
| `replacement` | string | **yes** | Replacement text. Supports `$1`, `$2` with regex |
|
|
821
|
+
| `isRegex` | boolean | no | Treat as RE2 regex. Default: `false` |
|
|
822
|
+
| `dryRun` | boolean | no | Preview matches with diff. Default: `false` |
|
|
823
|
+
| `includeHidden` | boolean | no | Include dotfiles. Default: `false` |
|
|
824
|
+
| `includeIgnored` | boolean | no | Include ignored items. Default: `false` |
|
|
825
|
+
| `returnDiff` | boolean | no | Return diff even when not dry-run. Default: `false` |
|
|
826
|
+
| `maxFiles` | integer | no | Max files to process before stopping (1-10000) |
|
|
827
|
+
| `caseSensitive` | boolean | no | Case-sensitive matching. Default: `true` |
|
|
808
828
|
|
|
809
829
|
### Resources
|
|
810
830
|
|
|
@@ -849,21 +869,69 @@ Bulk search-and-replace across files matching a glob. Replaces **all** occurrenc
|
|
|
849
869
|
|
|
850
870
|
All 18 tools define `outputSchema` (Zod -> JSON Schema) and return `structuredContent` alongside text `content`. Set `FS_CONTEXT_STRIP_STRUCTURED=true` to strip output schemas from tool definitions (reduces token usage for LLMs that don't use structured output).
|
|
851
871
|
|
|
872
|
+
[↑ Back to top](#table-of-contents)
|
|
873
|
+
|
|
852
874
|
## Configuration
|
|
853
875
|
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
|
857
|
-
|
|
|
858
|
-
| `
|
|
859
|
-
| `
|
|
860
|
-
| `
|
|
861
|
-
| `
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
|
866
|
-
|
|
|
876
|
+
### HTTP & Auth
|
|
877
|
+
|
|
878
|
+
| Variable | Default | Description |
|
|
879
|
+
| ---------------------------------- | ---------------- | -------------------------------------------------------------- |
|
|
880
|
+
| `FILESYSTEM_MCP_API_KEY` | _(none)_ | Bearer token required when binding HTTP to a non-loopback host |
|
|
881
|
+
| `FILESYSTEM_MCP_MAX_HTTP_SESSIONS` | `100` | Max concurrent HTTP sessions (1-10,000) |
|
|
882
|
+
| `FILESYSTEM_MCP_HTTP_HOST` | `127.0.0.1` | HTTP server bind address |
|
|
883
|
+
| `FS_CONTEXT_MAX_REQUEST_BYTES` | `4194304` (4 MB) | Max HTTP request body size (1 KB - 256 MB) |
|
|
884
|
+
|
|
885
|
+
### File Size Limits
|
|
886
|
+
|
|
887
|
+
| Variable | Default | Description |
|
|
888
|
+
| -------------------------- | ------------------ | ------------------------------------------------------------- |
|
|
889
|
+
| `MAX_FILE_SIZE` | `10485760` (10 MB) | Max file size for text read operations (1 MB - 100 MB) |
|
|
890
|
+
| `MAX_SEARCH_SIZE` | `1048576` (1 MB) | Max file size for content search/grep (100 KB - 10 MB) |
|
|
891
|
+
| `MAX_READ_MANY_TOTAL_SIZE` | `524288` (512 KB) | Max cumulative size for `read_many` requests (10 KB - 100 MB) |
|
|
892
|
+
| `DEFAULT_SEARCH_TIMEOUT` | `5000` | Search operation timeout in ms (100 - 60,000) |
|
|
893
|
+
|
|
894
|
+
### Access Control
|
|
895
|
+
|
|
896
|
+
| Variable | Default | Description |
|
|
897
|
+
| ---------------------------- | -------- | ------------------------------------------------------------------------------- |
|
|
898
|
+
| `FS_CONTEXT_ALLOW_SENSITIVE` | `false` | Allow reading sensitive files (.env, .key, credentials, tokens) |
|
|
899
|
+
| `FS_CONTEXT_DENYLIST` | _(none)_ | CSV/newline-separated glob patterns to block (in addition to built-in denylist) |
|
|
900
|
+
| `FS_CONTEXT_ALLOWLIST` | _(none)_ | CSV/newline-separated glob patterns to permit (overrides denylist) |
|
|
901
|
+
|
|
902
|
+
### Output & Inline Limits
|
|
903
|
+
|
|
904
|
+
| Variable | Default | Description |
|
|
905
|
+
| ------------------------------- | ------- | ------------------------------------------------------------------------------ |
|
|
906
|
+
| `FS_CONTEXT_MAX_INLINE_CHARS` | `20000` | Max inline result chars before externalizing to `filesystem-mcp://result/{id}` |
|
|
907
|
+
| `FS_CONTEXT_MAX_INLINE_MATCHES` | `50` | Max inline search matches before truncation |
|
|
908
|
+
| `FS_CONTEXT_STRIP_STRUCTURED` | `false` | Strip `outputSchema` from tool definitions (reduces tokens) |
|
|
909
|
+
|
|
910
|
+
### Tasks
|
|
911
|
+
|
|
912
|
+
| Variable | Default | Description |
|
|
913
|
+
| ------------------------------------- | ---------------- | ----------------------------------------------- |
|
|
914
|
+
| `FILESYSTEM_MCP_MAX_TASK_TTL_MS` | `3600000` (1 hr) | Max task TTL before auto-eviction (1 s - 24 hr) |
|
|
915
|
+
| `FILESYSTEM_MCP_MAX_CONCURRENT_TASKS` | `100` | Max simultaneous task executions (1-10,000) |
|
|
916
|
+
|
|
917
|
+
### Logging & Diagnostics
|
|
918
|
+
|
|
919
|
+
| Variable | Default | Description |
|
|
920
|
+
| --------------------------------- | ------- | ------------------------------------------------------------------------------ |
|
|
921
|
+
| `FILESYSTEM_MCP_LOG_LEVEL` | `info` | MCP log level: debug, info, notice, warning, error, critical, alert, emergency |
|
|
922
|
+
| `FS_CONTEXT_DIAGNOSTICS` | `false` | Enable diagnostic logging |
|
|
923
|
+
| `FS_CONTEXT_DIAGNOSTICS_DETAIL` | `false` | Enable detailed diagnostic output |
|
|
924
|
+
| `FS_CONTEXT_TOOL_LOG_ERRORS` | `false` | Log tool errors to stderr |
|
|
925
|
+
| `FS_CONTEXT_SEARCH_WORKERS_DEBUG` | `false` | Debug logging for search worker pool |
|
|
926
|
+
|
|
927
|
+
### Performance
|
|
928
|
+
|
|
929
|
+
| Variable | Default | Description |
|
|
930
|
+
| ------------------------------- | ---------------- | ---------------------------------------- |
|
|
931
|
+
| `FS_CONTEXT_SEARCH_WORKERS` | CPU cores (≤ 8) | Concurrent search worker threads (1-16) |
|
|
932
|
+
| `FS_CONTEXT_LIST_CURSOR_TTL_MS` | `300000` (5 min) | Cursor TTL for `ls` pagination snapshots |
|
|
933
|
+
|
|
934
|
+
[↑ Back to top](#table-of-contents)
|
|
867
935
|
|
|
868
936
|
## HTTP Endpoints
|
|
869
937
|
|
|
@@ -898,6 +966,8 @@ When started with `--port <number>`, the server exposes a single MCP endpoint:
|
|
|
898
966
|
| Request body limit | confirmed | `src/server/bootstrap.ts` — configurable max request size (413 on overflow) |
|
|
899
967
|
| Remote bind guard | confirmed | `src/server/bootstrap.ts` — refuses non-loopback bind without `FILESYSTEM_MCP_API_KEY` |
|
|
900
968
|
|
|
969
|
+
[↑ Back to top](#table-of-contents)
|
|
970
|
+
|
|
901
971
|
## Development
|
|
902
972
|
|
|
903
973
|
- `dev` — `tsc --watch --preserveWatchOutput` — Watch mode TypeScript compilation
|
|
@@ -935,10 +1005,10 @@ When started with `--port <number>`, the server exposes a single MCP endpoint:
|
|
|
935
1005
|
| [diff](https://www.npmjs.com/package/diff) | Unified diff generation and patch application |
|
|
936
1006
|
| [ignore](https://www.npmjs.com/package/ignore) | `.gitignore` pattern matching |
|
|
937
1007
|
| [re2](https://www.npmjs.com/package/re2) | Safe RE2 regex engine (no ReDoS) |
|
|
938
|
-
| [safe-regex2](https://www.npmjs.com/package/safe-regex2) | Regex safety validation |
|
|
939
1008
|
| [zod](https://www.npmjs.com/package/zod) | Schema validation and JSON Schema generation |
|
|
940
1009
|
|
|
941
|
-
##
|
|
1010
|
+
## License
|
|
1011
|
+
|
|
1012
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
942
1013
|
|
|
943
|
-
|
|
944
|
-
- Contributions welcome via pull requests.
|
|
1014
|
+
[↑ Back to top](#table-of-contents)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@j0hanz/filesystem-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"mcpName": "io.github.j0hanz/filesystem-mcp",
|
|
5
5
|
"description": "A local filesystem MCP server that lets LLMs and AI agents read, write, search, diff, patch, and manage files safely and efficiently. Built for reliable, structured, and controlled filesystem interaction.",
|
|
6
6
|
"type": "module",
|