openbio-comfy-mcp 0.1.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 +177 -0
- package/README.zh-CN.md +177 -0
- package/dist/openbio-comfy-mcp.mjs +16583 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Open-Bio 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
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# OpenBio Comfy MCP
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.npmjs.com/package/openbio-comfy-mcp)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
[](https://github.com/Comfy-Org/ComfyUI)
|
|
9
|
+
|
|
10
|
+
Let Cursor, Codex, Claude, or another local AI **inspect and edit the workflow currently open** on your ComfyUI canvas.
|
|
11
|
+
|
|
12
|
+
It uses ComfyUI's own graph, selection, groups, and undo. It never queues, runs, or saves a workflow for you.
|
|
13
|
+
|
|
14
|
+
This is **not** [Comfy's official MCP](https://docs.comfy.org/agent-tools/mcp). Official Comfy MCP generates images on Comfy Cloud or runs workflow files through `comfy-mcp`. This project edits the live graph you already have open.
|
|
15
|
+
|
|
16
|
+
## What you can ask
|
|
17
|
+
|
|
18
|
+
Once both pieces below are installed and a ComfyUI window is open:
|
|
19
|
+
|
|
20
|
+
- What is on this canvas?
|
|
21
|
+
- Add a node, connect these two, or move this group.
|
|
22
|
+
- Search the node types installed in *this* ComfyUI.
|
|
23
|
+
- Pack or unpack a native subgraph.
|
|
24
|
+
|
|
25
|
+
Changes appear on the canvas immediately. One ComfyUI undo reverts a whole patch.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
You need **both** steps. Manager only adds the ComfyUI side. The AI client still needs the MCP server.
|
|
30
|
+
|
|
31
|
+
### 1. ComfyUI extension
|
|
32
|
+
|
|
33
|
+
In ComfyUI Manager, search for `OpenBio Comfy MCP` or `openbio-comfy-mcp`, install it, and restart ComfyUI. Keep a browser or Desktop window open while you use the tools.
|
|
34
|
+
|
|
35
|
+
The extension has no extra Python packages. Registry builds already include the bundled MCP server.
|
|
36
|
+
|
|
37
|
+
Confirm the relay is up:
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
Invoke-RestMethod http://127.0.0.1:8188/openbio-comfy-mcp/health
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
You should see `"ok": true`. Use your ComfyUI port if it is not `8188`.
|
|
44
|
+
|
|
45
|
+
### 2. MCP host
|
|
46
|
+
|
|
47
|
+
Node.js 20+ must be on your `PATH`. Point the host at the published package — do not copy a file path:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"openbio-comfy-mcp": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["-y", "openbio-comfy-mcp@latest"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Codex
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
codex mcp add openbio-comfy-mcp -- npx -y openbio-comfy-mcp@latest
|
|
64
|
+
codex mcp get openbio-comfy-mcp --json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Restart the Codex client after adding it. Desktop, CLI, and the IDE extension share the same host config. See the [Codex MCP docs](https://developers.openai.com/codex/mcp).
|
|
68
|
+
|
|
69
|
+
#### Cursor
|
|
70
|
+
|
|
71
|
+
Add the JSON above to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in a project, then reload MCP.
|
|
72
|
+
|
|
73
|
+
#### Other stdio hosts (Claude Desktop, Claude Code, …)
|
|
74
|
+
|
|
75
|
+
Use the same `npx -y openbio-comfy-mcp@latest` command. Key names vary by host; the command must stay `npx`.
|
|
76
|
+
|
|
77
|
+
Local ComfyUI instances are discovered automatically. You only need one MCP registration even if several ComfyUI processes are running.
|
|
78
|
+
|
|
79
|
+
## Requirements
|
|
80
|
+
|
|
81
|
+
- ComfyUI 0.33.0 or newer
|
|
82
|
+
- Python 3.10 or newer in the ComfyUI runtime
|
|
83
|
+
- Node.js 20 or newer on the PATH of the MCP host
|
|
84
|
+
- An MCP host that can launch a local stdio server
|
|
85
|
+
- A ComfyUI page left open while the tools run
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
| Variable | Default | When to set it |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| `OPENBIO_COMFY_URL` | Unset (discover locally) | Pin this MCP connection to one instance, for example `http://127.0.0.1:8189`. |
|
|
92
|
+
| `OPENBIO_COMFY_REGISTRY_DIR` | `~/.openbio-comfy-mcp/instances` | Override the shared registration directory. ComfyUI and the MCP host must use the same path. |
|
|
93
|
+
|
|
94
|
+
Install the extension in every ComfyUI instance you want to edit. Each running backend writes its address under the shared directory. Discovery uses loopback only; remote ComfyUI is not supported.
|
|
95
|
+
|
|
96
|
+
With several online instances, tools pick the one whose page was focused last. Say “edit the workflow on port 8189” if you need a specific one. `list_instances` shows `instance_id`, status, and connected canvases.
|
|
97
|
+
|
|
98
|
+
## Tools
|
|
99
|
+
|
|
100
|
+
| Tool | Effect | Purpose |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| `list_instances` | Read-only | List local instances and connected canvases. |
|
|
103
|
+
| `inspect_canvas` | Read-only | Inspect the live graph, subgraphs, or specific nodes and groups. |
|
|
104
|
+
| `search_nodes` | Read-only | Search the node types installed in that ComfyUI. |
|
|
105
|
+
| `inspect_node_type` | Read-only | Read the native schema of one `class_type`. |
|
|
106
|
+
| `present_canvas` | UI only | Navigate graphs, select items, optionally fit the view. |
|
|
107
|
+
| `apply_canvas_patch` | Writes the canvas | Apply one atomic, undoable batch of graph edits. |
|
|
108
|
+
|
|
109
|
+
Typical flow: inspect → search a node type if needed → apply one patch → undo in ComfyUI if the result is wrong.
|
|
110
|
+
|
|
111
|
+
Exact operations live in [docs/spec.md](docs/spec.md).
|
|
112
|
+
|
|
113
|
+
## Security
|
|
114
|
+
|
|
115
|
+
- The MCP process runs with the same OS permissions as the host that launched it.
|
|
116
|
+
- `apply_canvas_patch` can change the open workflow. Review it in your host if you gate write tools.
|
|
117
|
+
- The server opens no listening port. Canvas commands are accepted from loopback only. That is not a general ComfyUI login; do not expose an unauthenticated ComfyUI to untrusted networks.
|
|
118
|
+
- Inspections can include prompts, filenames, and widget values. What happens next follows your MCP host and model provider.
|
|
119
|
+
|
|
120
|
+
## Troubleshooting
|
|
121
|
+
|
|
122
|
+
- `NO_LIVE_CANVAS`: open or reload a ComfyUI page and leave it connected.
|
|
123
|
+
- Host shows no tools: confirm Node 20+ is on `PATH`, that the host command is `npx -y openbio-comfy-mcp@latest`, then restart the host.
|
|
124
|
+
- Health route missing: the extension is not loaded. Reinstall under `custom_nodes`, restart ComfyUI, check its console.
|
|
125
|
+
- `STALE_CANVAS`: inspect again and send a new patch.
|
|
126
|
+
- `AMBIGUOUS_INSTANCE`: several instances, no clear focus. Use `list_instances` and pass an `instance_id` or `canvas_id`.
|
|
127
|
+
- `INSTANCE_UNAVAILABLE` / `INSTANCE_NOT_FOUND`: that ComfyUI is down or was restarted. List and inspect again.
|
|
128
|
+
- Port `5173` Vite frontend: custom-node JavaScript does not load there. Use the frontend served by ComfyUI.
|
|
129
|
+
|
|
130
|
+
## Update and uninstall
|
|
131
|
+
|
|
132
|
+
Manager users: update the extension in ComfyUI Manager, then restart ComfyUI and reload the page. The MCP host always fetches `@latest` on the next `npx` launch.
|
|
133
|
+
|
|
134
|
+
Remove the host registration first (Codex: `codex mcp remove openbio-comfy-mcp`), then uninstall the custom node and restart ComfyUI.
|
|
135
|
+
|
|
136
|
+
## Source install
|
|
137
|
+
|
|
138
|
+
Use this when you are developing the extension, or Manager is not available.
|
|
139
|
+
|
|
140
|
+
```powershell
|
|
141
|
+
$ComfyRoot = "C:\path\to\ComfyUI"
|
|
142
|
+
Set-Location "$ComfyRoot\custom_nodes"
|
|
143
|
+
git clone https://github.com/Open-Bio/openbio-comfy-mcp.git
|
|
144
|
+
Set-Location .\openbio-comfy-mcp
|
|
145
|
+
npm ci
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cd /path/to/ComfyUI/custom_nodes
|
|
150
|
+
git clone https://github.com/Open-Bio/openbio-comfy-mcp.git
|
|
151
|
+
cd openbio-comfy-mcp
|
|
152
|
+
npm ci
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
To keep the Git checkout outside ComfyUI, Junction or symlink it into `custom_nodes`, then run `npm ci` in the checkout. Do not expose the same checkout through more than one custom-node root.
|
|
156
|
+
|
|
157
|
+
For local MCP testing against that checkout, you can still launch `node dist/openbio-comfy-mcp.mjs` instead of `npx`.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npm ci
|
|
161
|
+
npm test
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Python relay tests, using the same interpreter as ComfyUI:
|
|
165
|
+
|
|
166
|
+
```powershell
|
|
167
|
+
C:\path\to\ComfyUI\.venv\Scripts\python.exe `
|
|
168
|
+
-m pytest --rootdir=tests -c pyproject.toml tests -q
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The standalone ComfyUI_frontend Vite server (`pnpm dev`, usually port `5173`) does not load custom-node JavaScript. Open the UI that ComfyUI itself serves.
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
OpenBio Comfy MCP is released under the [MIT License](LICENSE).
|
|
176
|
+
|
|
177
|
+
This project uses the official [Model Context Protocol TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) and ComfyUI's documented [V3](https://docs.comfy.org/custom-nodes/v3_migration) and [JavaScript extension](https://docs.comfy.org/custom-nodes/js/javascript_overview) APIs.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# OpenBio Comfy MCP
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.npmjs.com/package/openbio-comfy-mcp)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
[](https://github.com/Comfy-Org/ComfyUI)
|
|
9
|
+
|
|
10
|
+
让 Cursor、Codex、Claude 或其他本地 AI **查看并修改你 ComfyUI 里当前打开的工作流画布**。
|
|
11
|
+
|
|
12
|
+
它走 ComfyUI 自己的图、选择、分组和撤销,不会帮你排队、执行或保存。
|
|
13
|
+
|
|
14
|
+
这不是 [Comfy 官方 MCP](https://docs.comfy.org/agent-tools/mcp)。官方 Cloud MCP 在云端出图,`comfy-mcp` 跑的是工作流文件。本项目改的是你屏幕上正在打开的那张图。
|
|
15
|
+
|
|
16
|
+
## 可以让 AI 做什么
|
|
17
|
+
|
|
18
|
+
两边都装好、并且开着一个 ComfyUI 窗口之后,可以这样说:
|
|
19
|
+
|
|
20
|
+
- 现在画布上有什么?
|
|
21
|
+
- 加一个节点、把这两个连上、挪一下这个组。
|
|
22
|
+
- 搜一下**这台** ComfyUI 里装了哪些节点。
|
|
23
|
+
- 把节点打成原生子图,或再拆开。
|
|
24
|
+
|
|
25
|
+
修改会立刻出现在画布上。一次 ComfyUI 撤销会整批还原。
|
|
26
|
+
|
|
27
|
+
## 安装
|
|
28
|
+
|
|
29
|
+
必须做 **两步**。Manager 只装 ComfyUI 这一侧;AI 客户端还要单独接 MCP 服务器。
|
|
30
|
+
|
|
31
|
+
### 1. 安装 ComfyUI 扩展
|
|
32
|
+
|
|
33
|
+
打开 ComfyUI Manager,搜索 `OpenBio Comfy MCP` 或 `openbio-comfy-mcp`,安装后重启 ComfyUI。用工具时请保持浏览器或 Desktop 窗口开着。
|
|
34
|
+
|
|
35
|
+
扩展没有额外的 Python 依赖。Registry 版本已带打包好的 MCP 服务器。
|
|
36
|
+
|
|
37
|
+
确认中继可用:
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
Invoke-RestMethod http://127.0.0.1:8188/openbio-comfy-mcp/health
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
应返回 `"ok": true`。端口不是 `8188` 时换成你的端口。
|
|
44
|
+
|
|
45
|
+
### 2. 接到 MCP Host
|
|
46
|
+
|
|
47
|
+
MCP Host 所用环境的 `PATH` 上要有 Node.js 20+。写发布包即可,不必填本机文件路径:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"openbio-comfy-mcp": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["-y", "openbio-comfy-mcp@latest"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Codex
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
codex mcp add openbio-comfy-mcp -- npx -y openbio-comfy-mcp@latest
|
|
64
|
+
codex mcp get openbio-comfy-mcp --json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
添加后重启 Codex 客户端。Desktop、CLI 和 IDE 扩展共用同一套配置。参见 [Codex MCP 文档](https://developers.openai.com/codex/mcp)。
|
|
68
|
+
|
|
69
|
+
#### Cursor
|
|
70
|
+
|
|
71
|
+
把上面的 JSON 写进 `~/.cursor/mcp.json`(全局)或项目里的 `.cursor/mcp.json`,然后重载 MCP。
|
|
72
|
+
|
|
73
|
+
#### 其他 stdio Host(Claude Desktop、Claude Code 等)
|
|
74
|
+
|
|
75
|
+
同样使用 `npx -y openbio-comfy-mcp@latest`。各 Host 的配置键可能不同,命令必须是 `npx`。
|
|
76
|
+
|
|
77
|
+
本地 ComfyUI 会自动发现。开了多个 ComfyUI 进程,也只需注册一次 MCP。
|
|
78
|
+
|
|
79
|
+
## 环境要求
|
|
80
|
+
|
|
81
|
+
- ComfyUI 0.33.0 或更高
|
|
82
|
+
- ComfyUI 运行环境为 Python 3.10 或更高
|
|
83
|
+
- MCP Host 的 PATH 上有 Node.js 20 或更高
|
|
84
|
+
- 能拉起本地 stdio 服务器的 MCP Host
|
|
85
|
+
- 使用工具时保持一个 ComfyUI 页面打开
|
|
86
|
+
|
|
87
|
+
## 配置
|
|
88
|
+
|
|
89
|
+
| 变量 | 默认值 | 什么时候设 |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| `OPENBIO_COMFY_URL` | 不设置(自动发现) | 把这次 MCP 连接钉在某一个实例上,例如 `http://127.0.0.1:8189`。 |
|
|
92
|
+
| `OPENBIO_COMFY_REGISTRY_DIR` | `~/.openbio-comfy-mcp/instances` | 覆盖共享注册目录。ComfyUI 和 MCP Host 必须用同一个路径。 |
|
|
93
|
+
|
|
94
|
+
每个要编辑的 ComfyUI 实例都要装这个扩展。各后端会把本机地址写进共享目录。只发现回环地址,不支持远程 ComfyUI。
|
|
95
|
+
|
|
96
|
+
多个实例同时在线时,默认选最近获得焦点的页面。需要指定时可以说「改 8189 端口上的工作流」。`list_instances` 会列出 `instance_id`、状态和已连接画布。
|
|
97
|
+
|
|
98
|
+
## 工具
|
|
99
|
+
|
|
100
|
+
| 工具 | 影响 | 用途 |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| `list_instances` | 只读 | 列出本地实例和已连接画布。 |
|
|
103
|
+
| `inspect_canvas` | 只读 | 查看当前图、子图,或指定节点/分组。 |
|
|
104
|
+
| `search_nodes` | 只读 | 搜索该 ComfyUI 已安装的节点类型。 |
|
|
105
|
+
| `inspect_node_type` | 只读 | 读取某个 `class_type` 的原生结构。 |
|
|
106
|
+
| `present_canvas` | 仅界面 | 切换图、选中对象、按需适配视口。 |
|
|
107
|
+
| `apply_canvas_patch` | 写入画布 | 原子化执行一批可撤销的图编辑。 |
|
|
108
|
+
|
|
109
|
+
常见流程:先检查 → 需要时搜节点类型 → 发一次补丁 → 不满意就在 ComfyUI 里撤销。
|
|
110
|
+
|
|
111
|
+
完整操作集合见 [docs/spec.md](docs/spec.md)。
|
|
112
|
+
|
|
113
|
+
## 安全
|
|
114
|
+
|
|
115
|
+
- MCP 进程的操作系统权限与拉起它的 Host 相同。
|
|
116
|
+
- `apply_canvas_patch` 会改当前打开的工作流。若 Host 会审核写入工具,请打开审核。
|
|
117
|
+
- 服务器不监听端口。画布命令只接受回环请求。这不是 ComfyUI 的登录层;不要把未认证的 ComfyUI 暴露到不可信网络。
|
|
118
|
+
- 检查结果可能包含提示词、文件名和控件值。后续如何处理取决于你的 MCP Host 和模型提供方。
|
|
119
|
+
|
|
120
|
+
## 故障排查
|
|
121
|
+
|
|
122
|
+
- `NO_LIVE_CANVAS`:打开或刷新 ComfyUI 页面,并保持连接。
|
|
123
|
+
- Host 里没有工具:确认 PATH 上有 Node 20+,命令是 `npx -y openbio-comfy-mcp@latest`,然后重启 Host。
|
|
124
|
+
- 健康检查路由不存在:扩展没加载。确认装在 `custom_nodes` 下,重启 ComfyUI,看控制台。
|
|
125
|
+
- `STALE_CANVAS`:重新检查,再发新补丁。
|
|
126
|
+
- `AMBIGUOUS_INSTANCE`:多个实例且焦点不明确。先 `list_instances`,再传入 `instance_id` 或 `canvas_id`。
|
|
127
|
+
- `INSTANCE_UNAVAILABLE` / `INSTANCE_NOT_FOUND`:该 ComfyUI 已关掉或刚重启。重新列出并检查。
|
|
128
|
+
- 端口 `5173` 的 Vite 前端:不会加载自定义节点的 JavaScript。请用 ComfyUI 自己提供的前端。
|
|
129
|
+
|
|
130
|
+
## 更新与卸载
|
|
131
|
+
|
|
132
|
+
Manager 用户:在 Manager 里更新扩展,重启 ComfyUI 并刷新页面。MCP Host 下次 `npx` 时会拉取 `@latest`。
|
|
133
|
+
|
|
134
|
+
先删 Host 注册(Codex:`codex mcp remove openbio-comfy-mcp`),再卸载自定义节点,最后重启 ComfyUI。
|
|
135
|
+
|
|
136
|
+
## 源码安装
|
|
137
|
+
|
|
138
|
+
开发本扩展,或无法使用 Manager 时:
|
|
139
|
+
|
|
140
|
+
```powershell
|
|
141
|
+
$ComfyRoot = "C:\path\to\ComfyUI"
|
|
142
|
+
Set-Location "$ComfyRoot\custom_nodes"
|
|
143
|
+
git clone https://github.com/Open-Bio/openbio-comfy-mcp.git
|
|
144
|
+
Set-Location .\openbio-comfy-mcp
|
|
145
|
+
npm ci
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cd /path/to/ComfyUI/custom_nodes
|
|
150
|
+
git clone https://github.com/Open-Bio/openbio-comfy-mcp.git
|
|
151
|
+
cd openbio-comfy-mcp
|
|
152
|
+
npm ci
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Git 仓库放在 ComfyUI 外面时,用 Junction 或符号链接挂到 `custom_nodes`,再在仓库里运行 `npm ci`。不要把同一个仓库挂到多个自定义节点目录。
|
|
156
|
+
|
|
157
|
+
对本仓库做本地 MCP 调试时,可以继续用 `node dist/openbio-comfy-mcp.mjs`,不必走 `npx`。
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npm ci
|
|
161
|
+
npm test
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Python 中继测试请用 ComfyUI 同一个解释器:
|
|
165
|
+
|
|
166
|
+
```powershell
|
|
167
|
+
C:\path\to\ComfyUI\.venv\Scripts\python.exe `
|
|
168
|
+
-m pytest --rootdir=tests -c pyproject.toml tests -q
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
独立的 ComfyUI_frontend Vite 开发服务器(`pnpm dev`,通常是 `5173`)不会加载自定义节点的 JavaScript。请打开 ComfyUI 自己提供的界面。
|
|
172
|
+
|
|
173
|
+
## 许可证
|
|
174
|
+
|
|
175
|
+
OpenBio Comfy MCP 使用 [MIT License](LICENSE) 发布。
|
|
176
|
+
|
|
177
|
+
本项目使用官方 [Model Context Protocol TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk),以及 ComfyUI 文档中的 [V3](https://docs.comfy.org/custom-nodes/v3_migration) 和 [JavaScript 扩展](https://docs.comfy.org/custom-nodes/js/javascript_overview)接口。
|