@atlisp/mcp 1.8.29 → 1.8.31
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 +44 -6
- package/dist/atlisp-mcp.js +644 -369
- package/dist/cad-rothelper.dll +0 -0
- package/dist/handlers/cad-handlers.js +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lisp MCP Server
|
|
2
2
|
|
|
3
|
-
MCP (Model Context Protocol) Server for @lisp on CAD — 为 CAD 环境提供 @lisp 包管理服务的 MCP 服务器,同时为 AI Agent 操控 CAD 提供 **
|
|
3
|
+
MCP (Model Context Protocol) Server for @lisp on CAD — 为 CAD 环境提供 @lisp 包管理服务的 MCP 服务器,同时为 AI Agent 操控 CAD 提供 **230+ 个调用工具**和通道。
|
|
4
4
|
|
|
5
5
|
支持 **AutoCAD / ZWCAD / GStarCAD / BricsCAD**,通过 COM 互操作与 CAD 通信。
|
|
6
6
|
|
|
@@ -189,6 +189,30 @@ atlisp-mcp --ws
|
|
|
189
189
|
atlisp-mcp --port 9000 --host 127.0.0.1
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
+
> **端口防冲突**:每个端口只允许一个实例运行。启动时自动检测端口是否已被其他 `atlisp-mcp` 进程占用(通过 `~/.atlisp/locks/atlisp-mcp-{port}.lock` PID 锁文件),占用则报错退出。不同端口可同时运行多个实例互不干扰。
|
|
193
|
+
|
|
194
|
+
### 设置开机自启
|
|
195
|
+
|
|
196
|
+
注册到用户登录后自动启动 HTTP 服务:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
atlisp-mcp --install-autostart
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
移除自启:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
atlisp-mcp --uninstall-autostart
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
查看自启状态:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
atlisp-mcp --autostart-status
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
支持三种平台:Windows(Registry Run 键)、macOS(LaunchAgent)、Linux(XDG Autostart)。
|
|
215
|
+
|
|
192
216
|
### 健康检查
|
|
193
217
|
|
|
194
218
|
```bash
|
|
@@ -225,7 +249,7 @@ curl http://localhost:8110/metrics
|
|
|
225
249
|
|
|
226
250
|
```json
|
|
227
251
|
{
|
|
228
|
-
"name": "
|
|
252
|
+
"name": "open_cad",
|
|
229
253
|
"arguments": {}
|
|
230
254
|
}
|
|
231
255
|
```
|
|
@@ -234,16 +258,26 @@ curl http://localhost:8110/metrics
|
|
|
234
258
|
|
|
235
259
|
```json
|
|
236
260
|
{
|
|
237
|
-
"name": "
|
|
261
|
+
"name": "open_cad",
|
|
238
262
|
"arguments": {
|
|
239
263
|
"platform": "AutoCAD"
|
|
240
264
|
}
|
|
241
265
|
}
|
|
242
266
|
```
|
|
243
267
|
|
|
268
|
+
也支持 `connect_cad` 工具(仅连接不切前台):
|
|
269
|
+
|
|
270
|
+
```json
|
|
271
|
+
{
|
|
272
|
+
"name": "connect_cad",
|
|
273
|
+
"arguments": {}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
244
277
|
**自动行为**:
|
|
245
278
|
- 如果 CAD 已运行,连接现有实例
|
|
246
279
|
- 如果 CAD 未运行,通过 COM 自动创建新实例
|
|
280
|
+
- `open_cad` 额外将 CAD 窗口切换到前台
|
|
247
281
|
|
|
248
282
|
连接成功返回类似: `已连接到 AutoCAD 2025`
|
|
249
283
|
|
|
@@ -281,11 +315,12 @@ curl http://localhost:8110/metrics
|
|
|
281
315
|
|
|
282
316
|
## 工具列表 (230+)
|
|
283
317
|
|
|
284
|
-
### 系统与 CAD 连接 (
|
|
318
|
+
### 系统与 CAD 连接 (12)
|
|
285
319
|
|
|
286
320
|
| 工具 | 说明 | 参数 |
|
|
287
321
|
|------|------|------|
|
|
288
|
-
| `
|
|
322
|
+
| `open_cad` | 打开 CAD 应用并切换到前台(未运行则自动启动) | `platform` (可选) |
|
|
323
|
+
| `connect_cad` | 连接 CAD(仅连接不切换前台) | `platform` (可选) |
|
|
289
324
|
| `eval_lisp` | 执行 LISP 代码(无返回值) | `code` (必填) |
|
|
290
325
|
| `eval_lisp_with_result` | 执行 LISP 并返回结果 | `code` (必填), `encoding` (可选) |
|
|
291
326
|
| `get_cad_info` | 获取 CAD 信息 | — |
|
|
@@ -813,6 +848,9 @@ curl http://localhost:8110/metrics
|
|
|
813
848
|
| `--config <path>` | 配置文件路径 |
|
|
814
849
|
| `--ssl-key <path>` | SSL 私钥文件 |
|
|
815
850
|
| `--ssl-cert <path>` | SSL 证书文件 |
|
|
851
|
+
| `--install-autostart` | 注册用户登录后自动启动 HTTP 服务 |
|
|
852
|
+
| `--uninstall-autostart` | 移除自动启动注册 |
|
|
853
|
+
| `--autostart-status` | 查询自动启动是否已安装 |
|
|
816
854
|
|
|
817
855
|
---
|
|
818
856
|
|
|
@@ -869,7 +907,7 @@ curl http://localhost:8110/metrics
|
|
|
869
907
|
| 中文乱码 | 使用 `encoding: gbk` 参数或用 `vl-prin1-to-string` 处理 |
|
|
870
908
|
| 括号错误 | MCP Server 会自动检查并提示 |
|
|
871
909
|
| CAD 未自动启动 | 检查 COM 权限,以管理员身份运行 |
|
|
872
|
-
| 端口被占用 | 使用 `--port`
|
|
910
|
+
| 端口被占用 | 使用 `--port` 指定其他端口;同端口多实例冲突时,结束原进程或换端口 |
|
|
873
911
|
| 全局命令找不到 | 检查 npm 全局安装路径是否在 PATH 中 |
|
|
874
912
|
|
|
875
913
|
---
|