Diese Seite gibt es auch auf Deutsch: Auf Deutsch lesen
LEGO MCP Server: Connect an AI Assistant to the LEGO Catalog and Your Collection
Afolio, our LEGO collection tracker, has an MCP server built into the Mac app. Once it’s on, an AI assistant on your Mac can search every LEGO set, minifigure and part, read your collection, look at instruction pages, and add sets for you if you let it. You can try it free for 20 requests a day.
If you just want ideas for what to ask, start with 40 things to ask an AI assistant about your LEGO collection. This page is about how the connection works and what the assistant can reach.
What MCP is
MCP (Model Context Protocol) is a standard way for AI apps to talk to other apps. Afolio offers a set of tools over it, such as “search sets”, “get this set’s parts” and “add a set to the collection”. When you ask a question, the assistant calls whichever tools it needs and answers from what comes back.
That matters for LEGO because assistants are bad at it from memory. They know the big sets but get piece counts and part numbers wrong, and they don’t know what you own. Connected to Afolio, they look it up: in the catalog of every set, minifigure and part (from Rebrickable), and in your collection as it is now. Sets you add on your iPhone show up too, because Afolio syncs through iCloud.
Setting it up
You need Afolio from the Mac App Store, running on your Mac, and an assistant app on the same Mac that supports MCP servers.
- In Afolio, open Afolio → Settings (⌘,) and choose MCP.
- Switch on Turn On MCP Server. The status line shows the port it’s running on, 1340 unless you change it.
- Add Afolio to your assistant app using the address and access token shown in Settings (details below).
- Ask it something, like “Find the LEGO Winter Village sets” or “Give me a summary of my LEGO collection.”
Connecting your assistant app
Afolio’s server is a local HTTP server. Most apps that support MCP let you add one with an address and a header, often in a JSON settings file that looks something like this (the exact format depends on the app):
{
"afolio": {
"url": "http://127.0.0.1:1340/mcp",
"headers": { "Authorization": "Bearer YOUR-ACCESS-TOKEN" }
}
}
Copy the token from Settings → MCP. Settings also has buttons that copy a ready-made setup for Claude Code (a Terminal command) and Claude Desktop (a config entry that uses the mcp-remote helper, which needs Node.js). For other apps, look in their settings for “MCP servers” or “tools”.
The assistant app has to run on the same Mac as Afolio. Assistants that connect from the cloud, such as ones you use only in a web browser, can’t reach a server on your Mac.
What the assistant can look up
You never call these tools yourself. Ask in normal words and the assistant chooses. The tables are here so you know what’s possible. Everything here works in the free version, up to its daily limit; only making changes needs Pro.
The LEGO catalog
| Tool | What it’s for |
|---|---|
search_catalog_sets | Finding sets by name, number, theme, year or piece count. A word can also match a minifigure in the set, so “elf” finds sets with an elf. Names collectors use that aren’t catalog themes work too, like “Winter Village”. Results can be sorted by what was most recently added to the catalog, which is usually what was most recently announced. |
get_set | A set’s year, theme, piece count, minifigures and sub-sets, plus its photo. |
search_catalog_minifiguressearch_parts | Minifigures by name. Parts by name, number, or the element ID printed in the instructions. |
list_themeslist_colors | Themes and sub-themes, and every LEGO colour with its RGB value. |
get_set_footprint | The large plates and baseplates in a set, which give a good idea of how big its base is in studs. |
lego_reference | Standard measurements: stud spacing in millimetres, brick and plate heights, Technic and gear spacing, baseplate sizes, minifigure sizes, and train track geometry including switches. |
get_set_parts | A set’s parts list with element IDs, colours and sizes. |
get_partget_minifigure | Which colours a part comes in, its size and weight, and which sets have it. A minifigure’s parts and colours (hair, torso, legs and so on) and which sets it’s in. |
get_instruction_pages | Pages from a set’s building instructions, by page or step, including where each numbered bag starts and the pages that show the finished model. Afolio downloads each booklet from LEGO once and keeps it. |
get_set_weight | How much a set weighs, worked out from its parts. |
Your collection
| Tool | What it’s for |
|---|---|
collection_summary | Totals, pieces, what you spent, estimated value and your main themes. |
list_collectionlist_wishlistlist_my_minifigures | Your sets, wishlist and minifigures, including each copy’s condition, price paid and notes. |
| Smart Collections | Running your Smart Collections, trying filters and saving new ones. |
show_in_app | Opening a set, minifigure, part or Smart Collection in Afolio. |
Making changes
Assistants can only read until you switch on Allow Changes in Settings → MCP. Then they can add sets and loose minifigures, edit a copy’s details, change your wishlist, update parts checklist counts and create Smart Collections. They can’t delete anything, and you can undo any change in Afolio with Edit → Undo.
Ready-made requests
Afolio also includes three prompts, which are longer requests with instructions for the assistant built in. Where they show up depends on the app: often as slash commands, or in a menu next to the message box.
- Plan a model or display from several sets. Collects each set’s base size, colours, minifigures and pictures of the finished build, then works out a layout.
- Plan a train layout. A track plan for a given space, with a list of pieces.
- List missing parts to order. What’s left in a set’s parts checklist, by colour.
Some things to try
Fitting several sets on one shelf
- I want the Gingerbread House, Santa’s Post Office and Santa’s Delivery Truck on one shelf. How much room do they need and how would you arrange them?
The assistant finds the sets, checks each base from its plates, and looks at the finished-model pages to see what hangs over the edges. You get rough sizes and a suggested layout. If you’re building a 3D model or drawing of the scene, ask it to use LEGO’s exact colours.
A train layout with a passing siding
- Plan an oval for a 120 by 80 cm table with a passing siding on one side, and list the track I need.
LEGO track is built on fixed sizes: a straight is 16 studs, curves have a radius of 40 studs, and a switch followed by a curve back puts the second track 16 studs from the first. The assistant takes these from Afolio rather than guessing, so the loop actually closes.
A shopping list for missing parts
- What am I still missing for the Titanic? Group it by colour with element IDs.
This reads your parts checklist for the set. Ordering missing pieces from Pick a Brick covers what to do with the list.
Questions about what you own
- Which of my sets have gone up most in value since I bought them?
- Which of my sets have a Trans-Clear 1×1 round plate, and how many are there altogether?
- I just bought 10316 Rivendell, sealed, for $499.99. Add it.
Free and Pro
Without Afolio Pro, assistants can use every tool that looks things up, catalog and collection both, for 20 requests a day. Settings → MCP shows how many are left, and the count starts again each day. Keep in mind that one question can take several requests: the assistant may look up five things to answer it, and planning across several sets can take twenty or more.
Afolio Pro removes the limit and lets assistants make changes. It’s a one-time purchase with no subscription. See pricing.
Privacy and limits
- Only apps on your Mac can connect, and only with the access token. Afolio doesn’t send your collection anywhere.
- Your assistant app does send what it reads to its AI service, as part of the conversation and under its own privacy terms. Recent Activity in Settings → MCP lists what was looked up or changed.
- The server is part of the Mac App Store version of Afolio. There isn’t one on iPhone or iPad, and it stops when you quit Afolio.
- Prices come from the price guides Afolio has already downloaded. Assistants don’t fetch new ones, so they don’t use up your BrickLink or BrickEconomy limits.
Home
·
Guides
·
Help
·
Pricing
© The Half Bakery Pty Ltd
LEGO is a trademark of the LEGO Group, which does not sponsor or endorse this app.