Marvelous Designer 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., "@Marvelous Designer MCP Simulate the current garment and report the mesh measurements."
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.
Marvelous Designer MCP
Connect Claude, Codex and other MCP-compatible agents to local Marvelous Designer through its Python API.
Quick Start
Requirements: Windows, Marvelous Designer 2026.0.315 with Python plug-ins, Python 3.10+ and pip or uv. Run MD and the MCP client as the same Windows user.
Install directly from GitHub (Git must be installed):
uv tool install git+https://github.com/Laboon2501/MarvelousDesigner-MCP.git # Alternative, in an activated Python environment: pip install git+https://github.com/Laboon2501/MarvelousDesigner-MCP.gitMake the installed Scripts directory available on your MCP client's PATH. A local clone is only needed for development.
Launch MD once to create settings, close MD, then run
md-mcp install-plugin. It prints the stable launcher path and registration result. If automatic registration cannot infer your menu language, follow the printed fallback: Plugins → Plug-in Manager → +ADD, select the printedmd_start_listener.py, choose the plug-in menu and confirm. Alternatively pass--menu "Plugins / Plug-in"(Chinese:--menu "插件 / 插件"). Use--config PATHfor a nonstandard pluginSettings.json.Start MD and click Plugins → Plug-in → md_start_listener (Chinese: 插件 → 插件 → md_start_listener). The launcher returns immediately. Run it again after restarting MD.
Run
md-mcp doctor. Build optional documentation search withmd-mcp update-docs.Configure your client below, reload MCP connections and request
tools/listandping.
Starting the external server alone is insufficient: the MD listener must be running.
Related MCP server: blender-ai-mcp
Client configuration
Codex config.toml (example):
[mcp_servers.marvelous-designer]
command = "md-mcp"
args = ["serve"]
startup_timeout_sec = 120
tool_timeout_sec = 660
[mcp_servers.marvelous-designer.env]
MD_MCP_TIMEOUT = "600"
PYTHONUTF8 = "1"Claude Code project .mcp.json (example):
{
"mcpServers": {
"marvelous-designer": {
"command": "md-mcp",
"args": ["serve"],
"env": {"MD_MCP_TIMEOUT": "600", "PYTHONUTF8": "1"}
}
}
}If a desktop client cannot find md-mcp, use the installed executable path reported by Get-Command md-mcp. Where supported, set client tool deadlines longer than the bridge timeout.
Features and architecture
42 tools cover scene inspection, patterns, stable topology, whole-edge sewing, fabric/materials, OBJ avatars, simulation and mesh measurements, checkpoints, import/export, documentation search, runtime inspection and raw Python.
Agent → MCP stdio → Marvelous Designer MCP Server
↓ localhost TCP
MD Python Bridge Plugin
↓
MD embedded Python APIThe mandatory bridge uses Windows SetTimer and nonblocking sockets. MD API calls execute serially on the GUI thread. The GUI responds between requests; synchronous API calls can pause it until completion. See GUI_FREEZE_FIX.md.
Compatibility
Environment | Status |
Windows, MD 2026.0.315, embedded Python 3.11.8 | Verified |
Other Windows MD versions | Unverified; inspect runtime APIs |
CLO | Not tested |
macOS/Linux MD bridge | Unsupported by the Windows timer implementation |
External Python 3.10+ | Package requirement; CI matrix 3.10/3.13; live results in report |
Doctor compares the running version with the verified version. A match does not prove every possible API or workflow is tested. For a custom registry use doctor --config PATH. See INSTALLATION_REPORT.md for validation coverage. Automatic registration against a real MD registry and startup from a newly registered menu still require independent verification.
Plugin, data and documentation
Default data directory: %LOCALAPPDATA%\marvelous-designer-mcp\. Set MD_MCP_DATA_DIR to an absolute directory before installing/running to override. The copied launcher remembers that installation's data directory for logs.
plugin/scripts/md_start_listener.py # stable registered launcher
plugin/md_addon/ # packaged bridge
operations/ # journals and MD completion receipts
checkpoints/ # ZPRJ and manifests
cache/simulation-samples/ # requested OBJ measurements
docs/html/ # personally downloaded official pages
docs/md-docs.sqlite3 # search index
logs/listener.logRuntime writes never target the package or clone. To upgrade: stop the listener, upgrade the package, rerun install-plugin, then start the listener. Close MD before automated registration changes to prevent MD overwriting them at exit. Registry changes are backed up beside pluginSettings.json and preserve unrelated entries.
Official documentation bodies are not distributed. md-mcp update-docs downloads seven HTTPS pages from developer.marvelousdesigner.com and builds a local SQLite FTS5 index. --offline rebuilds cached HTML. Missing docs do not prevent server startup or scene tools. Documentation tools explain how to build the missing index. Runtime availability remains authoritative when docs lag MD.
Variable | Default / meaning |
MD_MCP_DATA_DIR | User data directory above |
MD_MCP_DOCS_DB | Optional alternate docs database |
MD_MCP_HOST / MD_MCP_PORT | Client endpoint 127.0.0.1:7421; listener remains loopback on 7421 |
MD_MCP_TIMEOUT | 120 seconds; client examples use 600 |
MD_MCP_ALLOW_RAW_PYTHON | Enabled; 0/false/no/off refuse the raw MCP tool |
Security and safe operation
Connect trusted clients only. execute_python is not a sandbox: code can modify scenes and access files/process capabilities with MD's privileges. AST preflight is advisory. TCP is loopback-only but unauthenticated; other local processes can reach it. Disabling raw MCP execution is a client guard, not protection against direct TCP access. Semantic tools remain usable. See SECURITY.md.
Inspect the scene and obtain stable refs from get_pattern_topology before changes; never guess indices. Use docs/runtime inspection for unfamiliar APIs. Verify each mutation. Orchestrate complex tasks incrementally.
Timeout does not cancel execution. Mutations are UNKNOWN until reconciled: pass the returned operation_id to reconcile_operation, inspect scene/output and never blindly retry. FAILED may include partial effects.
Prefer checkpoints before destructive changes. create_checkpoint may affect the current project path depending on MD API behavior. Do not assume the path remains unchanged. Restore replaces the scene and invalidates refs. Checkpoints retain at least the newest 20; older entries exceeding seven days are eligible for cleanup. Save durable projects elsewhere.
Known limitations
Whole outer/internal straight/curved edge sewing is verified; partial/free sewing and sewing deletion are not exposed as verified operations.
pattern_arrangement controls arrangement parameters, not a verified world-space transform or Euler rotation. It replaces the pre-release pattern_placement name.
Stable point movement supports verified outer endpoints; arbitrary spline controls/internal points remain unverified. Re-query after STALE_REFERENCE.
Explicit OBJ avatar scale/axes/type=0 is verified; FBX/AVT avatar imports are unverified.
OBJ mesh measurements have conditional index correspondence, not persistent vertex IDs, convergence or collision judgments.
BACK/SIDE material edits unlink FRONT inheritance. Material faces differ from colorway assignment options.
Long native calls/modal dialogs can still occupy the GUI. No cancellation is provided.
Troubleshooting and uninstall
Symptom | Action |
Plugin absent | install-plugin; use manual fallback, refresh Plug-in Manager or restart MD |
Listener unavailable | Start MD and run md_start_listener; check logs/listener.log |
7421 occupied | Doctor checks for a valid listener; stop it before restarting, do not kill unrelated processes |
Version mismatch | Treat as unverified; inspect environment_info and inspect_md_api |
Docs missing | update-docs; check network access to the official site |
UNKNOWN timeout | Reconcile and inspect modal dialogs/scene/output before retry decisions |
Client sees old tools | Reload MCP connection after upgrading |
Stop via shutdown_listener or close MD, then run md-mcp uninstall-plugin. Only the exact owned registration is removed, with a backup. Edited/manual entries require removal in Plug-in Manager. Copied bridge files, logs, checkpoints and user projects are retained. Remove the client configuration and uninstall the package with your original installer. Delete retained data manually only after preserving wanted files.
Development
uv sync --frozen
uv run python -m unittest discover -s tests -v
uv buildSee DEVELOPMENT.md. GitHub Actions runs offline unit tests; live MD integration is manual/local only. Runtime guidance is delivered through MCP server instructions and tool descriptions. Repository agent instruction files are development aids.
License and acknowledgments
MIT License. Based on ysk424/marvelous-designer-mcp; the original copyright and license notice are retained. Enhancements are distributed under the same license. See NOTICE.
Marvelous Designer and its official documentation remain the property of their respective rights holders. This is an independent community project.
Available Tools
42 toolsassign_fabricA
Assign and verify. Legacy face is colorway option, NOT surface face: 1=current,2=all unlinked,3=all linked. Prefer assign_option. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: fabric_index (required), pattern_index (required), face, assign_option.
avatar_infoA
Read avatar count, names and runtime properties. Does not mutate the MD scene.
Inputs: no named parameters.
create_checkpointA
Save a unique ZPRJ checkpoint. Retain latest 20; older than 7 days are cleaned on creation. May affect the current project path depending on MD API behavior. Keep durable project saves outside this auto-cleaned cache. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: label (required).
create_patternA
Create [x_mm,y_mm,type] vertices: 0=straight,2=spline,3=Bezier. Verify resulting pattern. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: points (required), name.
create_sewingA
Prefer side_a/side_b edge refs for whole straight/curved/internal edges; optional ranges must be 0..1. Explicit boolean directions required. Legacy indices support straight outer edges. Only full-edge ranges [0,1] are supported; partial/free sewing is unverified. Obtain both refs from fresh topology. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: line_a, line_b, side_a, side_b, +4 more.
delete_patternA
Inspect, delete and verify count change. Remaining indices may shift. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: pattern_index (required).
environment_infoA
Runtime, MCP commit/version, documentation timestamp and connection health. Does not mutate the MD scene.
Inputs: no named parameters.
execute_pythonA
Execute reviewed Python; import API modules and assign result. Look up docs/runtime first. Static guard is not a sandbox; modal-risk calls require explicit override. Raw code can change the scene and access embedded Python filesystem/process capabilities. Not a sandbox. MD_MCP_ALLOW_RAW_PYTHON=0 refuses this tool. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: code (required), allow_potentially_modal.
export_fbxA
Export FBX with explicit runtime options; verify output. Requires a new absolute path; inspect runtime ExportFBXOption fields before choosing options. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: path (required), options (required).
export_objA
Export OBJ with explicit options, scale, axes and object selection; verify output. Requires a new absolute path; inspect runtime ExportOBJOption fields before choosing options. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: path (required), options (required).
export_projectA
Save ZPRJ with explicit path; API bool controls thumbnail creation. Requires a new absolute output path. ZPRJ save may change the active project path. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: path (required).
fabric_materialA
Read/set FRONT/BACK/SIDE RGBA (0..1). Setting BACK/SIDE unlinks material/color from FRONT. Verified MD 2026.0.315. Omit rgba to read. This face enum is distinct from fabric assignment colorway options. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: face (required), fabric_index (required), rgba.
get_md_docA
Exact API/type documentation, overloads, parameter meanings, returns and source. Does not mutate the MD scene. Requires local index: md-mcp update-docs. Documentation can lag the runtime.
Inputs: name (required).
get_md_scenarioA
Read one official scenario; adapt paths and review mutations before execution. Does not mutate the MD scene. Requires local index: md-mcp update-docs. Documentation can lag the runtime.
Inputs: name (required).
get_pattern_fabricA
Read actual pattern fabric assignment. Does not mutate the MD scene.
Inputs: pattern_index (required).
get_pattern_infoB
Inspect geometry and line indices before edits; ambiguous mappings are flagged. Does not mutate the MD scene.
Inputs: pattern_index (required).
get_pattern_pointsB
Point coordinates in mm and IDs; curve point mutation mapping is unverified. Does not mutate the MD scene.
Inputs: pattern_index (required).
get_pattern_topologyB
UUID + native point/line enumeration + geometry snapshot refs. Read again after STALE_REFERENCE; ambiguous mappings are never guessed. Select by UUID, unique name or freshly inspected index. Prefer returned stable refs for edits; curve controls are not movable native endpoints. Does not mutate the MD scene.
Inputs: pattern (required).
get_simulation_metricsA
On-demand garment OBJ positions and index-based displacement if connectivity/UUIDs match; never judges convergence. Writes an OBJ measurement in user cache. Compare to previous_snapshot_id only if topology matches; no persistent vertex IDs or collision/convergence guarantee. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: previous_snapshot_id.
import_avatarA
Import verified OBJ avatar using explicit scale/axes/type=0; AVT still needs modal acknowledgement. Use an existing absolute path and explicit scale/axis options. OBJ ImportObjectType=0 is verified; FBX/AVT avatar imports are unverified. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: path (required), options (required), acknowledge_modal_risk.
import_garmentA
Import .zpac using explicit ImportExportOption including bAdd; verify count. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: path (required), options (required).
import_projectA
Prefer .zprj plus explicit ImportZPRJOption (including bAppend). Legacy generic import requires modal-risk acknowledgement. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: path (required), options, allow_potentially_modal.
inspect_md_apiA
Runtime availability, callable/type/signature, docstring and pybind overloads without invoking functions. Does not mutate the MD scene.
Inputs: module (required), function.
inspect_sewingA
Read a sewing group; partial-edge/internal-shape line indices may be unresolved. Does not mutate the MD scene.
Inputs: group_index (required).
list_fabricsA
All object-browser fabrics plus current-colorway used count. Does not mutate the MD scene.
Inputs: no named parameters.
list_patternsA
Structured patterns with runtime indices, geometry, fabrics, placement and sewing groups. Does not mutate the MD scene.
Inputs: no named parameters.
list_sewingsC
Sewing groups, pattern/edge references, directions and raw properties. Does not mutate the MD scene.
Inputs: no named parameters.
md_apiC
List runtime symbols; inspect_md_api reads signatures safely without trial calls. Does not mutate the MD scene.
Inputs: module (required), contains.
move_pattern_pointA
Prefer point_ref for verified outer endpoints, including curved boundaries. Legacy numeric form supports straight polygons. Re-read after STALE_REFERENCE. x/y are 2D millimetres; obtain point_ref from get_pattern_topology. Geometry changes invalidate the old refs. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: x, y, point_ref, point_index, +1 more.
pattern_arrangementA
Read/set verified arrangement X/Y/offset parameters. Not absolute world translation or Euler rotation. Controls Marvelous Designer arrangement parameters, NOT a verified world-space transform. Omit arrangement_offsets to read; otherwise supply three integers. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: pattern_index (required), arrangement_offsets.
pingA
Verify the MD listener is reachable. Returns whatever the listener echoes back.
Inputs: no named parameters.
preflight_pythonA
Classify visible calls as safe, potentially modal, unsafe or unknown without execution. Does not mutate the MD scene.
Inputs: code (required).
project_infoA
Read active project and runtime state. Does not mutate the MD scene.
Inputs: no named parameters.
reconcile_operationA
Read durable MD completion receipt and output evidence; returns SUCCEEDED/FAILED/UNKNOWN and never retries. Pass the operation_id from the original call. FAILED can include partial effects; UNKNOWN needs scene/output inspection. Does not mutate the MD scene.
Inputs: operation_id (required).
restore_checkpointA
Replace active scene with a verified checkpoint and invalidate all topology refs. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: checkpoint_id (required).
save_projectA
Save a new ZPRJ checkpoint and verify file. Existing outputs are protected. Requires a new absolute output path. ZPRJ save may change the active project path. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: path (required).
scene_infoA
Project, MD/Python version, pattern and fabric counts. Does not mutate the MD scene.
Inputs: no named parameters.
search_md_docsA
Search local official MD docs with BM25; return signatures and sources. Does not mutate the MD scene. Requires local index: md-mcp update-docs. Documentation can lag the runtime.
Inputs: query (required), limit. Returns: result
search_md_scenariosA
Search official Pattern, Simulation, Animation and Substance scenarios. Does not mutate the MD scene. Requires local index: md-mcp update-docs. Documentation can lag the runtime.
Inputs: query (required), limit. Returns: result
shutdown_listenerA
Stop the MD listener and release its timer and TCP connections.
Inputs: no named parameters.
simulateA
Simulate steps (=frames) and verify synchronous success; does not claim convergence. May change scene or write files. Verify resulting state. A timed-out operation is UNKNOWN: reconcile_operation before any retry.
Inputs: steps.
simulation_stateA
Native quality, pattern and mesh counts; physical convergence/collision judgments are not exposed. Does not mutate the MD scene.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 42 tools
Several tools have overlapping purposes: save_project/export_project both save ZPRJ files with explicit paths, and list_patterns/get_pattern_info/get_pattern_points/get_pattern_topology all expose pattern geometry reads. The descriptions try to differentiate but the boundaries are subtle, which will cause misselection.
Names are consistently snake_case and mostly verb_noun, but read operations mix list/get/inspect/info (list_patterns, get_pattern_info, inspect_sewing, pattern_arrangement) and a few are bare nouns (ping, md_api, fabric_material). This is readable but not fully predictable.
42 tools is well into the 'too many' range for a single application server; many are highly specialized (pattern_arrangement, fabric_material, get_simulation_metrics) and several overlap. The set could be consolidated to ~20-25 tools without losing capability.
The surface covers the core domain well: pattern CRUD (create/read/move/delete), sewing create/read, fabric assignment, simulation, project import/export/checkpoint, plus docs and Python execution. Minor gaps exist (no sewing update/delete, no pattern update beyond point moves) but agents can work around them.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Connect AI clients to your Dactic work context through a hosted MCP service.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Connect AI agents to Flato's editable canvas runtime through a hosted MCP server.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects MCP-capable agents to Blender and OpenSCAD for AI-driven 3D modeling, with tools and rules optimized for FDM-printable geometry.2934 PyPI3MIT
- AlicenseNot gradedqualityDmaintenanceConnects MCP-compatible clients to a live Blender scene for AI-assisted 3D workflows, enabling inspection and controlled operations on objects, materials, cameras, lights, render settings, animation, UVs, Geometry Nodes, imports, exports, and Python execution.1MIT
- AlicenseAqualityCmaintenanceConnects MCP-aware AI clients to a live SketchUp session so users can create and modify 3D models, apply materials, perform booleans and joinery, and export scenes through natural-language prompts.22MIT
- 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