sd-neo-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sd-neo-mcpgenerate a photo of a cat wearing a hat"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sd-neo-mcp
SD WebUI Forge NEO 的 MCP 服务器与 CLI 工具。同时作为 opencode 的 stdio MCP 服务器与命令行工具 sdneo,连接运行中的 SD WebUI Forge NEO 实例(基于 A1111 的 /sdapi/v1/* HTTP API)。
功能
8 个 MCP 工具
工具 | 说明 |
| 文生图,支持异步队列(agent-scheduler 扩展)或同步模式 |
| 图生图,基于输入图片和提示词生成新图片 |
| 列出可用 checkpoint 模型,标记当前活跃模型 |
| 切换当前 checkpoint 模型 |
| 列出可用 LoRA 模型 |
| 查询生成进度(同步进度或异步任务状态) |
| 放大图片(倍率/指定尺寸模式) |
| 图片反推标签(需 wd14-tagger 扩展) |
CLI 子命令
sdneo status / gen / img2img / models / loras / progress / upscale / tag,每个子命令调用对应的 core dispatch 逻辑。
双传输模式
async:自动探测 agent-scheduler 扩展,入队后轮询直到完成
sync:回退到同步
/sdapi/v1/txt2img(单次阻塞)
Related MCP server: ComfyUI MCP
前置条件
SD WebUI Forge NEO 必须以
--api启动异步队列需启用
sd-webui-agent-scheduler-neo扩展(可选,无则自动回退同步模式)图片反推需启用
sd-webui-wd14-tagger扩展(可选)Node.js >= 18.17
安装
cd sd-neo-mcp
npm install
npm run buildopencode 接入
在 opencode.json 的 mcp 块中添加(参考 opencode.example.json):
{
"mcp": {
"sd-neo": {
"type": "local",
"command": ["node", "E:/download/sd-neo-mcp/dist/mcp/server.js"],
"environment": {
"SD_WEBUI_URL": "http://127.0.0.1:7860",
"SD_OUTPUT_DIR": "E:/download/sd-neo-mcp/output"
}
}
}
}若 NEO 启用了 --api-auth,在 environment 中加 SD_AUTH_USER 和 SD_AUTH_PASS(不要设空串,留空即不启用)。
重启 opencode 生效。
环境变量
变量 | 默认值 | 说明 |
|
| SD WebUI API 地址 |
| - | HTTP Basic Auth 用户名(需与 |
| - | HTTP Basic Auth 密码 |
|
| 图片输出目录(自动创建) |
|
| 生成超时(毫秒) |
|
| 异步轮询间隔(毫秒) |
|
| HTTP 请求超时(毫秒) |
| - | 默认采样器 |
| - | 默认步数 |
| - | 默认 CFG 值 |
构建验证
npm run typecheck
npm run build
npm test
node dist/cli/index.js --help项目结构
src/
core/ # 核心业务层,不依赖 MCP/CLI
config.ts # 环境变量解析
client.ts # NEO API 客户端
transport.ts # async/sync 传输层
tools.ts # 8 个工具 dispatch
schema.ts # zod 输入 schema → JSON Schema
mcp/
server.ts # MCP stdio 服务器
cli/
index.ts # CLI 入口
tests/ # vitest 单元测试License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wuytg/sd-neo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server