Metadata-Version: 2.4
Name: bricky-mcp
Version: 0.1.0
Summary: The MCP server for bricky, a compiler for LEGO® models, built for AI agents.
Keywords: lego,ai-agents,compiler,mcp,mcp-server,model-context-protocol
Author: Maxence Faldor
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Dist: bricky==0.1.0
Requires-Dist: mcp>=2.1
Requires-Python: >=3.12
Project-URL: Homepage, https://maxencefaldor.github.io/bricky/
Project-URL: Documentation, https://maxencefaldor.github.io/bricky/
Project-URL: Source, https://github.com/maxencefaldor/bricky
Project-URL: Issues, https://github.com/maxencefaldor/bricky/issues
Project-URL: Changelog, https://github.com/maxencefaldor/bricky/releases
Description-Content-Type: text/markdown

# bricky-mcp

The MCP server for [bricky](https://github.com/maxencefaldor/bricky), a compiler for LEGO® models, built for AI agents.

The server serves bricky to any agent harness over the Model Context Protocol, on stdio.
The command `uvx`, which comes with [uv](https://docs.astral.sh/uv/), runs it straight from PyPI.
With Claude Code, one command adds it:

```sh
claude mcp add bricky -- uvx --python 3.14 bricky-mcp
```

The option `--python 3.14` runs the server on the Python bricky recommends: on 3.15, installing compiles the solver HiGHS, which needs a C++ compiler.

Other harnesses start it from a project's `.mcp.json`:

```json
{
  "mcpServers": {
    "bricky": {
      "command": "uvx",
      "args": ["--python", "3.14", "bricky-mcp"]
    }
  }
}
```

The server renders in Chromium, which Playwright installs once per machine:

```sh
uvx --python 3.14 --from bricky-mcp playwright install chromium
```

The guide [Connect an agent](https://maxencefaldor.github.io/bricky/agents/connect/) covers every front end, and the [documentation](https://maxencefaldor.github.io/bricky/) covers bricky itself.

## Tools

| Tool | Does |
| --- | --- |
| `build_model` | Runs a build script in its own process, then saves, checks and renders the model |
| `render_model` | Renders a saved model again: other views, highlights, clips |
| `check_model` | Checks a saved model |
| `write_instructions` | Writes building instructions: a page that shows a model's steps in 3D |
| `export_model` | Exports a saved model for another tool, such as a BrickLink Wanted List |
| `search_parts` | Searches the catalog's parts |
| `show_part` | Describes one part, and can render it |
| `search_colors` | Searches the catalog's colors |
| `explain_rule` | Gives the exact condition behind a rule, its level and its pass |

Each tool takes the same arguments as its command on the command line.
Each tool answers with the text the command prints and with the result as structured content.
The tools `build_model` and `render_model` also return their images, so the agent sees the model without another call.

## Disclaimer

LEGO® is a trademark of the LEGO Group, which does not sponsor, authorize or endorse this project.
