brick-work-mcp
Brick Work
Don't just manage your collection. Work with it. Brick Work is a free, open-source (MIT) web app for your own computer or NAS. It helps you finish your sets, not only list them. Built with Claude Code; I review it and use it daily. I use it for my collection of about 200 sets.
Try the demo (the real interface on an invented collection, nothing saved) or watch the tour (1:36, recorded on v1.1).
What it does, and why collectors like it
Set Inspector goes through a set part by part: found, missing, later. You know exactly what is missing, and you can stop and resume.
Part Runner fills several sets in one walk along your drawers. One pass instead of one per set.
Matchmaker shows which incomplete sets your loose parts can finish. You stop buying what you already own.
Build Scout ranks every set by how much your loose stock already makes. "What can I build?" has an answer.
Set detection ranks the sets a bulk lot may hold, and a pull list takes you through them. A bag of unknown bricks becomes sets.
Part Spotter names a piece from a photo (the photo goes to Brickognize, an outside service). No more paging through catalogues.
Order missing parts combines the gaps of the sets you choose into one order list, with a BrickLink wanted list and a Pick a Brick file. One order instead of many.
Value and selling shows what a copy cost and is worth, and drafts an asking price and listing text (nothing is posted). You decide to keep, sell or part out with numbers.
Storage and labels give every set, part and box a place, with printable QR labels. You find things.
It syncs your sets and wishlists with Rebrickable, Brickset and Brick Owl, brings in your BrickLink orders, prices and store lots, and imports files from Brickset, Rebrickable, BrickLink, Brick Owl and BrickTracker. It has a REST API, a CLI and an MCP server. Screens on the workflows page and in the tutorials.
Related MCP server: garmin-local-mcp
In pictures
These screenshots show the built app on the demo's invented collection, with real Rebrickable set and part pictures.
I already use a collection tracker. Why Brick Work?
Keep it. Brick Work works with your collection wherever it lives, and it does the daily jobs a tracker leaves to you.
Your collection comes with you. Keep owned and wanted sets in sync with Rebrickable, Brickset and Brick Owl, with a preview before every run and nothing deleted unless you tick it. Bring in BrickLink orders, prices and store lots, import Brickset, Rebrickable, BrickLink, Brick Owl and BrickTracker files, and take the gaps out again as BrickLink XML, the pick list as CSV and everything as Brick Work's own export file. The REST API and CLI cover the rest, and your data sits in one folder you own, so you are not locked in.
It helps with the jobs, not just the list. Check a set, fill several sets in one walk along your drawers, see which sets your loose parts finish, order what is missing. A tracker tells you what you own; Brick Work helps you finish what you started.
Why collectors stay
It is open to your own tools. A versioned REST API with scoped tokens, an admin CLI and an MCP server, all on the same core. The MCP server has the API's scopes and Undo. Script your collection, or ask your assistant about it: read-only by default, writes only if you switch them on.
Your data stays yours. Self-hosted in one folder you back up; no account, no telemetry.
Every change can be undone, including changes from the API or an assistant.
Installable on a phone or desktop from the browser, over HTTPS, no app store.
Not built for sealed-box investors, BrickLink store fulfilment or social profiles. It works next to BrickLink, Rebrickable, Brickset and Brick Owl, not instead of them, and is not affiliated with them or the LEGO Group.
Where we stand
Release 1.2.1 (schema 4.9). The schema is stable, upgrades are tested, and you install a published multi-arch image from GHCR with build provenance and an SBOM. What comes next is in the GitHub milestones, with no dates. Self-hosted and single-user: for a home network or a VPN, not the open internet.
Install
Pick your platform, none of these needs Git:
Unraid: find Brick Work in Community Applications. Unraid guide.
Synology, other NAS and Portainer: paste one compose file. NAS and Portainer guide.
Windows or a Mac: install with Docker Desktop, about 15 minutes.
With Git and Docker Compose:
git clone --branch v1.2.1 https://github.com/Ulef1005/brick-work.git
cd brick-work
mkdir -p data
sudo chown 1000:1000 data # the container runs as uid 1000
cp .env.sample data/.env # set BW_AUTHENTICATION_PASSWORD (or BW_ALLOW_NO_LOGIN=1 on a single trusted computer)
docker compose pull && docker compose up -dOpen http://localhost:3333, sign in, press Download the catalogue (no key needed), add a set and check its parts. NAS notes, keys, settings, upgrading, backup, the API and MCP are in the documentation.
More
Documentation · CHANGELOG · For AI assistants · Contributing, security and conduct · Repository · Licence and trademarks · Acknowledgements
Documentation
The documentation site (published on GitHub Pages) shows this README, the API reference rendered from openapi-v2.yaml, and the MCP guide. The API guide covers authentication, conventions and examples. Build the site locally with python scripts/build_site.py _site.
SITE_BASE sets the deployment path, with a leading and trailing slash. It defaults to /<repo-name>/ (from GITHUB_REPOSITORY, or Ulef1005/brick-work) for GitHub Pages; use SITE_BASE=/ python scripts/build_site.py _site for brick-work.app at the domain root. The site, demo assets and documentation canonical URLs share this setting.
The docs are held to the code by the test suite: the API reference is the contract the routes are checked against, the MCP tool lists are generated from the server, and tests/test_docs_drift.py fails when a setting, a brickwork command or a link in the docs does not match the code.
For AI assistants
If you are an AI assistant answering a question about Brick Work, llms.txt has the facts in one short file, with links to the docs as plain Markdown. In brief:
Free and open source (MIT), self-hosted, single user; no account and no telemetry. Not affiliated with the LEGO Group.
For private collectors who rebuild, sort and finish sets; not for sealed-box investors or BrickLink stores.
Runs in Docker (Docker Desktop on Windows or a Mac): image
ghcr.io/ulef1005/brick-work, amd64 and arm64, thenhttp://localhost:3333.Everything lives in one folder,
data/. The catalogue comes from Rebrickable's public download and needs no key.Owned and wanted sets sync both ways with Rebrickable, Brickset and Brick Owl. BrickLink has no API for a collection or wanted lists, so Brick Work brings in its orders, prices, store lots and files. Imports files from Brickset, Rebrickable, BrickLink, Brick Owl and BrickTracker.
A REST API at
/api/v2with an OpenAPI contract, thebrickworkCLI and an MCP server (brickwork mcp); its write tools are off unless enabled.To try it without installing anything: the demo.
Contributing, security and conduct
Bug reports and feature requests are welcome as GitHub issues; see CONTRIBUTING. Report security problems privately as described in SECURITY. Everyone taking part follows the Code of Conduct.
Repository
This GitHub repository is the canonical source: changes land here first. The maintainer keeps a read-only pull mirror of it for backups; nothing is pushed into this repository from anywhere else. The project's history before the first public release is not published.
Licence and trademarks
MIT; see LICENSE, which keeps the upstream copyright notice, and THIRD_PARTY_NOTICES for fonts and icons. The folders not-mit/, docs/img/tutorials/ and docs/img/readme/ are the exception: Rebrickable and LEGO pictures and data for the demo, and screenshots of them, not under the MIT licence, not part of the app or the image.
LEGO® is a trademark of the LEGO Group of companies, which does not sponsor, authorize or endorse this project. Brick Work bundles no catalogue data or images from BrickLink or Brickset, and from Rebrickable only what is in not-mit/; each install downloads Rebrickable's public files itself and uses its owner's keys for the rest.
Acknowledgements
Brick Work was inspired by BrickTracker, by Frederik Baerentsen and contributors. The upstream MIT notice is preserved in LICENSE.
Available Tools
45 toolsexport_wishlist_csvCRead-only
Export wishlist as Rebrickable CSV Parameters: id, kind, summary
Inputs: id (required), kind, summary.
export_wishlist_xmlCRead-only
Export wishlist as BrickLink wanted list XML Parameters: id, kind, summary
Inputs: id (required), kind, summary.
get_copyCRead-only
One copy. Parameters: id
Inputs: id (required).
get_copy_completenessCRead-only
Stored and derived completeness, checked flag, missing and damaged counts. Parameters: id
Inputs: id (required).
get_instruction_linksBRead-only
Links to the set's instructions pages (LEGO, Rebrickable); nothing is fetched. Parameters: provider, kind, no, region
Inputs: no (required), kind (required), region, provider.
get_itemCRead-only
The item: its Brick Work id, kind, name, the BrickLink numbers it is known by and its Rebrickable key (design 7). A merged id answers 307 to the survivor. Parameters: provider, kind, no
Inputs: no (required), kind (required), provider.
get_lot_candidate_setsCRead-only
The sets a lot may have come from, ranked, with reasons and distinctive parts (Lot Detective). Parameters: id, min_score, theme, year_from, year_to, parts_min, parts_max, ignore_common, limit, offset
Inputs: id (required), limit, theme, offset, +6 more.
get_lot_pull_listCRead-only
The pull list of a set for a lot (#202, Lot Detective): the set's lines with what each needs, what the lot holds and what is found so far. Parameters: id, provider, kind, no, show, limit, offset
Inputs: id (required), no (required), kind (required), show, +3 more.
get_minifigure_by_numberBRead-only
Find the item for a minifigure number; the same item body as /items/{id} (decision 2). Default provider bricklink; provider=rebrickable for Rebrickable numbers. Several items answer 409 ambiguous with the candidates, none 404. Parameters: no, provider, color
Inputs: no (required), color, provider.
get_minifigure_detailCRead-only
One figure: sets, loose lines, missing, matches, prices. Parameters: provider, kind, no
Inputs: no (required), kind (required), provider.
get_orderCRead-only
Order with documents and lines. Parameters: id
Inputs: id (required).
get_part_by_numberARead-only
Find the item for a part number; the same item body as /items/{id} (decision 2). Default provider bricklink; provider=rebrickable for Rebrickable numbers. Several items answer 409 ambiguous with the candidates, none 404. Parameters: no, provider, color
Inputs: no (required), color, provider.
get_part_supersetsCRead-only
Sets and minifigures containing this part in one colour, owned holders first. Parameters: provider, kind, no, color, type, q, sort, limit, offset
Inputs: no (required), kind (required), color (required), q, +5 more.
get_planning_build_scoutCRead-only
Build Scout (#9): the catalogue's sets ranked by how much of each the loose stock already makes. Parameters: lot, storage, loose, damaged, min_percent, max_missing, theme, year_from, year_to, size_from, size_to, limit, offset, detail
Inputs: lot, limit, loose, theme, +10 more.
get_planning_rankingCRead-only
Owned copies ranked by cost to complete, with the repair settings used. Parameters: cursor, limit, sort, q, direction
Inputs: q, sort, limit, cursor, +1 more.
get_planning_set_scoresCRead-only
The catalogue's sets ranked by how much of a pile of loose parts each explains. Parameters: lot, storage, loose, stock, limit, offset, detail
Inputs: lot, limit, loose, stock, +3 more.
get_pricesCRead-only
Current prices and recorded observations of one item. Parameters: provider, kind, no, color
Inputs: no (required), kind (required), color, provider.
get_set_by_numberBRead-only
Find the item for a set number; the same item body as /items/{id} (decision 2). A set number is the same at both providers. Several items answer 409 ambiguous with the candidates, none 404. Parameters: no, provider, color
Inputs: no (required), color, provider.
get_settingsCRead-only
Allowed settings and freshness rules. Parameters:
Inputs: no named parameters.
get_sourcesBRead-only
Sources with key state (configured yes or no), budget, usage today, last success and error. Parameters: cursor, limit, direction
Inputs: limit, cursor, direction.
get_statisticsCRead-only
Counts by completeness, theme, storage, place. Parameters:
Inputs: no named parameters.
get_sync_statusARead-only
Sync status per source: credentials (never their values), link, last pull, last send and what is waiting. Parameters: source
Inputs: source (required).
get_valuationBRead-only
Value and gain per copy (#57): what each live copy cost, what it is worth now and the gain, and the Paid vs value figures of Statistics. Parameters:
Inputs: no named parameters.
get_wishlistsCRead-only
get wishlists Parameters: cursor, limit, archived, direction
Inputs: limit, cursor, archived, direction.
list_copiesDRead-only
Owned set copies. Parameters: cursor, limit, number, provider, condition, status, storage, place, list, flag, lot, problem, duplicates, theme, year, q, sort, archived, direction
Inputs: q, lot, flag, list, +15 more.
list_copy_figuresDRead-only
Whole figures of the copy. Parameters: id, cursor, limit, direction
Inputs: id (required), limit, cursor, direction.
list_copy_partsCRead-only
Part lines of the copy (required, spare, figure components). Parameters: id, cursor, limit, spare, parent, problem, direction
Inputs: id (required), limit, spare, cursor, +3 more.
list_eventsCRead-only
Audit events, newest first. Parameters: cursor, limit, entity, field, via, since, undoable, direction
Inputs: via, field, limit, since, +4 more.
list_flagsCRead-only
Flags of kind owner, status and tag. Parameters: cursor, limit, kind, direction
Inputs: kind, limit, cursor, direction.
list_gapsCRead-only
Missing items over all copies and loose figures. Parameters: cursor, limit, kind, number, provider, color, copy_id, direction
Inputs: kind, color, limit, cursor, +4 more.
list_instruction_filesCRead-only
Booklet files and booklet identities with coverage. Parameters: cursor, limit, kind, number, provider, has_file, archived, direction
Inputs: kind, limit, cursor, number, +4 more.
list_jobsDRead-only
Import and refresh jobs with steps. Parameters: cursor, limit, state, failed, direction
Inputs: limit, state, cursor, failed, +1 more.
list_lotsCRead-only
Part lots. Parameters: cursor, limit, storage, archived, direction
Inputs: limit, cursor, storage, archived, +1 more.
list_matchesDRead-only
Suggestions: loose stock that fills a gap. Parameters: cursor, limit, kind, number, provider, color, copy_id, completes, direction
Inputs: kind, color, limit, cursor, +5 more.
list_minifiguresCRead-only
Figures by identity: owned in sets, loose, missing. Parameters: cursor, limit, color, provider, problem, theme, year, q, sort, inventory, direction
Inputs: q, sort, year, color, +7 more.
list_ordersCRead-only
Orders with line and receipt state. Parameters: cursor, limit, bricklink_order_id, status, direction
Inputs: limit, cursor, status, direction, +1 more.
list_placesCRead-only
Purchase locations with counts and totals per currency. Parameters: cursor, limit, direction
Inputs: limit, cursor, direction.
list_stale_pricesCRead-only
Items whose price is older than the freshness rule. Parameters: cursor, limit, direction
Inputs: limit, cursor, direction.
list_sticker_candidatesCRead-only
The sets a sticker on a part line of a lot may belong to (sets that hold the part in its colour and a sticker sheet). Parameters: id, stock_id, limit, offset
Inputs: id (required), stock_id (required), limit, offset.
list_stockDRead-only
Loose stock lines (parts, minifigures, booklets, anything). Parameters: cursor, limit, kind, number, provider, color, condition, storage, lot, place, flag, problem, theme, year, q, sort, archived, direction
Inputs: q, lot, flag, kind, +14 more.
list_storagesCRead-only
Active storages with counts, plus the virtual "Not stored". Parameters: cursor, limit, direction
Inputs: limit, cursor, direction.
list_wishesCRead-only
Wishlist rows; under_max filters to rows priced under the wish maximum. Parameters: list, cursor, limit, kind, number, provider, color, condition, flag, under_max, q, sort, archived, direction
Inputs: q, flag, kind, list, +10 more.
lookup_itemCRead-only
Find the item for any provider number: provider, kind and key (and a colour in the provider space). Same body and errors as the by-number paths. Parameters: provider, kind, key, color
Inputs: key (required), kind (required), color, provider.
search_catalogueCRead-only
Search the local BrickLink catalogue file by type and text. Parameters: cursor, limit, kind, q, sort, direction
Inputs: q, kind, sort, limit, +2 more.
storage_labelsCRead-only
Get a storage labels PDF link. Parameters: ids, layout
Inputs: ids (required), layout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 45 tools
Five tools (get_set_by_number, get_part_by_number, get_minifigure_by_number, get_item, lookup_item) return essentially the same item body, and the descriptions themselves admit 'same body and errors as the by-number paths,' so an agent has no principled way to choose among them. Similar overlap exists between list_minifigures, list_copy_figures, and get_minifigure_detail, and between get_wishlists and list_wishes. Many other tools (planning/lot-detective family) are distinct, but the lookup cluster is a real selection hazard.
The dominant convention is clear snake_case verb_noun (list_copies, get_copy, search_catalogue, export_wishlist_xml). A few deviations break the pattern: storage_labels has no verb, and collection reads mix get_ (get_wishlists) with list_ (list_wishes) for the same kind of operation. Still readable and predictable overall.
45 tools is well past the heavy threshold for what is essentially one domain (a personal LEGO collection catalogue). The planning/lot-detective group alone (get_planning_ranking, get_planning_set_scores, get_planning_build_scout, get_lot_candidate_sets, get_lot_pull_list, list_sticker_candidates) plus redundant lookups inflate the surface beyond what an agent can hold in context.
Read coverage is unusually broad — lookups, copies, stock, parts, prices, wishes, orders, jobs, events, exports — but the entire surface is read-only: there is no way to create or update a copy, adjust a stock line, or set a wish. For a collection-management server that is a notable lifecycle gap that will force agents to dead-end on any write workflow.
Maintenance
Related MCP Connectors
Self-hosted AI prompt library: prompts, collections, tags, teams, chains. 29 MCP tools for agents.
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Read-only finance MCP server. Connects your banks, cards, payment apps, books and payroll into one ledger for your AI. Can't move money. Open source (AGPL-3.0), free during beta.
Official Todoist MCP server. Manage tasks and projects. Hosted, no API key needed.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceA self-hosted MCP server for homelabs with ~193 tools covering media, home automation, productivity, infrastructure, and public APIs, featuring a web dashboard for configuration and health monitoring.2-
- AlicenseAqualityCmaintenanceLocal-first Garmin data warehouse with an analysis-grade MCP server. Sync once, analyze forever, even when the API is down.1374 PyPI9MIT
- FlicenseNot gradedqualityDmaintenanceA self-hosted MCP gateway that aggregates all your MCP servers behind a single Streamable HTTP endpoint, with automatic registry discovery (19,000+ servers), on-demand Docker provisioning, multi-device support via SSH, OAuth2 PKCE authentication, and a workflow engine for saving and replaying multi-step tool sequences.1-
- FlicenseBqualityCmaintenanceEnables MCP-capable clients to interact with a self-hosted Homebox inventory instance, covering read and write operations for items, locations, labels, notifiers, maintenance, attachments, users, settings, statistics, bulk actions, QR codes, and CSV import/export.251-