LEGO from my bricks: photograph your parts, get build ideas and step-by-step instructions
FAQ (answers come from our records)
How do I install it?
We did not find an install command for this repository (our install coverage is only about 4%). Check its README or releases page.
Who is it for?
We filed it under these tags: Agent 技能. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository elcodabra/lego-build-inventory;first catalogued 2026-10-10;last seen 2026-10-16。There is no official certification or quality rating here — we record sources and dates only.
LEGO from my bricks
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Skill plus an MCP server for Claude and ChatGPT. It designs LEGO models **only from the parts you actually own**, checks that the model holds together and that you have enough of every part, and renders step-by-step instructions in the style of an official booklet (PNG, mp4 1080×1920 / 1920×1080).
**Main scenario: photograph your parts → get ideas for what you can build → get the instructions.**
Ideas are parametric models: house, tree, mushroom, rocket, robot, tower, heart, pyramid, fire truck, rover, spaceship, and a spaceport scene (a vehicle plus a ship side by side). The pile-driven ones (spaceship, spaceport) try to use as many of your parts as possible, and ideas are sorted so the one that takes the most parts comes first. Each is built from your parts: it picks the largest size that fits, the colours you have, and the part lengths available. Every proposed model passes the check (no overlaps, nothing floating, all parts in the inventory). Alongside the ideas that build now, it lists the ones that are close, with the exact parts missing. On top of the ideas, the agent can design any custom model from the same parts.
Built on the siliconbag/lego-build engine (MIT). On top of it this repo adds an inventory, a check against the inventory with substitute suggestions, JSON models, the MCP server, and packaging for Claude Code, claude.ai, Claude Desktop, Codex and ChatGPT.
Which option to pick
| Where | What to connect | How |
|---|---|---|
| **Claude Code** | plugin (skill + MCP) | scripts/install.sh claude-code or /plugin marketplace add → /plugin install lego-inventory-build@lego-tools |
| **claude.ai** (web/app) | skill zip | scripts/install.sh zip → Settings → Capabilities → Skills → Upload. Needs code execution. No network in the sandbox, so rendering is local only |
| **Claude Desktop** | MCP (stdio) | scripts/install.sh desktop prints the JSON for claude_desktop_config.json |
| **Codex CLI / ChatGPT desktop** | plugin (skill + MCP) | codex plugin marketplace add → codex plugin add lego-inventory-build@lego-tools (or scripts/install.sh codex) |
| **ChatGPT web** | remote MCP (HTTP) | see below |
On first launch the MCP server runs npm install and fetches Chromium for Playwright by itself (~100 MB, once). You also need **Node 20+** and **ffmpeg** (only for mp4).
ChatGPT (web, developer mode)
**Quickest: the hosted server** at https://lego-mcp.vercel.app/mcp, with sign-in (OAuth 2.1):
1. ChatGPT → Settings → Apps → Create app, URL https://lego-mcp.vercel.app/mcp, Authentication: **OAuth**.
2. Claude → Settings → Connectors → Add custom connector, same URL.
3. A sign-in window opens (lego-auth.vercel.app): create an account with a passkey (Face ID, Touch ID or device PIN; no password, no e-mail) and press «Разрешить».
Your parts and models belong to your account, the same in ChatGPT and Claude. Connected apps can be disconnected at https://lego-auth.vercel.app/account. Limits per account per day: 300 tool calls, 10 videos, 40 photos. Pictures and videos are kept for 30 days.
**Or run your own.** ChatGPT only connects to MCP servers over a public HTTPS URL.
1. ChatGPT → Settings → Security and login → **Developer mode**.
2. chatgpt.com/plugins → **+** → URL https:// /mcp?key= , auth: No Authentication.
3. In the chat: **+** → Developer mode → LEGO. Prompt: *"Use the lego app. Here are my sets 31058 and 10696, what can I build?"*
The token in ?key= is simple protection for personal use. For a public service you'd need OAuth and your own hosting (Fly.io, Render, any VPS with Chromium and ffmpeg). Links to mp4/PNG are served from PUBLIC_URL/files/....
Hosting on Vercel
api/mcp.mjs is the serverless entry. Each user's parts and models are one key in Upstash Redis (api/_store.mjs: one GET and one compare-and-set per request, daily quotas as atomic counters); without Redis it falls back to a private Vercel Blob store. Rendered PNG/mp4 go to a public Blob store, and identical files are uploaded only once. Handshakes, tool listings and reference tools don't touch storage at all. A full ChatGPT session (import, ideas, build, picture, steps) costs about 4 Blob operations instead of 27, which matters on Vercel Hobby (2,000 per month). Environment: