PCB layout for AI coding agents.
Your agent places the parts, routes the board and runs the checks.
You watch every change live, in 2D and 3D, and take the mouse when you want.
Quick start · Tour · Tools · User guide · Architecture
A real session: the agent calls the Lamina tools (shown in each caption) and lamina-viewer
shows each change. The board is an ESP32-C3 sensor board with USB-C, 23 real parts (22 from LCSC) and 2 layers.
Build it yourself.
PCB programs were made for a mouse and a keyboard. Lamina was made for an agent.
- The agent does the work.
laminais an MCP server with 84 tools: search real parts, import them with footprints and 3D models, place, route, pour, check and export the fab files. - You stay in control.
lamina-viewershows the board in 2D and 3D and updates each time a file changes. Edit the board in the viewer at any time, or leave a note for the agent on the board. - Files you can read. A board is a folder of small JSON files. Diff them, review them, commit them. You can also write a board in Jsonnet and reuse circuit blocks.
- Works with your tools. Lamina reads and writes KiCad boards, reads EasyEDA and Gerber files, and writes Gerber X2, Excellon, BOM, CPL, IPC-D-356 and STEP.
Note
Lamina is young and changes fast. Check the boards it makes before you order them, as you would with any tool. Issues and ideas are welcome.
1. Get Lamina. Download the archive for your computer from the
latest release. It has two
programs: lamina and lamina-viewer. Or build them from source with
Rust 1.90 or later:
git clone https://github.com/meraworks/lamina && cd lamina
cargo build --release # the programs are in target/release2. Connect your agent. Claude Code:
claude mcp add --scope user lamina -- /path/to/lamina mcpCodex and other MCP clients
Codex, in ~/.codex/config.toml:
[mcp_servers.lamina]
command = "/path/to/lamina"
args = ["mcp"]Any MCP client that can start a program on stdio works the same way: the command is
lamina mcp.
3. Open the viewer on the folder where the board will go. It shows the board as soon as the agent makes it:
lamina-viewer my-board4. Ask for a board. For example:
Make a 50 × 30 mm board in
my-boardfor the JLCPCB 2-layer rules: a USB-C connector, an AMS1117-3.3 regulator and an ESP32-C3-MINI-1 with a reset button, a boot button and a status LED. Use LCSC parts. Route it, pour ground on both layers, make DRC clean, then export the fab files.
The agent searches the parts, checks each pin name against its net, places, routes, checks and exports. Talk to it as you work: "move the LED to the edge", "make the power tracks wider", "show me the bottom in 3D".
No agent at hand? The example script calls the same tools that an agent calls. It builds the board of the GIF in about ten seconds:
python3 examples/c3-sensor/build.py && lamina-viewer c3-sensorYou can edit the board in the viewer while the agent works. Each side reads the files again before it writes, so neither one writes over a change of the other. More about the viewer.
| Tools | |
|---|---|
| Parts | search_parts, import_part(s) from LCSC / JLCPCB (stock, price, footprint, 3D model) and KiCad libraries, footprint_from_package, footprint_from_pads, verify_footprint, audit_footprints, compare_footprints, set_model, restore_models |
| Board | set_outline, set_stackup, use_fab_preset, add_hole, add_text, add_keepout, add_zone |
| Netlist | set_nets, connect, pins (each pad with its pin name and net), set_diff_pairs |
| Placement | place_many, move_parts, rotate_part, flip_part, align, distribute, repeat_layout |
| Routing | autoroute, route_trace, add_via, route_diff_pair, tune_length, add_teardrops, ripup |
| Checks | review (the verdict before an order), check (DRC, connectivity, pin roles, silkscreen, thermals, holes), checks (what each check reports), set_rules, add_area, exclude_violation, apply_fixes, net_lengths, board_stats, board_minimums, fab_compat, fab_profiles |
| Output | export (Gerber X2, Excellon, BOM, CPL, IPC-D-356, zip), export_step, export_board (KiCad), render |
| Collaboration | notes, add_note, resolve_notes: the notes that you write in the viewer |
The user guide explains each tool, the autorouter, modular boards, layout reuse, the part library, and the KiCad, EasyEDA and Gerber import.
A board is a folder that you can commit:
my-board/
├── board.json outline, holes, stackup, design rules
├── parts.json the parts and their data (MPN, LCSC number, value)
├── nets.json the netlist
├── placement.json where each part is
├── routing.json tracks, vias, pours, keep-outs, texts
├── notes.json your notes for the agent
└── cache/ footprints, 3D models and part data, so a clone needs no network
Edit the files in a text editor if you like. The agent and the viewer see the change.
lamina schema <kind> prints the JSON schema of each file.
- User guide: tools, viewer keys, autorouter, Jsonnet boards, KiCad, EasyEDA, Gerber and STEP.
- Architecture: the crates, the ports and adapters, and the developer tools.
- Design document.
- Example board: the board of the GIF, built through the MCP tools.
- T.I.T flight computer and Yoink main board: two real boards, imported from KiCad and checked.
- Contributing: build, test, and how to report a problem.
MIT OR Apache-2.0, at your choice.






