everything-mcp-server 0.0.0-stage → 0.2.0
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 +262 -2
- package/README.zh-CN.md +263 -0
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/examples/c-drive-folders.json +11 -0
- package/examples/c-drive-largest.json +15 -0
- package/package.json +51 -4
- package/src/agent.js +92 -0
- package/src/cli.js +37 -0
- package/src/compact.js +64 -0
- package/src/discovery.js +47 -0
- package/src/everything.js +166 -0
- package/src/ipc.js +82 -0
- package/src/process.js +22 -0
- package/src/schema.js +92 -0
- package/src/server.js +41 -0
- package/src/validation.js +42 -0
- package/vendor/es/ARM/es.exe +0 -0
- package/vendor/es/ARM64/es.exe +0 -0
- package/vendor/es/LICENSE +21 -0
- package/vendor/es/manifest.json +26 -0
- package/vendor/es/x64/es.exe +0 -0
- package/vendor/es/x86/es.exe +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Everything Search MCP contributors
|
|
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
|
@@ -1,3 +1,263 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Everything Search MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Search Windows files from your AI assistant using [Everything](https://www.voidtools.com/).
|
|
6
|
+
|
|
7
|
+
Find files across indexed drives by name, path, type, size, or date. Browse folders, compare their sizes, and get counts or total file sizes in a single request. Searches use Everything's existing index, with paginated results and optional metadata.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- **OS**: Windows (x64, x86, ARM64, ARM)
|
|
12
|
+
- **Node.js**: v22.0.0 or newer
|
|
13
|
+
- **Everything**: [Everything](https://www.voidtools.com/) 1.4.1+ or 1.5 Alpha installed and running.
|
|
14
|
+
|
|
15
|
+
The ES helper is included. The server automatically checks the default Everything instance, `1.5a`, and `1.5` and connects through local IPC.
|
|
16
|
+
|
|
17
|
+
## Installation & Configuration
|
|
18
|
+
|
|
19
|
+
On Windows, launch `npx` through `cmd.exe` as shown below. Choose your client, add the configuration, then reload its MCP connections. (DeepSeek Harness is the exception: it spawns the command directly, so plain `npx` works — see its section below.)
|
|
20
|
+
|
|
21
|
+
[](https://cursor.com/install-mcp?name=everything&config=eyJjb21tYW5kIjoiY21kLmV4ZSIsImFyZ3MiOlsiL2QiLCIvYyIsIm5weCIsIi15IiwiZXZlcnl0aGluZy1tY3Atc2VydmVyIl19)
|
|
22
|
+
|
|
23
|
+
<details>
|
|
24
|
+
<summary>OpenAI Codex</summary>
|
|
25
|
+
|
|
26
|
+
Add to your Codex configuration file (`%USERPROFILE%/.codex/config.toml` or project-level `.codex/config.toml`):
|
|
27
|
+
|
|
28
|
+
```toml
|
|
29
|
+
[mcp_servers.everything]
|
|
30
|
+
command = "cmd.exe"
|
|
31
|
+
args = ["/d", "/c", "npx", "-y", "everything-mcp-server"]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or add via Codex CLI:
|
|
35
|
+
|
|
36
|
+
```powershell
|
|
37
|
+
codex mcp add everything -- cmd.exe /d /c npx -y everything-mcp-server
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
</details>
|
|
41
|
+
|
|
42
|
+
<details>
|
|
43
|
+
<summary>OpenCode</summary>
|
|
44
|
+
|
|
45
|
+
Add to your project's `opencode.json`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"$schema": "https://opencode.ai/config.json",
|
|
50
|
+
"mcp": {
|
|
51
|
+
"everything": {
|
|
52
|
+
"type": "local",
|
|
53
|
+
"command": ["cmd.exe", "/d", "/c", "npx", "-y", "everything-mcp-server"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Or run the OpenCode setup wizard and enter the command above:
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
opencode mcp add
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
</details>
|
|
66
|
+
|
|
67
|
+
<details>
|
|
68
|
+
<summary>DeepSeek Harness</summary>
|
|
69
|
+
|
|
70
|
+
Install the plugin, then restart the profile:
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
dsh plugin --profile <profile> add dsh-everything-mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Or install straight from this repository:
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
dsh plugin --profile <profile> add github:EcRal5t/everything-search-mcp#path:/plugins/dsh-everything-mcp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The tools appear as `mcp__everything__search` and `mcp__everything__status`. To wire it by hand instead, add this row to the profile's `cordis.patch.yml`:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
- insert:
|
|
86
|
+
- id: mcp-everything
|
|
87
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
88
|
+
config:
|
|
89
|
+
serverName: everything
|
|
90
|
+
transport: stdio
|
|
91
|
+
command: npx
|
|
92
|
+
args: ['-y', 'everything-mcp-server']
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
DSH spawns commands directly, so no `cmd.exe` wrapper is needed. See [`plugins/dsh-everything-mcp`](plugins/dsh-everything-mcp) for the bundle itself.
|
|
96
|
+
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
<details>
|
|
100
|
+
<summary>Claude Desktop and other MCP clients</summary>
|
|
101
|
+
|
|
102
|
+
Add to your MCP client configuration (e.g. `claude_desktop_config.json`):
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mcpServers": {
|
|
107
|
+
"everything": {
|
|
108
|
+
"command": "cmd.exe",
|
|
109
|
+
"args": ["/d", "/c", "npx", "-y", "everything-mcp-server"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
VS Code uses `servers` as the top-level key.
|
|
116
|
+
|
|
117
|
+
</details>
|
|
118
|
+
|
|
119
|
+
## What to ask
|
|
120
|
+
|
|
121
|
+
After connecting, ask your assistant to use Everything for tasks such as:
|
|
122
|
+
|
|
123
|
+
- **Locate a missing file:** “Find quarterly-report PDFs modified last month across my indexed drives.”
|
|
124
|
+
- **Investigate large files:** “Show the ten largest log files or archives over 1 GB on C:, including their paths and sizes.”
|
|
125
|
+
- **Find project artifacts:** “Find folders named node_modules or target under D:/Projects and tell me how many there are.”
|
|
126
|
+
- **Compare folder sizes:** “Compare the sizes of the folders directly inside D:/Projects.”
|
|
127
|
+
|
|
128
|
+
## Tools
|
|
129
|
+
|
|
130
|
+
Both tools are read-only.
|
|
131
|
+
|
|
132
|
+
| Tool | Purpose |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| `search` | Find paths, browse folders, count matches, and retrieve sizes or other indexed metadata. |
|
|
135
|
+
| `status` | Check the connection, selected Everything instance, and version. |
|
|
136
|
+
|
|
137
|
+
## Connection settings
|
|
138
|
+
|
|
139
|
+
Default settings cover common local installations. Use `EVERYTHING_INSTANCE` for a custom instance name. Setting `EVERYTHING_URL` selects an Everything HTTP service; credentials go in `EVERYTHING_USERNAME` and `EVERYTHING_PASSWORD` when needed.
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary>All environment variables</summary>
|
|
143
|
+
|
|
144
|
+
| Variable | Default | Description |
|
|
145
|
+
| --- | --- | --- |
|
|
146
|
+
| `EVERYTHING_INSTANCE` | auto-detect | Probes the default instance, `1.5a`, and `1.5`. Set this for a custom instance; `""` selects the default instance. |
|
|
147
|
+
| `EVERYTHING_URL` | `""` | Everything HTTP server URL (e.g. `http://127.0.0.1:17603/`). When set, uses HTTP transport instead of IPC. |
|
|
148
|
+
| `EVERYTHING_USERNAME` | `""` | Basic auth username for HTTP server. |
|
|
149
|
+
| `EVERYTHING_PASSWORD` | `""` | Basic auth password for HTTP server. |
|
|
150
|
+
| `EVERYTHING_MAX_RESULTS` | `1000` | Row cap for each query and the whole batch (1–1000). |
|
|
151
|
+
| `EVERYTHING_OUTPUT_BYTES` | `16384` | Maximum output size budget per tool call (4096–65536). |
|
|
152
|
+
| `EVERYTHING_TIMEOUT_MS` | `15000` | Query timeout in milliseconds (100–120000). |
|
|
153
|
+
| `EVERYTHING_ES_PATH` | bundled | Custom path to `es.exe`. |
|
|
154
|
+
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
## CLI & Diagnostics
|
|
158
|
+
|
|
159
|
+
Test your Everything installation and backend connection:
|
|
160
|
+
|
|
161
|
+
```powershell
|
|
162
|
+
npx -y everything-mcp-server doctor
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Run queries from the command line:
|
|
166
|
+
|
|
167
|
+
```powershell
|
|
168
|
+
npx -y everything-mcp-server search '{"requests": [{"query": "ext:pdf", "count": 5}]}'
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Tool reference
|
|
174
|
+
|
|
175
|
+
<details>
|
|
176
|
+
<summary>Parameters and result format</summary>
|
|
177
|
+
|
|
178
|
+
### `search`
|
|
179
|
+
|
|
180
|
+
Search, browse directories, count items, and retrieve indexed metadata.
|
|
181
|
+
|
|
182
|
+
Pass 1–8 queries in the required `requests` array:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{"requests": [{"query": "ext:pdf", "count": 5}]}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Parameters for each query:**
|
|
189
|
+
|
|
190
|
+
| Parameter | Type | Default | Description |
|
|
191
|
+
| --- | --- | --- | --- |
|
|
192
|
+
| `query` | string | `""` | Everything search query (e.g. `*.pdf`, `size:>100mb`, `ext:ts;js`). |
|
|
193
|
+
| `root` | string | optional | Directory to search within (e.g. `D:/Projects`). Omitted for global search. |
|
|
194
|
+
| `recursive` | boolean | `true` | When `root` is set: `true` searches descendants; `false` lists direct children. |
|
|
195
|
+
| `kind` | string | `"any"` | Filter entry type: `"any"`, `"file"`, or `"folder"`. |
|
|
196
|
+
| `regex` | boolean | `false` | Treat `query` as a regular expression. |
|
|
197
|
+
| `count` | number | `20` | Maximum rows to return (max 1000). Use `0` to count matches; add `kind:"file"` and `fields:["size"]` to get `total_size_bytes`. |
|
|
198
|
+
| `offset` | number | `0` | Zero-based pagination offset. |
|
|
199
|
+
| `sort` | string | `"path"` | Sort field: `path`, `name`, `size`, `extension`, `date_modified`, `date_created`, `date_accessed`, `attributes`, `run_count`. |
|
|
200
|
+
| `ascending` | boolean | `true` | Sort ascending (`true`) or descending (`false`). |
|
|
201
|
+
| `fields` | string[] | `[]` | Additional columns: `size`, `date_modified`, `date_created`, `date_accessed`, `attributes`, `run_count`. |
|
|
202
|
+
|
|
203
|
+
IPC provides all listed fields and sorts. HTTP sorts by name, path, size, or modified time; it provides size and modified-time fields, with other metadata depending on the service.
|
|
204
|
+
|
|
205
|
+
**Output Format:**
|
|
206
|
+
|
|
207
|
+
Results label columns once, followed by row arrays:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"results": [
|
|
212
|
+
{
|
|
213
|
+
"base": "D:/Projects",
|
|
214
|
+
"total": 42,
|
|
215
|
+
"next_offset": 2,
|
|
216
|
+
"columns": ["path", "type", "size_bytes"],
|
|
217
|
+
"rows": [
|
|
218
|
+
["src/index.ts", "file", 1024],
|
|
219
|
+
["package.json", "file", 512]
|
|
220
|
+
],
|
|
221
|
+
"size_basis": "indexed_logical"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
Combine `base` with relative paths in `rows` to obtain full file paths.
|
|
227
|
+
File and folder sizes use logical byte counts from Everything's index.
|
|
228
|
+
|
|
229
|
+
### `status`
|
|
230
|
+
|
|
231
|
+
Check backend connectivity, Everything version, selected instance, and index status.
|
|
232
|
+
|
|
233
|
+
**Parameters:**
|
|
234
|
+
|
|
235
|
+
- `verbose` (boolean, default `false`): Include total indexed items and limits.
|
|
236
|
+
|
|
237
|
+
</details>
|
|
238
|
+
|
|
239
|
+
## Local Development
|
|
240
|
+
|
|
241
|
+
```powershell
|
|
242
|
+
git clone https://github.com/EcRal5t/everything-search-mcp.git
|
|
243
|
+
cd everything-search-mcp
|
|
244
|
+
npm install
|
|
245
|
+
npm test
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
To configure an MCP client with a local checkout:
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"mcpServers": {
|
|
253
|
+
"everything": {
|
|
254
|
+
"command": "node",
|
|
255
|
+
"args": ["D:/path/to/everything-search-mcp/src/cli.js"]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
MIT. Bundled `es.exe` is also MIT licensed by voidtools. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# Everything Search MCP
|
|
2
|
+
|
|
3
|
+
[English](README.md)
|
|
4
|
+
|
|
5
|
+
让 AI 助手通过 [Everything](https://www.voidtools.com/) 查找 Windows 上的文件。
|
|
6
|
+
|
|
7
|
+
按名称、路径、类型、大小或日期搜索各个已索引的驱动器,也能浏览目录、比较文件夹大小,或一次取得匹配数量和文件总大小。搜索使用 Everything 已有的索引,结果支持分页,并可按需附带文件信息。
|
|
8
|
+
|
|
9
|
+
## 环境要求
|
|
10
|
+
|
|
11
|
+
- **操作系统**:Windows (x64, x86, ARM64, ARM)
|
|
12
|
+
- **Node.js**:v22.0.0 或更新版本
|
|
13
|
+
- **Everything**:已安装并运行 [Everything](https://www.voidtools.com/) 1.4.1+ 或 1.5 Alpha。
|
|
14
|
+
|
|
15
|
+
包内已附带 ES 工具。服务会自动探测默认实例、`1.5a` 和 `1.5`,通过本机 IPC 连接。
|
|
16
|
+
|
|
17
|
+
## 安装与配置
|
|
18
|
+
|
|
19
|
+
Windows 下按以下示例,通过 `cmd.exe` 启动 `npx`。选择对应客户端,添加配置后重新加载 MCP 连接。(DeepSeek Harness 例外:它直接 spawn 命令,用裸 `npx` 即可,见下方小节。)
|
|
20
|
+
|
|
21
|
+
[](https://cursor.com/install-mcp?name=everything&config=eyJjb21tYW5kIjoiY21kLmV4ZSIsImFyZ3MiOlsiL2QiLCIvYyIsIm5weCIsIi15IiwiZXZlcnl0aGluZy1tY3Atc2VydmVyIl19)
|
|
22
|
+
|
|
23
|
+
<details>
|
|
24
|
+
<summary>OpenAI Codex</summary>
|
|
25
|
+
|
|
26
|
+
在 Codex 配置文件(用户全局 `%USERPROFILE%/.codex/config.toml` 或项目 `.codex/config.toml`)中添加:
|
|
27
|
+
|
|
28
|
+
```toml
|
|
29
|
+
[mcp_servers.everything]
|
|
30
|
+
command = "cmd.exe"
|
|
31
|
+
args = ["/d", "/c", "npx", "-y", "everything-mcp-server"]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
或通过 Codex CLI 命令行添加:
|
|
35
|
+
|
|
36
|
+
```powershell
|
|
37
|
+
codex mcp add everything -- cmd.exe /d /c npx -y everything-mcp-server
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
</details>
|
|
41
|
+
|
|
42
|
+
<details>
|
|
43
|
+
<summary>OpenCode</summary>
|
|
44
|
+
|
|
45
|
+
在项目的 `opencode.json` 中添加:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"$schema": "https://opencode.ai/config.json",
|
|
50
|
+
"mcp": {
|
|
51
|
+
"everything": {
|
|
52
|
+
"type": "local",
|
|
53
|
+
"command": ["cmd.exe", "/d", "/c", "npx", "-y", "everything-mcp-server"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
也可运行 OpenCode 设置向导,填写上面的命令:
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
opencode mcp add
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
</details>
|
|
66
|
+
|
|
67
|
+
<details>
|
|
68
|
+
<summary>DeepSeek Harness</summary>
|
|
69
|
+
|
|
70
|
+
安装插件后重启该 profile:
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
dsh plugin --profile <profile> add dsh-everything-mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
也可以直接从仓库安装:
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
dsh plugin --profile <profile> add github:EcRal5t/everything-search-mcp#path:/plugins/dsh-everything-mcp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
工具以 `mcp__everything__search` 和 `mcp__everything__status` 出现。也可以手工在 profile 的 `cordis.patch.yml` 里加:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
- insert:
|
|
86
|
+
- id: mcp-everything
|
|
87
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
88
|
+
config:
|
|
89
|
+
serverName: everything
|
|
90
|
+
transport: stdio
|
|
91
|
+
command: npx
|
|
92
|
+
args: ['-y', 'everything-mcp-server']
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
DSH 直接 spawn 命令,不需要 `cmd.exe` 包装。配置包本身见 [`plugins/dsh-everything-mcp`](plugins/dsh-everything-mcp)。
|
|
96
|
+
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
<details>
|
|
100
|
+
<summary>Claude Desktop 及其他 MCP 客户端</summary>
|
|
101
|
+
|
|
102
|
+
在客户端配置(例如 `claude_desktop_config.json`)中添加:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mcpServers": {
|
|
107
|
+
"everything": {
|
|
108
|
+
"command": "cmd.exe",
|
|
109
|
+
"args": ["/d", "/c", "npx", "-y", "everything-mcp-server"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
VS Code 的顶层字段使用 `servers`。
|
|
116
|
+
|
|
117
|
+
</details>
|
|
118
|
+
|
|
119
|
+
## 使用示例
|
|
120
|
+
|
|
121
|
+
连接后,可以让助手使用 Everything 完成这些任务:
|
|
122
|
+
|
|
123
|
+
- **找回文件**:“在各个已索引的驱动器上,找出上个月修改过、文件名包含 quarterly-report 的 PDF。”
|
|
124
|
+
- **排查大文件**:“列出 C 盘超过 1 GB 的日志和压缩包中最大的十个,附上路径和大小。”
|
|
125
|
+
- **查找工程产物**:“查找 D:/Projects 下名为 node_modules 或 target 的文件夹,并统计数量。”
|
|
126
|
+
- **比较目录大小**:“比较 D:/Projects 下各个直接子文件夹的大小。”
|
|
127
|
+
|
|
128
|
+
## 工具
|
|
129
|
+
|
|
130
|
+
两个工具均为只读。
|
|
131
|
+
|
|
132
|
+
| 工具 | 用途 |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| `search` | 查找路径、浏览目录、统计数量,以及取得大小或其他索引元数据。 |
|
|
135
|
+
| `status` | 查看连接状态、所选 Everything 实例和版本。 |
|
|
136
|
+
|
|
137
|
+
## 连接设置
|
|
138
|
+
|
|
139
|
+
常见本机安装使用默认设置即可。自定义实例通过 `EVERYTHING_INSTANCE` 指定;设置 `EVERYTHING_URL` 后会连接指定的 Everything HTTP 服务。需要认证时,使用 `EVERYTHING_USERNAME` 和 `EVERYTHING_PASSWORD` 提供账号密码。
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary>全部环境变量</summary>
|
|
143
|
+
|
|
144
|
+
| 环境变量 | 默认值 | 说明 |
|
|
145
|
+
| --- | --- | --- |
|
|
146
|
+
| `EVERYTHING_INSTANCE` | 自动探测 | 自动探测默认实例、`1.5a` 和 `1.5`。自定义实例通过此项指定;`""` 选择默认实例。 |
|
|
147
|
+
| `EVERYTHING_URL` | `""` | Everything HTTP 服务地址(例如 `http://127.0.0.1:17603/`)。设置后优先使用 HTTP 通道。 |
|
|
148
|
+
| `EVERYTHING_USERNAME` | `""` | HTTP 服务的基础认证用户名。 |
|
|
149
|
+
| `EVERYTHING_PASSWORD` | `""` | HTTP 服务的基础认证密码。 |
|
|
150
|
+
| `EVERYTHING_MAX_RESULTS` | `1000` | 每项查询及整批查询的总行数上限(1–1000)。 |
|
|
151
|
+
| `EVERYTHING_OUTPUT_BYTES` | `16384` | 单次工具调用的输出字节上限预算(4096–65536)。 |
|
|
152
|
+
| `EVERYTHING_TIMEOUT_MS` | `15000` | 查询超时毫秒数(100–120000)。 |
|
|
153
|
+
| `EVERYTHING_ES_PATH` | 内置路径 | 自定义 `es.exe` 可执行文件路径。 |
|
|
154
|
+
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
## 命令行与连接诊断
|
|
158
|
+
|
|
159
|
+
检查当前环境中的 Everything 连接状态:
|
|
160
|
+
|
|
161
|
+
```powershell
|
|
162
|
+
npx -y everything-mcp-server doctor
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
直接在命令行运行查询:
|
|
166
|
+
|
|
167
|
+
```powershell
|
|
168
|
+
npx -y everything-mcp-server search '{"requests": [{"query": "ext:pdf", "count": 5}]}'
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 工具参考
|
|
174
|
+
|
|
175
|
+
<details>
|
|
176
|
+
<summary>参数与结果格式</summary>
|
|
177
|
+
|
|
178
|
+
### `search`
|
|
179
|
+
|
|
180
|
+
搜索文件/目录、浏览文件夹、统计数量及获取元数据。
|
|
181
|
+
|
|
182
|
+
通过必填的 `requests` 数组提交 1–8 项查询:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{"requests": [{"query": "ext:pdf", "count": 5}]}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**每项查询的参数:**
|
|
189
|
+
|
|
190
|
+
| 参数名 | 类型 | 默认值 | 说明 |
|
|
191
|
+
| --- | --- | --- | --- |
|
|
192
|
+
| `query` | string | `""` | Everything 查询语句(如 `*.pdf`、`size:>100mb`、`ext:ts;js`)。 |
|
|
193
|
+
| `root` | string | 可选 | 检索根目录绝对路径(如 `D:/Projects`)。省略则检索所有已索引驱动器。 |
|
|
194
|
+
| `recursive` | boolean | `true` | 指定 `root` 时生效:`true` 搜索所有子孙项;`false` 仅列出直接子项。 |
|
|
195
|
+
| `kind` | string | `"any"` | 筛选类型:`"any"`、`"file"` 或 `"folder"`。 |
|
|
196
|
+
| `regex` | boolean | `false` | 将 `query` 作为正则表达式处理。 |
|
|
197
|
+
| `count` | number | `20` | 最大返回行数(上限 1000)。设为 `0` 可统计数量;配合 `kind:"file"` 和 `fields:["size"]` 可取得总字节数 `total_size_bytes`。 |
|
|
198
|
+
| `offset` | number | `0` | 分页偏移量(基于 0)。 |
|
|
199
|
+
| `sort` | string | `"path"` | 排序字段:`path`、`name`、`size`、`extension`、`date_modified`、`date_created`、`date_accessed`、`attributes`、`run_count`。 |
|
|
200
|
+
| `ascending` | boolean | `true` | 是否升序(`true` 为升序,`false` 为降序)。 |
|
|
201
|
+
| `fields` | string[] | `[]` | 额外获取的元数据列:`size`、`date_modified`、`date_created`、`date_accessed`、`attributes`、`run_count`。 |
|
|
202
|
+
|
|
203
|
+
IPC 提供上述全部字段与排序。HTTP 支持按名称、路径、大小和修改时间排序,提供大小和修改时间字段,其他元数据取决于所选服务。
|
|
204
|
+
|
|
205
|
+
**输出格式:**
|
|
206
|
+
|
|
207
|
+
输出先列出列名,再逐行返回数据:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"results": [
|
|
212
|
+
{
|
|
213
|
+
"base": "D:/Projects",
|
|
214
|
+
"total": 42,
|
|
215
|
+
"next_offset": 2,
|
|
216
|
+
"columns": ["path", "type", "size_bytes"],
|
|
217
|
+
"rows": [
|
|
218
|
+
["src/index.ts", "file", 1024],
|
|
219
|
+
["package.json", "file", 512]
|
|
220
|
+
],
|
|
221
|
+
"size_basis": "indexed_logical"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
将 `base` 与 `rows` 中的相对路径拼接即可得到完整路径。
|
|
227
|
+
文件与文件夹大小采用 Everything 索引中的逻辑字节数。
|
|
228
|
+
|
|
229
|
+
### `status`
|
|
230
|
+
|
|
231
|
+
检查 Everything 连接状态、运行实例、版本及索引就绪情况。
|
|
232
|
+
|
|
233
|
+
**参数说明:**
|
|
234
|
+
|
|
235
|
+
- `verbose`(boolean,默认 `false`):包含已索引条目总数与当前限制配置。
|
|
236
|
+
|
|
237
|
+
</details>
|
|
238
|
+
|
|
239
|
+
## 本地开发
|
|
240
|
+
|
|
241
|
+
```powershell
|
|
242
|
+
git clone https://github.com/EcRal5t/everything-search-mcp.git
|
|
243
|
+
cd everything-search-mcp
|
|
244
|
+
npm install
|
|
245
|
+
npm test
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
使用本地源码配置 MCP 客户端:
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"mcpServers": {
|
|
253
|
+
"everything": {
|
|
254
|
+
"command": "node",
|
|
255
|
+
"args": ["D:/path/to/everything-search-mcp/src/cli.js"]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## 许可证
|
|
262
|
+
|
|
263
|
+
MIT 许可证。内置的 `es.exe` 工具同样由 voidtools 采用 MIT 许可证分发。详情参见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Third party notices
|
|
2
|
+
|
|
3
|
+
The package bundles unmodified ES 1.1.0.38 executables for Windows x64, x86, ARM64 and ARM from voidtools.
|
|
4
|
+
|
|
5
|
+
- Source: https://github.com/voidtools/ES/tree/1.1.0.38
|
|
6
|
+
- License: MIT, preserved in vendor/es/LICENSE.
|
|
7
|
+
- Download URLs and SHA-256 hashes: vendor/es/manifest.json. These hashes identify the downloaded artifacts; they are not upstream signatures.
|
|
8
|
+
|
|
9
|
+
Everything itself is not bundled. It must be installed and its client must be running. This project is independent of voidtools.
|
package/package.json
CHANGED
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "everything-mcp-server",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Fast Windows file search MCP server powered by Everything",
|
|
6
|
+
"mcpName": "io.github.EcRal5t/everything-search-mcp",
|
|
7
|
+
"author": "EcRal5t",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/EcRal5t/everything-search-mcp.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/EcRal5t/everything-search-mcp#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/EcRal5t/everything-search-mcp/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"everything",
|
|
19
|
+
"file-search",
|
|
20
|
+
"windows",
|
|
21
|
+
"voidtools"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"registry": "https://registry.npmjs.org/",
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=22"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"start": "node src/server.js",
|
|
32
|
+
"cli": "node src/cli.js",
|
|
33
|
+
"test": "node --test test/*.test.js",
|
|
34
|
+
"test:live": "node scripts/verify-live.js"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
38
|
+
"zod": "4.6.7"
|
|
39
|
+
},
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"bin": {
|
|
42
|
+
"everything-mcp-server": "src/cli.js"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"src/",
|
|
46
|
+
"vendor/es/",
|
|
47
|
+
"README.md",
|
|
48
|
+
"README.zh-CN.md",
|
|
49
|
+
"LICENSE",
|
|
50
|
+
"THIRD_PARTY_NOTICES.md",
|
|
51
|
+
"examples/"
|
|
52
|
+
]
|
|
53
|
+
}
|