@j0hanz/fs-context-mcp 2.0.3 → 2.0.4

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 CHANGED
@@ -255,7 +255,7 @@ Search for text content within files.
255
255
  - Omit `path` to search from the first allowed root.
256
256
  - Pass a file path in `path` to search only that file.
257
257
 
258
- `pattern` is treated as a literal string.
258
+ `pattern` is treated as a literal string and matched case-insensitively.
259
259
 
260
260
  | Parameter | Type | Required | Default | Description |
261
261
  | --------------- | ------- | -------- | ------------ | ---------------------------------------- |
@@ -272,6 +272,12 @@ Example (search a single file):
272
272
  Returns: Matching lines with file path, line number, content, and optional
273
273
  context.
274
274
 
275
+ Notes:
276
+
277
+ - `grep` skips binary files by default.
278
+ - Very large files are skipped based on `MAX_SEARCH_SIZE` (default 1MB).
279
+ “No matches” is not proof the text is absent from skipped files.
280
+
275
281
  Note: the `grep` tool currently exposes only `path`, `pattern`, and
276
282
  `includeHidden`. Context fields are omitted unless enabled internally.
277
283
 
@@ -1,212 +1,112 @@
1
1
  # FS Context MCP Server
2
2
 
3
- > Read-only tools for exploring directories, searching files, and reading
4
- > content via the Model Context Protocol (MCP).
3
+ Read-only tools for safe filesystem inspection via the Model Context Protocol (MCP).
4
+ This server can only access explicitly allowed “workspace roots” and never writes to disk.
5
5
 
6
- This server lets assistants inspect files safely. All operations are limited to
7
- explicitly allowed directories and never write to disk.
6
+ ---
7
+
8
+ ## TL;DR (Agent Workflow)
9
+
10
+ 1. `roots` → learn what you can access
11
+ 2. `ls` → orient yourself in a directory
12
+ 3. `find` → locate candidate files by glob
13
+ 4. `grep` → find references/content (text search)
14
+ 5. `read` / `read_many` → open the exact files you need
15
+ 6. `stat` / `stat_many` → confirm type/size/mime before reading
8
16
 
9
17
  ---
10
18
 
11
- ## Quick Reference
19
+ ## Key Rules (Avoid Surprises)
12
20
 
13
- | Goal | Tool | Key Parameters |
14
- | ------------------- | ----------- | ------------------------------ |
15
- | Check access | `roots` | - |
16
- | List contents | `ls` | `path` |
17
- | Find files | `find` | `pattern` (glob), `maxResults` |
18
- | Search in files | `grep` | `pattern` |
19
- | Read file | `read` | `head` |
20
- | Read multiple files | `read_many` | `paths[]` - preferred for 2+ |
21
- | File metadata | `stat` | `path` |
22
- | Batch file metadata | `stat_many` | `paths[]` - preferred for 2+ |
21
+ - **Access is root-scoped:** if `roots` returns an empty list, other tools will fail until the client/CLI config provides roots.
22
+ - **Paths must stay within roots:** attempts to escape (e.g., via `..` or symlinks that resolve outside roots) are denied.
23
+ - **`find` is glob search; `grep` is content search:** use `find` to locate files, `grep` to locate text inside files.
24
+ - **Symlink policy:** directory scans do not traverse symlinked directories; direct symlink targets are allowed only if they resolve within roots.
23
25
 
24
26
  ---
25
27
 
26
- ## Core Concepts
28
+ ## Quick Reference
27
29
 
28
- - **Allowed directories:** All tools only operate inside the allowed roots.
29
- Run `roots` first to confirm scope. If nothing is configured and the client
30
- provides no roots, the server starts with no accessible directories and logs
31
- a warning until roots are provided.
32
- - **Globs vs patterns:** `find` uses glob patterns. `grep` treats `pattern` as a
33
- literal string.
34
- - **Symlinks:** Symlinks are never followed for security.
30
+ | Goal | Tool | Notes |
31
+ | ---------------- | ----------- | ------------------------------------------------------------------------------ |
32
+ | Check access | `roots` | Always call first |
33
+ | List a directory | `ls` | Non-recursive; `includeHidden` optional |
34
+ | Find files | `find` | Glob patterns; default excludes common build/deps unless `includeIgnored=true` |
35
+ | Search text | `grep` | Literal, case-insensitive text search; can scan a dir or a single file |
36
+ | Read one file | `read` | UTF-8 text; rejects binary; use `head` to preview |
37
+ | Read many files | `read_many` | Up to 100 paths; may skip files if combined reads exceed budget |
38
+ | File metadata | `stat` | Type, size, modified, permissions, mimeType (extension-based) |
39
+ | Metadata batch | `stat_many` | Prefer for 2+ paths |
35
40
 
36
41
  ---
37
42
 
38
- ## Workflows
43
+ ## Practical Recipes
39
44
 
40
45
  ### Project discovery
41
46
 
42
47
  ```text
43
48
  roots
44
49
  ls(path=".")
45
- read_many(["package.json", "README.md"])
50
+ read_many(paths=["package.json", "README.md"], head=200)
46
51
  ```
47
52
 
48
- ### Find and read code
53
+ ### Locate & open implementation
49
54
 
50
55
  ```text
51
- find(pattern="**/*.ts")
52
- read_many([...results])
56
+ find(pattern="src/**/*.ts", maxResults=2000)
57
+ grep(path="src", pattern="registerTool")
58
+ read(path="src/tools.ts", head=200)
53
59
  ```
54
60
 
55
- ### Search patterns in code
61
+ ### Check before reading (avoid binary/huge files)
56
62
 
57
63
  ```text
58
- grep(pattern="TODO")
64
+ stat(path="docs/logo.png")
65
+ stat_many(paths=["README.md", "dist/index.js"])
59
66
  ```
60
67
 
61
68
  ---
62
69
 
63
- ## Common Glob Patterns
64
-
65
- | Pattern | Matches |
66
- | --------------------- | ----------------------------------------- |
67
- | `**/*.ts` | All TypeScript files |
68
- | `src/**/*.{js,jsx}` | JS/JSX files under `src/` |
69
- | `**/test/**` | All files in any `test/` directory |
70
- | `**/*.test.ts` | Test files by naming convention |
71
- | `!**/node_modules/**` | Exclude `node_modules/` (use in excludes) |
72
-
73
- ---
74
-
75
- ## Best Practices
76
-
77
- **Do:**
78
-
79
- - Use `read_many` for 2+ files (parallel, resilient).
80
- - Set `maxResults` limits on searches for large codebases.
81
- - Preview large files with `head=50` before full reads.
82
-
83
- **Don't:**
84
-
85
- - Loop `read` for multiple files.
86
- - Search without `maxResults` on large codebases.
87
-
88
- ---
89
-
90
- ## Tool Details
70
+ ## Tool Notes (Behavior That Matters)
91
71
 
92
- ### `roots`
72
+ ### `find` (glob)
93
73
 
94
- List all directories this server can access.
74
+ - Uses glob patterns like `**/*.ts` or `src/**/index.*`.
75
+ - Default behavior excludes common directories like `node_modules`, `dist`, `.git`, etc.
76
+ Use `includeIgnored=true` when you explicitly want to search those.
77
+ - Prefer scoping with `path` and limiting with `maxResults` for large repos.
95
78
 
96
- | Parameter | Default | Description |
97
- | --------- | ------- | ----------- |
98
- | (none) | - | - |
79
+ Common patterns:
99
80
 
100
- ---
81
+ - `**/*.ts`
82
+ - `src/**/*.{ts,tsx}`
83
+ - `**/*.test.ts`
101
84
 
102
- ### `ls`
85
+ ### `grep` (text search)
103
86
 
104
- List the immediate contents of a directory (non-recursive). Returns entry name,
105
- relative path, type, size, and modified date. Omit `path` to use the first
106
- allowed root. Symlinks are not followed.
87
+ - Searches for **literal text** (not a user-supplied regex).
88
+ - Matching is **case-insensitive**.
89
+ - By design, it **skips binary files** and **skips very large files** (size limits are configurable by the server environment).
90
+ “No matches” is not proof that a string doesn’t exist in a binary/large file.
107
91
 
108
- | Parameter | Default | Description |
109
- | --------------- | ------- | ------------------------------------ |
110
- | `path` | - | Directory path |
111
- | `includeHidden` | false | Include hidden files and directories |
92
+ ### `read` vs `read_many`
112
93
 
113
- For recursive or filtered file searches, use `find` instead.
94
+ - `read` is safest for text: it enforces size limits and refuses binary.
95
+ - `read_many` is best for efficiency (2+ files), but it does **not** do binary detection.
96
+ If you’re unsure, do `stat_many` first and only read obvious text files.
114
97
 
115
98
  ---
116
99
 
117
- ### `find`
100
+ ## Output & Errors
118
101
 
119
- Find files using glob patterns. Automatically excludes common dependency/build
120
- directories (node_modules, dist, .git, etc.). Omit `path` to use the first
121
- allowed root.
122
-
123
- | Parameter | Default | Description |
124
- | ---------------- | ------- | ------------------------- |
125
- | `path` | - | Base directory |
126
- | `pattern` | - | Glob: `**/*.ts`, `src/**` |
127
- | `includeIgnored` | false | Include ignored dirs |
128
- | `maxResults` | 100 | Limit (up to 10,000) |
129
-
130
- ---
131
-
132
- ### `grep`
133
-
134
- Grep-like search across file contents. `pattern` is treated as a literal string.
135
- Omit `path` to use the first allowed root.
136
-
137
- | Parameter | Default | Description |
138
- | --------------- | ------- | ------------------------------------ |
139
- | `path` | - | Base directory or file path |
140
- | `pattern` | - | Text pattern |
141
- | `includeHidden` | false | Include hidden files and directories |
142
-
143
- Tip: pass a file path to search only that file.
144
-
145
- ---
146
-
147
- ### `read`
148
-
149
- Read a single text file (UTF-8). Binary files are rejected.
150
-
151
- | Parameter | Default | Description |
152
- | --------- | ------- | ------------- |
153
- | `path` | - | File path |
154
- | `head` | - | First N lines |
155
-
156
- ---
157
-
158
- ### `read_many`
159
-
160
- Read multiple files in parallel. Each file reports success or error. Binary
161
- files are not filtered.
162
-
163
- | Parameter | Default | Description |
164
- | --------- | ------- | --------------- |
165
- | `paths` | - | Array (max 100) |
166
- | `head` | - | First N lines |
167
-
168
- ---
169
-
170
- ### `stat`
171
-
172
- Get metadata about a file or directory without reading contents.
173
-
174
- | Parameter | Default | Description |
175
- | --------- | ------- | ------------------------- |
176
- | `path` | - | Path to file or directory |
177
-
178
- Returns: name, path, type, size, modified, mimeType, symlinkTarget.
179
-
180
- ---
181
-
182
- ### `stat_many`
183
-
184
- Get metadata for multiple files/directories in parallel.
185
-
186
- | Parameter | Default | Description |
187
- | --------- | ------- | ------------------------ |
188
- | `paths` | - | Array of paths (max 100) |
189
-
190
- ---
191
-
192
- ## Error Codes
193
-
194
- | Code | Cause | Solution |
195
- | --------------------- | ---------------------------- | ---------------------- |
196
- | `E_ACCESS_DENIED` | Path outside allowed dirs | Check `roots` |
197
- | `E_NOT_FOUND` | Path does not exist | Verify path with `ls` |
198
- | `E_NOT_FILE` | Expected file, got directory | Use `ls` instead |
199
- | `E_NOT_DIRECTORY` | Expected directory, got file | Use `read` instead |
200
- | `E_TOO_LARGE` | File exceeds size limit | Use `head` for partial |
201
- | `E_TIMEOUT` | Operation took too long | Use `maxResults` |
202
- | `E_INVALID_PATTERN` | Malformed glob/regex | Check pattern syntax |
203
- | `E_PERMISSION_DENIED` | OS-level access denied | Check file permissions |
204
-
205
- ---
102
+ - Each tool returns structured data with `ok: true|false`.
103
+ - On failure you’ll get `ok: false` with an `error` object containing at least `code` and `message` (often `path` and a `suggestion`).
206
104
 
207
- ## Security
105
+ Common error codes:
208
106
 
209
- - Read-only: no writes, deletes, or modifications.
210
- - Path validation: symlinks cannot escape allowed directories.
211
- - Binary detection: prevents accidental binary reads.
212
- - Input sanitization: patterns validated for ReDoS protection.
107
+ - `E_ACCESS_DENIED` (outside allowed roots)
108
+ - `E_NOT_FOUND`, `E_NOT_FILE`, `E_NOT_DIRECTORY`
109
+ - `E_TOO_LARGE` (use `head`)
110
+ - `E_INVALID_PATTERN` (glob pattern issues in `find`)
111
+ - `E_TIMEOUT` (narrow scope, reduce results)
112
+ - `E_PERMISSION_DENIED`
@@ -51,12 +51,12 @@ export class McpError extends Error {
51
51
  }
52
52
  }
53
53
  const ERROR_SUGGESTIONS = {
54
- [ErrorCode.E_ACCESS_DENIED]: 'Check that the path is within an allowed directory. Use list_allowed_directories to see available paths.',
55
- [ErrorCode.E_NOT_FOUND]: 'Verify the path exists. Use list_directory to explore available files and directories.',
56
- [ErrorCode.E_NOT_FILE]: 'The path points to a directory or other non-file. Use list_directory to explore its contents.',
57
- [ErrorCode.E_NOT_DIRECTORY]: 'The path points to a file, not a directory. Use read_file to read file contents.',
58
- [ErrorCode.E_TOO_LARGE]: 'The file exceeds the size limit. Use head or tail parameters to read partial content, or increase maxSize.',
59
- [ErrorCode.E_TIMEOUT]: 'The operation timed out. Try with a smaller scope, fewer files, or increase timeoutMs.',
54
+ [ErrorCode.E_ACCESS_DENIED]: 'Check that the path is within an allowed directory. Use roots to see available workspace roots.',
55
+ [ErrorCode.E_NOT_FOUND]: 'Verify the path exists. Use ls to explore available files and directories.',
56
+ [ErrorCode.E_NOT_FILE]: 'The path points to a directory or other non-file. Use ls to explore its contents.',
57
+ [ErrorCode.E_NOT_DIRECTORY]: 'The path points to a file, not a directory. Use read to read file contents.',
58
+ [ErrorCode.E_TOO_LARGE]: 'The file exceeds the size limit. Use head to read a partial preview, or narrow the scope of what you read.',
59
+ [ErrorCode.E_TIMEOUT]: 'The operation timed out. Try a smaller scope (narrower path), fewer results (maxResults), or search fewer files.',
60
60
  [ErrorCode.E_INVALID_PATTERN]: 'The glob or regex pattern is invalid. Check syntax and escape special characters.',
61
61
  [ErrorCode.E_INVALID_INPUT]: 'One or more input parameters are invalid. Check the tool documentation for correct usage.',
62
62
  [ErrorCode.E_PERMISSION_DENIED]: 'Permission denied by the operating system. Check file permissions.',
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,CAAC;AAUrB,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACrC,MAAM,EAAE,IAAI,EAAE,GAAG,KAA2B,CAAC;IAC7C,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC;AAClC,CAAC;AAED,MAAM,mBAAmB,GAAG;IAC1B,MAAM,EAAE,SAAS,CAAC,WAAW;IAC7B,MAAM,EAAE,SAAS,CAAC,mBAAmB;IACrC,KAAK,EAAE,SAAS,CAAC,mBAAmB;IACpC,OAAO,EAAE,SAAS,CAAC,eAAe;IAClC,MAAM,EAAE,SAAS,CAAC,UAAU;IAC5B,KAAK,EAAE,SAAS,CAAC,qBAAqB;IACtC,YAAY,EAAE,SAAS,CAAC,eAAe;IACvC,SAAS,EAAE,SAAS,CAAC,SAAS;IAC9B,MAAM,EAAE,SAAS,CAAC,SAAS;IAC3B,MAAM,EAAE,SAAS,CAAC,SAAS;IAC3B,KAAK,EAAE,SAAS,CAAC,mBAAmB;IACpC,SAAS,EAAE,SAAS,CAAC,eAAe;IACpC,MAAM,EAAE,SAAS,CAAC,eAAe;IACjC,MAAM,EAAE,SAAS,CAAC,eAAe;CACqB,CAAC;AAIzD,SAAS,oBAAoB,CAAC,IAAY;IACxC,OAAO,IAAI,IAAI,mBAAmB,CAAC;AACrC,CAAC;AAED,SAAS,gBAAgB,CAAC,IAA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AC,OAAO,EAAE,CAAC,CAAC;IAEpE,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QACrB,KAAK,CAAC,IAAI,CAAC,eAAe,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAe;IAC3C,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j0hanz/fs-context-mcp",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "mcpName": "io.github.j0hanz/fs-context",
5
5
  "description": "🔍 Read-only MCP server for secure filesystem exploration, searching, and analysis",
6
6
  "type": "module",