Skip to main content
ClaudeWave

MCP server that renders LDraw/LEGO models to images with real part geometry (studs, glass, tires) via headless Blender + ImportLDraw — gives vision-capable models eyes for brick builds.

MCP ServersOfficial Registry1 stars0 forksPythonMITUpdated today
Install in Claude Code / Claude Desktop
Method: pip / Python · ldraw-mcp
Claude Code CLI
claude mcp add ldraw-mcp -- python -m ldraw-mcp
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "ldraw-mcp": {
      "command": "python",
      "args": ["-m", "ldraw-mcp"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Install first: pip install ldraw-mcp
Use cases

MCP Servers overview

<div align="center">

# ldraw-mcp

**Give your MCP client eyes for LEGO® models.**

Render LDraw files (`.ldr` / `.mpd` / `.dat`) to images with *real part
geometry* — studs, slopes, window glass — using headless Blender and the
ImportLDraw addon. The output looks like a BrickLink Stud.io render, with no
GUI anywhere in the loop.

[![PyPI](https://img.shields.io/pypi/v/ldraw-mcp?color=%230a7bbb&label=PyPI)](https://pypi.org/project/ldraw-mcp/)
[![Python](https://img.shields.io/pypi/pyversions/ldraw-mcp)](https://pypi.org/project/ldraw-mcp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
[![MCP](https://img.shields.io/badge/MCP-server-8A2BE2.svg)](https://modelcontextprotocol.io)
[![CI](https://github.com/musharna/ldraw-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/musharna/ldraw-mcp/actions/workflows/ci.yml)

<img src="docs/hero.png" alt="Two rendered views of a red LEGO car — real studs, transparent glass, rubber tires, steering wheel" width="100%">

<sub>A ~90-line <code>.ldr</code> rendered front-left and rear-right — actual bricks, not a geometric proxy.</sub>

</div>

<!-- mcp-name: io.github.musharna/ldraw-mcp -->

---

Point a vision-capable model at a build and it sees the actual bricks:
crossed rotation matrices, floating plates, sunken windows — the kinds of
export bugs a geometric proxy render will happily hide.

## Quickstart

```bash
# 1. install
pip install ldraw-mcp

# 2. install the LDraw parts library + ImportLDraw addon
ldraw-mcp-setup

# 3. register with Claude Code
claude mcp add ldraw -- ldraw-mcp
```

Then ask things like *"render output/build.ldr and tell me what looks
wrong"* — the model sees the render, not just the text.

> **Blender is a prerequisite** (see [Requirements](#requirements)); it is
> not installed by `ldraw-mcp-setup`.

## Tools

| tool | what it does |
|---|---|
| `render_ldraw_file(path, azimuths="-60,120", resolution=640, samples=24)` | Render a model file to a PNG (multi-view, stitched side by side) |
| `render_ldraw_text(ldr, azimuths="-60,120", resolution=640, samples=24)` | Render inline LDraw content without writing a file first |
| `check_renderer()` | Diagnose the Blender / addon / parts-library setup |

`azimuths` is a comma-separated list of view angles in degrees; each is
rendered and the views are stitched horizontally. Elevation is fixed at
22°. Higher `samples` = cleaner but slower.

## Requirements

- **Blender 4.x** on `PATH`, or point `LDRAW_MCP_BLENDER` at the binary.
  Install it yourself (package manager, blender.org, or a local build);
  `ldraw-mcp-setup` does not install Blender.
- **ImportLDraw addon** (`io_scene_importldraw`) in Blender's addons dir —
  installed by `ldraw-mcp-setup`.
- **LDraw parts library** at `~/.ldraw` (or `LDRAW_LIBRARY_PATH`) —
  installed by `ldraw-mcp-setup`.

### Environment variables

| var | meaning |
|---|---|
| `LDRAW_MCP_BLENDER` | Path to the blender binary (overrides `PATH` lookup) |
| `LDRAW_MCP_DISABLE` | Set to `1` to force `is_available()` to `False` |
| `LDRAW_LIBRARY_PATH` | Path to the LDraw parts library (community convention) |

### Manual setup

If `ldraw-mcp-setup` can't detect things automatically:

- **LDraw library:** download
  [complete.zip](https://library.ldraw.org/library/updates/complete.zip)
  and unzip so that `~/.ldraw/parts/` exists.
- **ImportLDraw addon:** download the latest release from
  [TobyLobster/ImportLDraw](https://github.com/TobyLobster/ImportLDraw/releases)
  and install it via *Blender > Preferences > Add-ons > Install*, or unzip
  into `~/.config/blender/<version>/scripts/addons/io_scene_importldraw/`.
  (Launch Blender once first so the config directory exists.)

## Troubleshooting

- **`check_renderer` says NOT FOUND:** run `ldraw-mcp-setup`, or set the
  relevant env var above.
- **No GPU / WSL2 / containers:** rendering uses **Cycles on CPU**, which
  works headless everywhere — no GPU or display needed. A ~150-part model
  takes a few seconds at the default 640px / 24 samples.
- **"no mesh objects imported":** the addon couldn't resolve parts —
  usually a wrong or incomplete LDraw library path. Re-run setup or check
  `LDRAW_LIBRARY_PATH`.
- **Addon not enabled:** the render script enables it automatically per
  run; if a manual Blender session complains, enable `io_scene_importldraw`
  in Preferences > Add-ons.

## Provenance

This renderer was extracted from the **prompt2brick** project, where it
started life as the vision critic's "see the actual model" path.
prompt2brick keeps its own vendored copy of the render wrapper and Blender
script, but **this repo is the canonical source going forward** — fixes and
improvements to the renderer should land here first and be ported back into
prompt2brick.

## License

MIT — see [LICENSE](LICENSE).

---

<sub>LEGO® is a trademark of the LEGO Group, which does not sponsor,
authorize, or endorse this project. This tool is not affiliated with the
LEGO Group, BrickLink, or the LDraw.org organization.</sub>
3d-renderingblenderclaudeldrawlegomcpmodel-context-protocol

What people ask about ldraw-mcp

What is musharna/ldraw-mcp?

+

musharna/ldraw-mcp is mcp servers for the Claude AI ecosystem. MCP server that renders LDraw/LEGO models to images with real part geometry (studs, glass, tires) via headless Blender + ImportLDraw — gives vision-capable models eyes for brick builds. It has 1 GitHub stars and was last updated today.

How do I install ldraw-mcp?

+

You can install ldraw-mcp by cloning the repository (https://github.com/musharna/ldraw-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is musharna/ldraw-mcp safe to use?

+

musharna/ldraw-mcp has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.

Who maintains musharna/ldraw-mcp?

+

musharna/ldraw-mcp is maintained by musharna. The last recorded GitHub activity is from today, with 0 open issues.

Are there alternatives to ldraw-mcp?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy ldraw-mcp to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: musharna/ldraw-mcp
[![Featured on ClaudeWave](https://claudewave.com/api/badge/musharna-ldraw-mcp)](https://claudewave.com/repo/musharna-ldraw-mcp)
<a href="https://claudewave.com/repo/musharna-ldraw-mcp"><img src="https://claudewave.com/api/badge/musharna-ldraw-mcp" alt="Featured on ClaudeWave: musharna/ldraw-mcp" width="320" height="64" /></a>

More MCP Servers

ldraw-mcp alternatives