Skip to main content
Glama

img2threejs-mcp

A bounded MCP pipeline for reconstructing a reference image as procedural 3D geometry. It adapts the staged workflow of hoainho/img2threejs, but deliberately exposes no shell, caller paths, downloads, arbitrary TypeScript, or unrestricted code execution.

Pipeline

reference → asset transaction → locked build pass → preview/comparison → visual review → GLB export

Each accepted scene specification generates:

  • normalized spec.json

  • editable createModel.ts Three.js factory

  • deterministic preview.png

  • side-by-side comparison.png

  • Unity-compatible glTF 2.0 asset.glb

  • SHA-256 manifest and immutable export package

Related MCP server: trident-mcp

MCP tools

Call img2threejs_policy, create an asset, validate each pass before building it, inspect the comparison image, review the pass, and export only after validation.

The service listens only on 127.0.0.1:10851/mcp.

Local verification

.venv\Scripts\python.exe -m unittest discover -s tests -v
.venv\Scripts\python.exe scripts\smoke_test.py

See docs/SCENE_SPEC.md and THIRD_PARTY_NOTICES.md.

Related MCP Connectors

Related MCP Servers