
CLO3D的MCP服务器。通过Claude、光标或任何MCP客户端控制3D服装设计。
概览
通过Claude、光标或任何MCP客户端与CLO3D对话。创建图案、更换织物、运行模拟、导出模型。所有这些都可以通过聊天窗口完成。 如果你用CLO3D,并且希望能在不翻API文档的情况下编写重复性任务脚本,这本书适合你。 1. 打开CLO3D 2.3. 打开插件/clo3d_mcp_plugin.py 4.击中 你会看到控制台里启动了[CLO MCP]插件。 可以问类似这样的问题:- “这个项目里有哪些图案?”- “把前胸面料设为红色” - “运行100步模拟后导出为GLB” - “导出所有配色的唱盘” (插件/clo3d_mcp_plugin.py)运行在 CLO3D 内部。它是一个单一的 Python 文件,轮询共享的临时目录以获取 JSON 命令,调用 CLO3D Python API,并写回结果。没有外部依赖,没有套接字,支持 CLO3D 内置的 Python。 (src/clo3d_mcp/) 是一个 Python 包,可以向该目录写入命令并读取响应。任何兼容 MCP 的客户端(Claude、光标等)都可以使用它。
概述(AI 翻译)
通过Claude、光标或任何MCP客户端与CLO3D对话。创建图案、更换织物、运行模拟、导出模型。所有这些都可以通过聊天窗口完成。
如果你用CLO3D,并且希望能在不翻API文档的情况下编写重复性任务脚本,这本书适合你。
快速启动
1.在CLO3D中加载插件
一个Python文件,没有依赖。
- 打开CLO3D
- 剧本>剧本编辑
- 开
plugin/clo3d_mcp_plugin.py - 打 跑
你会在控制台看到[CLO MCP] Plugin started和[CLO MCP] Listening for commands in: ...。
每个 CLO3D 会话运行一次。在 Windows 上,插件通过由 CLO3D 自身事件循环驱动的原生定时器监听,因此 CLO3D 保持完全可用。在其他平台上,它会退回到阻塞循环:脚本编辑器保持忙碌,而插件则在监听。重运行脚本会替换之前的监听器。
2.连接你的AI客户端
克劳德代码:
Claude Desktop(添加到claude_desktop_config.json):
3.走
可以问一些问题:
- “这个项目有哪些模式?”
- “将前胸布料调为红色”
- “运行100步模拟后导出为GLB”
- “导出所有配色的唱盘”
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
CLO3D MCP Server
Talk to CLO3D from Claude, Cursor, or any MCP client. Create patterns, swap fabrics, run simulations, export models. All from a chat window.
If you use CLO3D and you’ve wished you could script repetitive tasks without digging through the API docs, this is for you.
Your AI assistant MCP Server CLO3D Plugin CLO3D
Quick Start
1. Load the plugin in CLO3D
One Python file, no dependencies.
- Open CLO3D
- Script > Script Editor
- Open
plugin/clo3d_mcp_plugin.py - Hit Run
You’ll see [CLO MCP] Plugin started and [CLO MCP] Listening for commands in: ... in the console.
Run it once per CLO3D session. On Windows the plugin listens through a native timer driven by CLO3D’s own event loop, so CLO3D stays fully usable. On other platforms it falls back to a blocking loop: the Script Editor stays busy while the plugin listens. Re-running the script replaces the previous listener.
2. Connect your AI client
Claude Code:
claude mcp add clo3d -- uvx --from git+https://github.com/Ubani-Studio/clo3d-mcp clo3d-mcp
Claude Desktop (add to claude_desktop_config.json):
{
"mcpServers": {
"clo3d": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Ubani-Studio/clo3d-mcp", "clo3d-mcp"]
}
}
}
3. Go
Ask things like:
- “What patterns are in this project?”
- “Set the front bodice fabric to red”
- “Run 100 steps of simulation then export as GLB”
- “Export a turntable of all colorways”
What you get (46 tools)
Scene
| Tool | What it does |
|---|---|
get_project_info |
Project name, file path, CLO version, piece counts |
new_project |
Start fresh |
open_file |
Open .zprj, .zpac, .obj, .fbx, .avt |
save_project |
Save as .zprj |
get_garment_info |
Dump full garment metadata to JSON |
Patterns
| Tool | What it does |
|---|---|
get_pattern_count |
How many pieces |
get_pattern_list |
All pieces with names and indices |
get_pattern_info |
Full detail on one piece |
get_pattern_bounding_box |
Width and height |
set_pattern_name |
Rename a piece |
copy_pattern |
Duplicate at a given position |
delete_pattern |
Remove a piece |
flip_pattern |
Flip horizontal or vertical |
create_pattern |
Build a new piece from vertex points |
get_arrangement_list |
Get avatar arrangement points |
Fabrics
| Tool | What it does |
|---|---|
get_fabric_list |
All fabrics with indices |
add_fabric |
Load a .zfab or .jfab |
replace_fabric |
Swap an existing fabric |
assign_fabric_to_pattern |
Put a fabric on a pattern piece |
set_fabric_color |
Set PBR base color (RGB) |
get_fabric_for_pattern |
Check which fabric is on a piece |
Export
| Tool | What it does |
|---|---|
export_obj |
OBJ with options |
export_fbx |
FBX |
export_glb |
GLB (binary glTF) |
安装
uvx --from git+https://github.com/Ubani-Studio/clo3d-mcp clo3d-mcp配置
{
"mcpServers": {
"clo3d": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Ubani-Studio/clo3d-mcp", "clo3d-mcp"]
}
}
}