structuresynth-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., "@structuresynth-mcp render a recursive box spiral EisenScript grammar to OBJ and report mesh stats"
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.
structuresynth-mcp
MCP (Model Context Protocol) server for Structure Synth — generate 3D meshes from EisenScript grammars, headlessly.
Give an LLM agent a tool to write procedural 3D structure grammars and get back real geometry (Wavefront OBJ) with mesh statistics, ready for viewing, 3D printing, or further processing.
What it does
Tool | Description |
| Run an EisenScript grammar → |
| Render + return a PNG preview (matplotlib Agg, CPU only). |
| PNG preview of an existing OBJ. |
| Parse-check a grammar without keeping geometry. |
| Linter: braces, unknown actions, unsupported primitives, recursion without |
| Embedded EisenScript cheat sheet (primitives, transformations, modifiers). |
| Convert OBJ → |
| Batch-render every bundled example to OBJ (+ PNG). |
| Import an OBJ into a running Unreal editor (TCP bridge, port 55557). |
| Browse bundled example grammars. |
| Fetch the full source of an example. |
| Locate the render engine binary / install hint. |
Rendering is powered by libssynth
(ssynthgen), a modernized, Qt-light port of Structure Synth's engine that
exports OBJ from the command line. This MCP server is a thin Python wrapper.
Patched engine: the recommended ssynthgen build includes small patches
(upstream-able) that give parse errors real line numbers, exit code 1 instead
of SIGABRT, and color-group OBJ output (usemtl #rrggbb groups, converted to
.mtl by this server). Build instructions below.
Related MCP server: nexus3d
Requirements
Python ≥ 3.10 and
uv(or pip).ssynthgen— build once from libssynth:git clone https://github.com/jcelerier/libssynth.git cmake -S libssynth -B libssynth/build -DCMAKE_BUILD_TYPE=Release cmake --build libssynth/build -j # put it somewhere on your PATH, e.g.: cp libssynth/build/ssynthgen ~/.local/bin/Dependencies: CMake ≥ 3.13, a C++20 compiler, Qt5 (Core/Gui/Xml), Boost headers, fmt.
If
ssynthgenis not onPATH, point the server at it:export SSYNTHGEN_PATH=/path/to/ssynthgen
Install
git clone https://github.com/Astrid3333/structuresynth-mcp.git
cd structuresynth-mcp
uv sync # core
uv sync --extra export # + matplotlib/trimesh for preview, STL/glTF exportRun
uv run structuresynth-mcp # stdio MCP serverUse with an MCP client
Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"structuresynth": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/structuresynth-mcp", "run", "structuresynth-mcp"],
"env": {
"SSYNTHGEN_PATH": "/home/you/.local/bin/ssynthgen"
}
}
}
}opencode
opencode mcp add structuresynth -- uv --directory /absolute/path/to/structuresynth-mcp run structuresynth-mcpEisenScript in 30 seconds
set maxdepth 40
set seed 42
r1
rule r1 maxdepth 10 {
{ x 1 ry 10 } r1
{ y 1 hue 20 } r1
box
}Rules call each other; transformations in { } modify the state; primitives
(box, sphere, cylinder, tube, grid, line, point, circle, cone,
torus, helix, …) draw geometry. See the
official EisenScript reference
and the bundled examples.
Limits
The bundled engine (
libssynth) covers the core language; a few exotic original examples (e.g.Konstrukt.es,Thingy.es) use primitives or features it does not implement (torus, cone, helix, circle, point, tube).Parse errors report
(line N)when using the patchedssynthgenbuild; the stock upstream build aborts with a generic message.preview_*uses matplotlib's software renderer — fine for previews, not ray-traced quality; previews are skipped for meshes above 50k faces.JavaScript animation scripting of the original GUI app is out of scope.
License
MIT for this MCP server. libssynth and Structure Synth are LGPL; bundled
.es example scripts are from the official Structure Synth distribution —
see src/structuresynth_mcp/examples/ATTRIBUTION.md.
Credits
Structure Synth by Mikael Hvidtfeldt Christensen (Syntopia).
libssynth by Jérémie / contributors — headless engine.
Available Tools
12 toolsanalyze_scriptA
Lint an EisenScript without running it.
Detects: unbalanced braces, unknown actions, primitives unsupported by this backend (torus/cone/tube/helix/circle/point), recursion cycles with no maxdepth (timeout risk), unused rules. Returns a human-readable report.
Inputs: script (required). Returns: result
eisenscript_referenceA
EisenScript language cheat sheet: primitives, transformations, modifiers, preprocessor, and timeout-avoidance tips (libssynth backend).
Inputs: no named parameters. Returns: result
engine_statusA
Report the path of the ssynthgen engine binary, or install help if missing.
Inputs: no named parameters. Returns: result
export_mesh_toolA
Convert a rendered OBJ to another mesh format (stl, glb, gltf, ply, off).
Requires the optional dependency trimesh (uv add trimesh).
Inputs: obj_path (required), format, output_path. Returns: result
get_exampleA
Return the full EisenScript source of a bundled example by name.
Inputs: name (required). Returns: result
list_examplesB
List bundled EisenScript examples with short descriptions.
Inputs: no named parameters. Returns: result
preview_objA
Render an existing OBJ file to a PNG preview (matplotlib Agg, CPU only).
Inputs: obj_path (required), output_path. Returns: result
preview_scriptB
Render an EisenScript and return a PNG preview image path (plus the OBJ).
Uses matplotlib Agg (CPU only, no GPU). Group colors from the grammar are preserved when present.
Inputs: script (required), seed, timeout, output_path. Returns: result
render_galleryA
Batch-render every bundled example to OBJ (+ PNG) in a directory.
Useful for building a visual gallery or checking regressions.
Inputs: out_dir (required), seed, timeout, with_preview. Returns: result
render_scriptA
Render EisenScript to a Wavefront OBJ mesh.
Args:
script: Full EisenScript source (rules, primitives, transformations).
output_path: Where to write the .obj. Empty = temp file under the
system temp dir (path is returned).
seed: Optional RNG seed; injected as set seed N for reproducibility.
timeout: Seconds before aborting a runaway script.
Returns a summary: OBJ path, vertex/face counts, bounding box.
Inputs: script (required), seed, timeout, output_path. Returns: result
send_to_unrealA
Import a rendered OBJ into a running Unreal Engine editor via TCP bridge.
Requires Unreal running with the MCP plugin listening on 127.0.0.1:55557. The asset lands in the content browser at dest_path (default /Game/Imported).
Inputs: obj_path (required), name, replace, dest_path. Returns: result
validate_scriptB
Check an EisenScript for syntax/parse errors without keeping geometry.
Returns 'OK' or an error message.
Inputs: script (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target clear, distinct pipeline stages (validate → analyze → render → preview → export → import). The closest overlap is validate_script vs analyze_script and preview_script vs render_script, but the descriptions explicitly distinguish them (syntax errors vs lint report; PNG preview vs OBJ output).
The set largely follows a snake_case verb_noun pattern (preview_script, render_script, get_example, list_examples, validate_script). A few deviate: engine_status and eisenscript_reference are noun-first, and export_mesh_tool appends a redundant '_tool' suffix.
Twelve tools is well within the sweet spot and every tool maps to a distinct step in the EisenScript workflow, with no obvious filler. Setup, authoring, validation, rendering, and output tools each earn their place.
The lifecycle is well covered: discovery (list/get examples, reference), authoring support (validate/analyze), rendering (render/preview/gallery), and output (export_mesh_tool, send_to_unreal). Minor gaps: no tool to inspect existing OBJ stats or manage/clean up rendered temp files, which agents must work around manually.
Maintenance
Related MCP Connectors
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
3D avatar/asset foundry: text/image -> rigged, validated, engine-ready GLB via x402.
Blender-as-a-service for agents: search 3D assets, run Blender Python, or brief the studio agent.
A browser 3D CAD for your AI: it scripts real-size models, uCAD builds them and returns pictures.
Related MCP Servers
- AlicenseAqualityBmaintenanceRenders PNG previews and STL geometry from OpenSCAD source code, enabling iterative agent-driven CAD workflows.2163 npm8MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to procedurally generate, transform, inspect, and export 3D meshes and scenes through MCP tools.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to model, sculpt, rig, animate and bake particle effects by editing a semantic scene document, with built-in software rendering, measurable critics that flag floating or broken geometry, and game-ready glTF export. It exposes templates, atomic edit batches, motion and effect previews, undo history, and no GPU, browser, or Blender required.15 npmApache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables agents and Blender users to generate game-ready art through a set of Blender tools covering concept image generation, image-to-3D mesh creation, mesh cleanup, PBR material assignment, greybox level layout, camera pathing and still or sequence rendering. Every action runs headless Blender, returns machine-readable JSON with pass/fail self-checks such as triangle budget, scale, pivot and clearance, so agents can verify and fix each step unattended.MIT