Skip to main content
Glama
Axel-Jalonen

lego-mcp

by Axel-Jalonen

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LEGO_MCP_HOMENoOptional path to a directory for storing build files. If not set, defaults to the repo's builds/ directory or ~/.lego-mcp/builds.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
new_buildA

Start a fresh build on an empty baseplate of width x depth studs. Replaces the current build (previous one stays saved on disk).

list_partsA

List every part in the catalog (the ONLY placeable pieces) and all colors. Sizes are studs; height is in plates (brick=3, plate/tile=1). Tiles have smooth tops. Slopes have studs only on their non-sloped rows (at rotation 0 the slope descends toward +y; rotate 90/180/270 to face it). Baseplates have studs on top, nothing underneath, and only go at z=0.

place_brickA

Place a part with its minimum-x,y corner at stud (x,y), bottom at plate height z (z=0 on the ground; on top of a brick placed at z=0 means z=3). rotation is 0, 90, 180 or 270 (90/270 swap the footprint; slopes descend toward +y at 0 and rotate with the piece). Fails with an explanation if the placement collides, floats, or leaves the build area.

remove_brickA

Remove a piece by id. Refused if other pieces would be left floating.

get_buildA

Current build state: piece list with positions, inventory, dimensions.

view_layersA

Top-down ASCII map of each plate layer (pieces shown by id, '.' empty). Optionally limit to plate range [z_from, z_to).

load_buildA

Load a previously saved build by name (see saved .json files in builds/). The save is re-validated piece by piece on load.

export_buildA

Export the build. fmt='ldraw' writes builds/.ldr (openable in BrickLink Studio / LeoCAD); fmt='blender' writes builds/_blender.py, a bpy script that constructs the model in Blender.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 8 tools

Disambiguation5/5

Each tool has a clearly distinct purpose and target action: export, get, list, load, new, place, remove, view. No overlap or ambiguity among them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case, such as export_build, list_parts, place_brick, making them predictable and easy to understand.

Tool Count5/5

With 8 tools, the server is well-scoped for a LEGO building assistant, covering essential operations without being overly complex or sparse.

Completeness4/5

The tool set covers core building workflows (create, read, delete, export) but lacks an update tool for bricks (e.g., reposition) and a way to list saved builds, requiring minor workarounds.

Maintenance

ActivityInactive
ResponsivenessNo issues