easy-local-mcp 0.3.9

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 daodao97
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 ADDED
@@ -0,0 +1,417 @@
1
+ <p align="center">
2
+ <img src="easy-local-mcp.png" width="180" alt="Easy Local MCP icon">
3
+ </p>
4
+
5
+ <h1 align="center">Easy Local MCP</h1>
6
+
7
+ <p align="center">
8
+ 让 ChatGPT 通过 <strong>MCP (Model Context Protocol)</strong> 安全地使用你的本机文件、Shell、进程、Skills 与外部 MCP Server。
9
+ </p>
10
+
11
+ ## 项目说明
12
+
13
+ **Easy Local MCP** 是基于 [daodao97/localmcp](https://github.com/daodao97/localmcp) 演进的独立分支。
14
+
15
+ 原项目提供了 Local MCP / Cloudflare Relay 的基础实现,本项目在此基础上重点增强:
16
+
17
+ - Windows 桌面客户端与系统托盘
18
+ - 本地 Control Center
19
+ - 更严格的默认权限与 LOCK / UNLOCK
20
+ - 文件读写删除权限拆分
21
+ - Shell / Process / External MCP feature gates
22
+ - 本地 authenticated IPC
23
+ - 首次启动 Relay 配置向导
24
+ - Windows 后台进程隐藏控制台窗口
25
+ - Tauri + NSIS 独立安装包
26
+ - 内置 Node runtime,目标 PC 不需要安装 Node 或 Rust
27
+ - 审计日志、凭证轮换与 Worker 注册保护
28
+
29
+ 本项目不再以向上游合并为目标,后续会以 **Easy Local MCP** 独立维护。
30
+
31
+ > Easy Local MCP 仍遵循原项目的 MIT License,并保留原项目来源与版权信息。
32
+
33
+ ## 为什么叫 Easy Local MCP
34
+
35
+ 目标很简单:
36
+
37
+ > **让安装、配置、连接 ChatGPT 和管理本机 MCP 权限变得尽量简单。**
38
+
39
+ MCP 是 **Model Context Protocol** 的缩写,因此项目名称中统一写作全大写 **MCP**。
40
+
41
+ ## 功能
42
+
43
+ Easy Local MCP 可以把以下本机能力安全地暴露给 MCP 客户端:
44
+
45
+ - 文件浏览、搜索与读取
46
+ - 文件创建、修改、移动与删除
47
+ - Shell 命令
48
+ - 持久进程
49
+ - Skills
50
+ - 多 Workspace
51
+ - 外部 MCP Server
52
+ - 本地 Control Center
53
+ - Agent Start / Stop / Restart
54
+ - LOCK / UNLOCK
55
+ - MCP URL reveal / credential rotation
56
+ - Relay / Worker 切换
57
+ - Audit history
58
+
59
+ 危险能力默认不会全部开放。
60
+
61
+ Agent 启动后默认处于:
62
+
63
+ ```text
64
+ LOCKED
65
+ ```
66
+
67
+ 即使配置允许 Shell / 写文件 / Process,仍需要在本机明确 Unlock 后才能调用。
68
+
69
+ ---
70
+
71
+ ## Windows 安装
72
+
73
+ ### 推荐:安装桌面版
74
+
75
+ 构建后的安装包位于:
76
+
77
+ ```text
78
+ src-tauri/target/release/bundle/nsis/
79
+ ```
80
+
81
+ 文件名类似:
82
+
83
+ ```text
84
+ Easy Local MCP_0.3.9_x64-setup.exe
85
+ ```
86
+
87
+ 安装后直接启动:
88
+
89
+ ```text
90
+ Easy Local MCP
91
+ ```
92
+
93
+ 桌面版已经内置:
94
+
95
+ - Tauri native shell
96
+ - Node runtime
97
+ - Easy Local MCP compiled app
98
+ - production dependencies
99
+
100
+ 因此目标 PC **不需要另外安装 Node、npm 或 Rust**。
101
+
102
+ ### 从源码构建 Windows 安装包
103
+
104
+ 需要:
105
+
106
+ - Node.js 22+
107
+ - Rust stable
108
+ - Visual Studio 2022 / MSVC
109
+ - Windows SDK
110
+
111
+ 然后:
112
+
113
+ ```powershell
114
+ git clone https://github.com/Ryanma-YX/easy-local-mcp.git
115
+ cd easy-local-mcp
116
+
117
+ npm ci
118
+ npm run desktop:bundle
119
+ ```
120
+
121
+ 安装包会生成到:
122
+
123
+ ```text
124
+ src-tauri\target\release\bundle\nsis\
125
+ ```
126
+
127
+ ---
128
+
129
+ ## 首次启动
130
+
131
+ 第一次启动桌面版时,**Agent 不会自动连接任何 Relay**。
132
+
133
+ 流程:
134
+
135
+ 1. Easy Local MCP 先只启动本机 Control Center
136
+ 2. 选择 Relay
137
+ 3. 默认公共 Relay 已预填,但此时不会联网注册
138
+ 4. 如使用自建 Relay,可填写自己的 Worker URL
139
+ 5. 如果 Worker 开启注册保护,可填写 Registration Token
140
+ 6. 点击:
141
+
142
+ ```text
143
+ Save & Start Agent
144
+ ```
145
+
146
+ 之后才会:
147
+
148
+ ```text
149
+ 保存 Relay
150
+ → 注册设备
151
+ → 启动 Agent
152
+ → 建立 Relay 连接
153
+ → 生成 MCP URL
154
+ ```
155
+
156
+ ### 公共 Relay
157
+
158
+ 公共 Relay 适合快速开始。
159
+
160
+ 但它属于**可信中继基础设施**,当前架构不是 ChatGPT 到本机 Agent 的端到端加密。
161
+
162
+ 对于:
163
+
164
+ - 公司源码
165
+ - ERP / MES
166
+ - 内部文件
167
+ - 凭证
168
+ - 生产环境
169
+
170
+ 建议使用自己的 Relay / Cloudflare Worker。
171
+
172
+ ---
173
+
174
+ ## 连接 ChatGPT
175
+
176
+ Agent 启动后,可以在 Control Center 中:
177
+
178
+ ```text
179
+ Reveal / Copy MCP URL
180
+ ```
181
+
182
+ 也可以使用兼容 CLI:
183
+
184
+ ```powershell
185
+ localmcp url
186
+ ```
187
+
188
+ 或新的品牌命令:
189
+
190
+ ```powershell
191
+ easy-local-mcp url
192
+ ```
193
+
194
+ 然后在 ChatGPT 中:
195
+
196
+ 1. 打开 Developer Mode
197
+ 2. 添加 MCP / Connector
198
+ 3. 填入完整 MCP URL
199
+ 4. Authentication 选择:
200
+
201
+ ```text
202
+ None
203
+ ```
204
+
205
+ 完整 MCP URL 本身就是访问凭证,请不要:
206
+
207
+ - 提交到 Git
208
+ - 发到公开群组
209
+ - 放进 issue
210
+ - 放在公开截图
211
+ - 写入普通日志
212
+
213
+ ---
214
+
215
+ ## 常用操作
216
+
217
+ 新命令:
218
+
219
+ ```powershell
220
+ easy-local-mcp ui
221
+ easy-local-mcp status
222
+ easy-local-mcp url
223
+ easy-local-mcp unlock
224
+ easy-local-mcp lock
225
+ easy-local-mcp reload
226
+ easy-local-mcp rotate
227
+ easy-local-mcp stop
228
+ ```
229
+
230
+ 为了兼容已有用户,旧命令仍然可用:
231
+
232
+ ```powershell
233
+ localmcp
234
+ localmcp ui
235
+ localmcp status
236
+ ```
237
+
238
+ 兼容状态目录和环境变量也继续保留:
239
+
240
+ ```text
241
+ ~/.localmcp/
242
+ LOCALMCP_*
243
+ ```
244
+
245
+ 因此升级 Easy Local MCP 不要求现有用户迁移配置。
246
+
247
+ ---
248
+
249
+ ## 自建 Relay
250
+
251
+ 对于敏感环境,建议使用自己的 Cloudflare Worker。
252
+
253
+ 部署原理:
254
+
255
+ ```text
256
+ ChatGPT
257
+ ↓ MCP
258
+ Cloudflare Worker / Relay
259
+ ↓ WebSocket
260
+ Easy Local MCP Agent
261
+
262
+ Local files / shell / tools
263
+ ```
264
+
265
+ Worker 部署命令:
266
+
267
+ ```powershell
268
+ npm ci
269
+ npm run worker:deploy
270
+ ```
271
+
272
+ 然后在首次启动界面填写你的 Worker URL。
273
+
274
+ 如果 Worker 配置了:
275
+
276
+ ```text
277
+ REGISTRATION_TOKEN_HASH
278
+ ```
279
+
280
+ 则在 Easy Local MCP 首次设置中填写对应 raw registration token。
281
+
282
+ Registration Token:
283
+
284
+ - 不进入 MCP URL
285
+ - 不写入 localmcp.json
286
+ - 不进入 audit log
287
+ - 注册成功并持久化本地凭据后会删除临时 token
288
+
289
+ ---
290
+
291
+ ## 安全模型
292
+
293
+ Easy Local MCP 是一个**高权限本地 Agent**。
294
+
295
+ 它以当前操作系统用户权限运行。
296
+
297
+ ### 文件工具
298
+
299
+ 文件工具受 Workspace 边界限制。
300
+
301
+ ### Shell
302
+
303
+ Shell **不是 Workspace sandbox**。
304
+
305
+ Shell 可以访问当前 OS 用户能够访问的:
306
+
307
+ - 其他目录
308
+ - 其他盘符
309
+ - 网络
310
+ - 系统命令
311
+ - 当前用户权限范围内的资源
312
+
313
+ 因此危险能力同时要求:
314
+
315
+ ```text
316
+ 功能已启用
317
+ +
318
+ Agent 已 Unlock
319
+ ```
320
+
321
+ ### Windows
322
+
323
+ 后台命令、Agent、Process 和 bundled Node host 默认使用隐藏窗口方式启动,避免 MCP 调用过程中反复闪出 CMD / PowerShell 黑框。
324
+
325
+ ---
326
+
327
+ ## Desktop / Tray
328
+
329
+ 桌面版支持:
330
+
331
+ - 原生 Control Center 窗口
332
+ - 系统托盘
333
+ - 左键托盘恢复窗口
334
+ - Show
335
+ - Hide
336
+ - Quit
337
+ - 关闭窗口隐藏到托盘
338
+
339
+ Tray Quit:
340
+
341
+ ```text
342
+ 退出 Desktop UI
343
+ 关闭对应 Control Center host
344
+ 不停止独立运行的 Agent
345
+ ```
346
+
347
+ Agent 与桌面 UI 生命周期相互独立。
348
+
349
+ ---
350
+
351
+ ## 开发
352
+
353
+ 安装依赖:
354
+
355
+ ```powershell
356
+ npm ci
357
+ ```
358
+
359
+ 检查:
360
+
361
+ ```powershell
362
+ npm run check
363
+ ```
364
+
365
+ 测试:
366
+
367
+ ```powershell
368
+ npm test
369
+ ```
370
+
371
+ 构建 Node:
372
+
373
+ ```powershell
374
+ npm run build
375
+ ```
376
+
377
+ 检查 Tauri:
378
+
379
+ ```powershell
380
+ npm run tray:check
381
+ ```
382
+
383
+ 构建 Tray:
384
+
385
+ ```powershell
386
+ npm run tray:build
387
+ ```
388
+
389
+ 构建 Windows 安装包:
390
+
391
+ ```powershell
392
+ npm run desktop:bundle
393
+ ```
394
+
395
+ ---
396
+
397
+ ## 项目来源与致谢
398
+
399
+ Easy Local MCP 基于:
400
+
401
+ **daodao97/localmcp**
402
+
403
+ https://github.com/daodao97/localmcp
404
+
405
+ 感谢原作者提供 Local MCP、Relay 与 Worker 的基础实现。
406
+
407
+ 本项目在其基础上继续开发,并作为独立分支维护。
408
+
409
+ 当前维护仓库:
410
+
411
+ https://github.com/Ryanma-YX/easy-local-mcp
412
+
413
+ ## License
414
+
415
+ MIT License。
416
+
417
+ 详见 [LICENSE](LICENSE) 和 [SECURITY.md](SECURITY.md)。
Binary file
Binary file