bricky-mcp

v0.1.0
bricky-mcp Checked 4 days ago Published 1 month ago

The MCP server for bricky, a compiler for LEGO® models, built for AI agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

build_model

Run a build script, save its model, check it and render it. The script runs as ordinary Python with the user's permissions, in its own process with a time limit; that process is not a sandbox.

ParameterTypeDescription
script *stringPython file defining build(), which returns a ModelBuilder or a Model.
checkbooleanCheck the model after building it.
errorarrayRules to report as errors, such as 'overloaded-studs', or 'all' for every rule; overrides the configured levels.
ignorearrayRules to leave out, such as 'unbalanced-group', or 'all' for every rule; overrides the configured levels.
max_diagnosticsMaximum diagnostics to return; defaults to the configured cap.
outputWhere to save the model; defaults to <script>.bricky.json.
renderbooleanRender the model after checking it.
viewsarrayViews to render: sheet (perspective, front, right and top on one image), perspective (from the south-east), perspective-south-west, perspective-north-west, perspective-north-east, front, back, left, r…
warnarrayRules to report as warnings, such as 'strained-studs', or 'all' for every rule; overrides the configured levels.

render_model

Render images of a model file.

ParameterTypeDescription
model *stringPath to a .bricky.json model file.
checkbooleanMark the elements that diagnostics name.
cliparrayClip the model to look inside: 'z<130' keeps what lies below 130 plates; x and y are in studs.
errorarrayRules to report as errors, such as 'overloaded-studs', or 'all' for every rule; overrides the configured levels.
heightintegerImage height in pixels.
highlightarrayElements to highlight, rendering the rest faintly: uid patterns such as 'sign*', or '@' and a function, file or file:line of the build script, such as '@roof'.
htmlbooleanAlso write a standalone HTML viewer to orbit, inspect and build step by step, highlighted like the images, with the model's exports.
ignorearrayRules to leave out, such as 'unbalanced-group', or 'all' for every rule; overrides the configured levels.
outputImage file to write; with several views, each file name gets the view's name added. Defaults to <model>.<view>.png beside the model, so renders keep the sheet a build rendered.
viewsarrayViews to render: sheet (perspective, front, right and top on one image), perspective (from the south-east), perspective-south-west, perspective-north-west, perspective-north-east, front, back, left, r…
warnarrayRules to report as warnings, such as 'strained-studs', or 'all' for every rule; overrides the configured levels.
widthintegerImage width in pixels.

check_model

Check a model file and report diagnostics.

ParameterTypeDescription
model *stringPath to a .bricky.json model file.
errorarrayRules to report as errors, such as 'overloaded-studs', or 'all' for every rule; overrides the configured levels.
ignorearrayRules to leave out, such as 'unbalanced-group', or 'all' for every rule; overrides the configured levels.
max_diagnosticsMaximum diagnostics to return; defaults to the configured cap.
warnarrayRules to report as warnings, such as 'strained-studs', or 'all' for every rule; overrides the configured levels.

write_instructions

Write building instructions: a page that shows a model's steps in 3D.

ParameterTypeDescription
model *stringPath to a .bricky.json model file.
elements_per_stepintegerHow many elements a step adds at most.
outputHTML file to write; defaults to <model>.instructions.html beside the model.

export_model

Export a model file for another tool, such as a BrickLink Wanted List.

ParameterTypeDescription
model *stringPath to a .bricky.json model file.
formatFile format: wanted-list (a BrickLink Wanted List, to buy the parts on BrickLink).
outputFile to write; defaults to the model's name and the format's suffix, such as <model>.wanted.xml, beside the model.

search_parts

Search the parts catalog.

ParameterTypeDescription
limitintegerMaximum number of parts to return.
querystringWords to match against ids, names, categories and sizes, such as 'plate 2x4' (quoted).
shapelessbooleanAlso list the parts without a shape, which cannot be placed.

show_part

Show everything the catalog knows about one part.

ParameterTypeDescription
part *stringBrickLink item number, such as '3001'.
outputImage file to write; defaults to <part>.png in bricky's cache folder, outside the workspace.
renderbooleanAlso render the part, in the first color it comes in.

search_colors

Search the catalog's colors.

ParameterTypeDescription
querystringWords to match against ids, names and types, such as 'gray', or an RGB value, such as '#F2CD37', to list the nearest colors.

explain_rule

Explain rules: the exact condition each checks, its level and its pass.

ParameterTypeDescription
rulestringA rule such as 'floating-group'; every rule when omitted.