ldraw-mcp
This server provides MCP tools to render LDraw LEGO models into high-quality, photorealistic PNG images using headless Blender with the ImportLDraw addon. It also includes a diagnostic tool to verify the rendering setup.
render_ldraw_file: Render a local .ldr/.mpd/.dat file to a PNG image. Supports multi-view stitching based on specified azimuth angles.
render_ldraw_text: Render LDraw content provided as a string directly to a PNG image.
check_renderer: Checks whether the rendering stack (Blender, ImportLDraw, parts library) is available and explains any missing requirements.
All render tools allow customization of view angles (azimuths), image resolution, and render quality (samples).
Renders LDraw models (.ldr/.mpd/.dat) to images using headless Blender with real part geometry, enabling visual inspection of LEGO builds.
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., "@ldraw-mcprender output/build.ldr and tell me what looks wrong"
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.
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.
A ~90-line .ldr rendered front-left and rear-right — actual bricks, not a geometric proxy.
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
# 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-mcpThen 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); it is not installed by
ldraw-mcp-setup.
Related MCP server: DeepSlate MCP
Tools
tool | what it does |
| Render a model file to a PNG (multi-view, stitched side by side) |
| Render inline LDraw content without writing a file first |
| 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 pointLDRAW_MCP_BLENDERat the binary. Install it yourself (package manager, blender.org, or a local build);ldraw-mcp-setupdoes not install Blender.ImportLDraw addon (
io_scene_importldraw) in Blender's addons dir — installed byldraw-mcp-setup.LDraw parts library at
~/.ldraw(orLDRAW_LIBRARY_PATH) — installed byldraw-mcp-setup.
Environment variables
var | meaning |
| Path to the blender binary (overrides |
| Set to |
| Path to the LDraw parts library (community convention) |
Manual setup
If ldraw-mcp-setup can't detect things automatically:
LDraw library: download complete.zip and unzip so that
~/.ldraw/parts/exists.ImportLDraw addon: download the latest release from TobyLobster/ImportLDraw 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_renderersays NOT FOUND: runldraw-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_importldrawin 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.
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.
Available Tools
3 toolscheck_rendererA
Report whether the LDraw rendering stack is available and why not.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It clearly indicates the tool reports availability and reasons for unavailability, which is transparent for a simple check tool. No missing behavioral context like side effects or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no wasted words, front-loaded with the core action 'Report whether the LDraw rendering stack is available and why not.'
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple parameterless tool with an output schema, the description is mostly adequate. It could elaborate on what 'available' means, but the output schema likely covers the response format.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters with 100% schema description coverage (empty schema). Baseline is 4; description needs no additional parameter information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a clear verb 'report' and specific resource 'LDraw rendering stack availability'. It distinguishes from sibling tools render_ldraw_file and render_ldraw_text, which perform rendering rather than status checking.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies diagnostic usage ('and why not') but does not explicitly state when to use this tool (e.g., before rendering) or when not to. No alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
render_ldraw_fileA
Render an LDraw model file (.ldr/.mpd/.dat) to a PNG image.
Views are rendered at each comma-separated azimuth (degrees) and stitched side by side. Higher samples = cleaner but slower.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| samples | No | ||
| azimuths | No | -60,120 | |
| resolution | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses rendering to PNG, azimuth stitching, and sample trade-off. With no annotations, description carries full burden; missing details on side effects (overwrites?), output destination (file or return?), and error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no unnecessary words. Front-loaded with purpose, then key behavioral notes.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers core functionality for a rendering tool with 4 params, required path. Lacks explanation of output format (PNG returned or saved?), error handling, or file size limits. Moderate completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must add meaning. Explains azimuths as comma-separated degrees and samples effect, but path and resolution (default 640, units?) lack explanation beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb (render), resource (LDraw model file with extensions .ldr/.mpd/.dat), and output (PNG image). Distinct from siblings: render_ldraw_text likely renders text, check_renderer is a check tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage by describing parameters (path, samples, azimuths, resolution) and behavior (stitching azimuths, samples vs quality). But lacks explicit guidance on when to use this vs siblings or when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
render_ldraw_textB
Render inline LDraw content (the text of a .ldr file) to a PNG.
Useful for quick experiments without writing a file first.
| Name | Required | Description | Default |
|---|---|---|---|
| ldr | Yes | ||
| samples | No | ||
| azimuths | No | -60,120 | |
| resolution | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It mentions rendering to PNG but does not disclose any behavioral traits such as side effects, auth needs, or error handling. For a rendering tool, this is minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no fluff. Efficiently communicates the core purpose and use case.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters, no output schema, and no annotations, the description is too minimal. It fails to explain parameter semantics, return value format, or any constraints, leaving an agent under-informed for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must add meaning. The description does not explain any parameters (ldr, samples, azimuths, resolution) beyond their names, leaving the agent without guidance on valid values or formats.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Render inline LDraw content ... to a PNG' with a specific verb and resource, and distinguishes from sibling tools (render_ldraw_file) by noting 'without writing a file first'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides context: 'Useful for quick experiments without writing a file first', which indicates when to use this tool over alternatives (render_ldraw_file). However, it lacks explicit when-not or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.2- First observed
check_renderer - First observed
render_ldraw_file - First observed
render_ldraw_text
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: checking renderer availability, rendering from a file, and rendering from inline text. No overlap or ambiguity.
All tools follow a consistent 'verb_noun' pattern (check_renderer, render_ldraw_file, render_ldraw_text), making them predictable.
With only 3 tools, the set is minimal but appropriate for a focused rendering server. It could benefit from additional utilities like listing supported formats, but the count is reasonable.
The set covers the core rendering workflow (check availability, render from file or text). Minor gaps exist, such as no way to cancel or monitor rendering progress, but overall it feels complete for its stated purpose.
Maintenance
Related MCP Connectors
Cloud Blender for AI agents: scenes, assets, renders, MP4, STL, GLB — over hosted remote MCP.
Generate authentic pixel art - sprites, animations, and tilesets - from any MCP client
Create, edit, render, save, and export voxel models with interactive 3D previews.
Generate game-ready 3D models, textures, and audio from natural language, over MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI assistants like Codex or ChatGPT to inspect and control a local Blender scene, including creating objects, editing materials, setting cameras and lights, rendering previews, and saving safe copies of .blend files.MIT
- FlicenseNot gradedqualityBmaintenanceAn MCP server that renders Minecraft structure files (NBT / Sponge schematic / Litematic) into PNG preview images using vanilla Minecraft resources.-
- FlicenseAqualityCmaintenanceA headless-first Model Context Protocol server for safe, deterministic Blender automation, exposing typed tools to inspect scenes and render previews without arbitrary command execution.3-
- AlicenseBqualityCmaintenanceAn MCP server that builds and modifies Blender .blend files, supporting both headless generation and live interaction with an open Blender window.16MIT