clo3d-mcp
Click on "Deploy 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., "@clo3d-mcp simulate the fabric drape on the current avatar"
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.
clo3d-mcp
English · Русский
An MCP server that lets Claude (or any MCP host) drive CLO3D for AI-assisted garment design — import projects, dress avatars, assign fabrics, run cloth simulation, render, and export, all from a chat.
Claude ◄─ stdio ─► clo_mcp (Python MCP server) ◄─ TCP/JSON ─► listener inside CLO ◄─► CLO APIclo_mcp/— the MCP server. Runs on the host, talks stdio to Claude, forwards each tool call as one JSON command over a TCP socket (127.0.0.1:5005). No CLO dependency, fully unit-testable.The listener inside CLO comes in two flavors — pick one:
Native C++ plugin ( | Python script ( | |
CLO UI while listening | stays fully interactive | frozen until |
Lifetime | whole CLO session, Start/Stop button | until the script is stopped |
Feedback | status window with live request log | Log Console prints |
Needs | CLO 7.3.240+, one-time DLL build | nothing (script as-is) |
The custom plugin (clo_plugin/)
CLO 7's embedded Python exposes no Qt and no idle/timer hook, so a Python
listener can only block the UI thread while serving. The plugin solves this
natively: a QTcpServer created on CLO's main thread gets its socket
signals delivered by CLO's own Qt event loop — commands run on the main thread
(the only place the CLO API is safe) without a blocking loop. The UI only
stalls for the duration of a genuinely long call (simulate/render), same as
clicking the action by hand. Same wire protocol as the Python listener — the
MCP server doesn't know or care which one is on the other end.
Two hard-won implementation notes (details in clo_plugin/README.md):
CLO loads plugin DLLs transiently —
LoadLibrarybefore every export call,FreeLibraryright after. Static state would die instantly, so the plugin pins its module (GetModuleHandleExW(..._PIN)) when the listener starts; the server then survives across calls and clicks.CLO swallows plugin exceptions and
qWarning, so the plugin appends a diagnostic trail toC:/Users/Public/Documents/CLO/clo_mcp_plugin.log.
Clicking the plugin's menu item opens a small status window:
green ● Running on 127.0.0.1:5005 / grey ○ Stopped, a Start/Stop button,
and a live log — every request with outcome and timing, e.g.
[14:23:05] simulate — ok (1840 ms).
Build & install the plugin (scripts)
Prereqs: Visual Studio 2022 (MSVC C++), CMake ≥ 3.20, Qt 5.15.x msvc2019_64
(CLO 7.3.240 ships Qt 5.15.2 — exact match), and the CLO SDK
(CLO_SDK_v7.3.240_WIN.zip from developer.clo3d.com → API/SDK Download).
cd clo_plugin
.\build.ps1 -SdkDir C:\path\to\CLO_SDK_v7.3.240 # add -QtDir C:\Qt\5.15.2\msvc2019_64 if Qt is elsewhere
.\install.ps1 # copies the DLL into CLO's API_Plug_in folderbuild.ps1configures CMake (VS 2022, x64, Release) and builds the DLL.-StubOnlybuildsclo_mcp_test.exeinstead — a stub backend speaking the full protocol, no SDK needed, to verify the host ↔ server plumbing.install.ps1copies the DLL toC:\Users\Public\Documents\CLO\Assets\Preferences\API_Plug_in\. CLO reloads the DLL on every menu click, so no restart is needed — unless the listener is currently running (the DLL is pinned); then close CLO and re-run, or use.\install.ps1 -WaitForCloseto auto-copy the moment CLO exits.uninstall.ps1removes the DLL (close CLO first).
If script execution is blocked: powershell -ExecutionPolicy Bypass -File .\build.ps1 …
cd clo_plugin
cmake -S . -B build-msvc -G "Visual Studio 17 2022" -A x64 `
-DCLO_SDK_DIR=C:/path/to/CLO_SDK_v7.3.240 `
-DCMAKE_PREFIX_PATH=C:/Qt/5.15.2/msvc2019_64
cmake --build build-msvc --config Release # Release only - CLO won't load Debug
# then copy build-msvc/Release/clo_mcp_plugin.dll
# -> C:\Users\Public\Documents\CLO\Assets\Preferences\API_Plug_in\Use
In CLO: Settings → Plug-in → "MCP Listener (start / stop)" — the status window opens and the listener auto-starts on
127.0.0.1:5005.That's it — CLO stays interactive while Claude works.
Related MCP server: clo3d-mcp
Python listener (fallback, blocking on CLO 7)
In CLO: Main Menu → Edit → Python Script → Run Python Script →
clo_addon/clo_mcp_listener.py.On CLO 7 it prints
blocking main-thread mode— the CLO UI is busy while serving; ask Claude to callclo_shutdownto hand the UI back.
Hook up the MCP server (host side)
git clone https://github.com/Lilbonner/clo3d-mcp.git
cd clo3d-mcp && pip install -e .Claude Code: claude mcp add clo3d -- python -m clo_mcp.server
Claude Desktop (claude_desktop_config.json):
{ "mcpServers": { "clo3d": { "command": "python", "args": ["-m", "clo_mcp.server"] } } }Then ask: "call clo_ping" → CLO listener is up. means the whole chain works.
From there, plain language: "import C:/work/dress.zprj and simulate 80 frames".
Tools
Tool | What it does |
| check the listener is reachable |
| open |
| number of pattern pieces in the scene |
| run the cloth solver |
| fabric workflow |
| colorway workflow |
| render, returns saved PNG path(s) |
| save the scene as |
| stop the listener (frees the UI in Python blocking mode) |
Tip: to dress an avatar, import the .avt first, then a .zpac garment saved
with arrangement points (e.g. CLO's library Male_T-shirt.zpac), then
simulate — auto_hang is not exposed in the SDK v4.3.4 C++ API.
Configuration
Set the same values on both sides (host env and CLO side):
CLO_MCP_HOST (default 127.0.0.1), CLO_MCP_PORT (5005),
CLO_MCP_TIMEOUT (600 s — simulate/render can be long).
Status
Validated end to end on CLO 7.3.240 with the native plugin: ping → import →
pattern_count → simulate → export (real .zprj on disk) → render (real PNG),
including adding an avatar and dressing it. See AUDIT.md for the validation
log and clo_plugin/README.md for plugin internals.
Русский
MCP-сервер, который позволяет Claude (или любому MCP-хосту) управлять CLO3D: импорт проектов, одевание аватаров, ткани, симуляция, рендер и экспорт — прямо из чата.
Claude ◄─ stdio ─► clo_mcp (MCP-сервер, Python) ◄─ TCP/JSON ─► листенер внутри CLO ◄─► CLO APIclo_mcp/— MCP-сервер. Работает на хосте, говорит с Claude по stdio, каждую команду шлёт одной JSON-строкой в TCP-сокет (127.0.0.1:5005).Листенер внутри CLO есть в двух вариантах — выбери один:
Нативный C++ плагин ( | Python-скрипт ( | |
UI CLO во время работы | полностью отзывчивый | заморожен до |
Время жизни | вся сессия CLO, кнопка Start/Stop | пока работает скрипт |
Обратная связь | окно статуса с живым логом запросов | печать в Log Console |
Что нужно | CLO 7.3.240+, разовая сборка DLL | ничего |
Кастомный плагин (clo_plugin/)
Встроенный Python в CLO 7 не имеет ни Qt, ни таймера/idle-хука, поэтому
Python-листенер может слушать сокет только блокируя UI. Плагин решает это
нативно: QTcpServer, созданный на главном потоке CLO, получает сигналы
сокета через собственный Qt event loop CLO — команды выполняются на главном
потоке (единственное безопасное место для CLO API) без блокирующего цикла.
UI замирает только на время действительно долгой операции (симуляция/рендер) —
ровно как при ручном клике. Протокол тот же, что у Python-листенера: MCP-сервер
не знает и не должен знать, кто на другом конце.
Два выстраданных нюанса реализации (подробности в clo_plugin/README.md):
CLO грузит DLL плагина на каждый вызов:
LoadLibraryперед каждым экспортом иFreeLibraryсразу после. Статическое состояние умирало бы мгновенно, поэтому при старте листенера плагин пинит свой модуль (GetModuleHandleExW(..._PIN)) — сервер переживает выгрузки и клики.CLO молча глотает исключения плагина и
qWarning— поэтому плагин ведёт диагностический лог вC:/Users/Public/Documents/CLO/clo_mcp_plugin.log.
Клик по пункту меню плагина открывает окно статуса: зелёный
● Running on 127.0.0.1:5005 / серый ○ Stopped, кнопка Start/Stop и живой
лог — каждый запрос с результатом и таймингом, например
[14:23:05] simulate — ok (1840 ms).
Сборка и установка плагина (скрипты)
Нужно: Visual Studio 2022 (MSVC C++), CMake ≥ 3.20, Qt 5.15.x msvc2019_64
(CLO 7.3.240 несёт Qt 5.15.2 — точное совпадение) и CLO SDK
(CLO_SDK_v7.3.240_WIN.zip с developer.clo3d.com → API/SDK Download).
cd clo_plugin
.\build.ps1 -SdkDir C:\путь\к\CLO_SDK_v7.3.240 # добавь -QtDir C:\Qt\5.15.2\msvc2019_64, если Qt в другом месте
.\install.ps1 # копирует DLL в папку API_Plug_in CLObuild.ps1конфигурирует CMake (VS 2022, x64, Release) и собирает DLL. С ключом-StubOnlyсоберётclo_mcp_test.exe— заглушку с полным протоколом без SDK, чтобы проверить связку хост ↔ сервер заранее.install.ps1кладёт DLL вC:\Users\Public\Documents\CLO\Assets\Preferences\API_Plug_in\. CLO перечитывает DLL при каждом клике по меню, так что перезапуск не нужен — кроме случая, когда листенер сейчас запущен (DLL запинена): тогда закрой CLO и повтори, либо.\install.ps1 -WaitForClose— скопирует сам, как только CLO закроется.uninstall.ps1удаляет DLL (CLO нужно закрыть).
Если выполнение скриптов запрещено политикой:
powershell -ExecutionPolicy Bypass -File .\build.ps1 …
cd clo_plugin
cmake -S . -B build-msvc -G "Visual Studio 17 2022" -A x64 `
-DCLO_SDK_DIR=C:/путь/к/CLO_SDK_v7.3.240 `
-DCMAKE_PREFIX_PATH=C:/Qt/5.15.2/msvc2019_64
cmake --build build-msvc --config Release # только Release - Debug CLO не загрузит
# затем скопируй build-msvc/Release/clo_mcp_plugin.dll
# -> C:\Users\Public\Documents\CLO\Assets\Preferences\API_Plug_in\Использование
В CLO: Settings → Plug-in → «MCP Listener (start / stop)» — откроется окно статуса, листенер сам стартует на
127.0.0.1:5005.Всё — CLO остаётся отзывчивым, пока Claude работает.
Python-листенер (запасной, блокирующий на CLO 7)
В CLO: Main Menu → Edit → Python Script → Run Python Script →
clo_addon/clo_mcp_listener.py.На CLO 7 он напишет
blocking main-thread mode— UI CLO занят, пока идёт работа; чтобы вернуть управление, попроси Claude вызватьclo_shutdown.
Подключение MCP-сервера (на хосте)
git clone https://github.com/Lilbonner/clo3d-mcp.git
cd clo3d-mcp && pip install -e .Claude Code: claude mcp add clo3d -- python -m clo_mcp.server
Claude Desktop (claude_desktop_config.json):
{ "mcpServers": { "clo3d": { "command": "python", "args": ["-m", "clo_mcp.server"] } } }Проверка: скажи Claude «вызови clo_ping» → CLO listener is up. значит вся
цепочка работает. Дальше обычным языком: «импортируй C:/work/dress.zprj и
просимулируй 80 кадров».
Инструменты
Инструмент | Что делает |
| проверить, что листенер доступен |
| открыть |
| число лекал в сцене |
| прогнать симуляцию ткани |
| работа с тканями |
| работа с colorway |
| рендер, возвращает пути PNG |
| сохранить сцену в |
| остановить листенер (в блокирующем режиме вернёт UI) |
Совет: чтобы одеть аватара — сначала импортируй .avt, затем .zpac-гармент
с точками расстановки (например, библиотечный Male_T-shirt.zpac из ассетов
CLO), затем simulate. (auto_hang в C++ API SDK v4.3.4 не экспонирован.)
Настройка
Одинаковые значения с обеих сторон (env хоста и CLO):
CLO_MCP_HOST (по умолчанию 127.0.0.1), CLO_MCP_PORT (5005),
CLO_MCP_TIMEOUT (600 сек — симуляция и рендер бывают долгими).
Траблшутинг
Симптом | Причина / решение |
| CLO не открыт, листенер не запущен (окно статуса: |
Пункта меню плагина нет | DLL не в |
Клик по меню «ничего не делает» | Смотри |
UI CLO не реагирует | Python-режим: ожидаемо, вызови |
Команда зависает | Долгая симуляция/рендер — увеличь |
Статус
Проверено end-to-end на CLO 7.3.240 с нативным плагином: ping → импорт →
pattern_count → simulate → экспорт (реальный .zprj на диске) → рендер
(реальный PNG), включая добавление аватара и его одевание. Лог валидации — в
AUDIT.md, внутренности плагина — в clo_plugin/README.md.
Available Tools
14 toolsadd_fabricC
Add a .zfab fabric to the project. Returns its fabric index.
Inputs: path (required). Returns: result
assign_fabricC
Assign an existing fabric to a pattern piece.
Inputs: fabric_index (required), pattern_index (required). Returns: result
auto_hangC
Auto-hang a garment on a hanger. bottom=True uses bottom hangers.
Inputs: garment (required), hanger (required), bottom. Returns: result
clo_pingA
Check that CLO is open and the listener is reachable.
Inputs: no named parameters. Returns: result
clo_shutdownA
Stop the in-CLO listener and hand control back to CLO's UI.
Needed for the blocking main-thread mode CLO uses when no Qt binding is available: the listener occupies CLO until this is called.
Inputs: no named parameters. Returns: result
copy_colorwayB
Duplicate a colorway. Returns the new colorway index.
Inputs: index. Returns: result
export_zprjC
Save the current scene as a .zprj project file.
Inputs: path (required). Returns: result
import_avatarC
Import an avatar file into the scene.
Inputs: path (required), options. Returns: result
import_projectA
Open a CLO project or garment file (.zprj/.zpac/.avt) into the scene.
Inputs: path (required). Returns: result
pattern_countA
Return the number of pattern pieces in the current scene.
Inputs: no named parameters. Returns: result
render_imageB
Render the current scene to image(s). Returns the saved file path(s).
Inputs: no named parameters. Returns: result
set_colorwayC
Make a colorway current, optionally renaming it.
Inputs: index (required), name. Returns: result
set_fabric_colorB
Set a fabric's PBR base color (0..1 floats) for a colorway/face.
Inputs: fabric_index (required), r (required), g (required), b (required), +3 more. Returns: result
simulateA
Run cloth simulation for the given number of frames.
Inputs: frames. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a distinct operation with no overlap. For example, add_fabric imports a new fabric while assign_fabric attaches an existing fabric to a pattern piece. Similarly, clo_ping and clo_shutdown serve different roles in connection management.
Most tools follow a verb_noun pattern (e.g., add_fabric, export_zprj, set_colorway), but pattern_count uses noun_verb, and clo_ping/clo_shutdown use a clo_ prefix, introducing minor inconsistency.
With 14 tools, the server covers the major aspects of CLO interaction (file I/O, fabric, colorway, simulation, rendering, connection) without being overly granular or sparse.
The tool set covers core workflows but has notable gaps: no pattern creation/modification, no deletion of resources, and no scene inspection beyond pattern count. This limits some agent-driven tasks.
Maintenance
Related MCP Connectors
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Dreamship's official print on demand MCP server. Ask your AI assistant to create products with mockups from your artwork and publish them to Shopify, Etsy, WooCommerce, BigCommerce, TikTok Shop and Walmart, check what an order costs shipped to your customer, search the catalog's colors, sizes and stock, draft orders, track every order and shipment, and export your data. Drafts wait for you to review, submit and pay on Dreamship: the connector can't submit or cancel an order, charge your account, or delete anything. With coding agents like Claude Code and Codex it works in bulk, turning a folder of artwork and a spreadsheet into products, or a spreadsheet of orders into an Order Import file. Free on every Dreamship plan. Works with ChatGPT, Claude, Gemini, Grok, Perplexity, Claude Code and Codex.
Work with your DealSharp negotiation projects, documents and tools from Claude.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to control CLO3D for pattern creation, fabric swapping, simulation, and model export via natural language commands.50MIT
- AlicenseCqualityCmaintenanceEnables an AI assistant to interact with CLO3D projects, including inspecting scenes, editing patterns, sewing, changing fabrics, simulating, taking snapshots, and saving checkpoints.481MIT
- AlicenseBqualityBmaintenanceEnables controlling CLO3D from any MCP client to inspect projects, create and edit patterns, manage fabrics and colorways, run simulations, and export models through chat.1042MIT
- FlicenseNot gradedqualityAmaintenanceEnables Claude to drive a 3D modeling application through natural-language prompts for scene creation, object modification, materials, lighting, animation, MoGraph, dynamics, and rendering.-