Build hardware with AI

An open-source Claude Code plugin, MCP server (40 tools) and command-line tool that lets AI agents research, design, verify and order real hardware: PCBs, 3D-printed and metal parts, optical setups and the parts list. It runs on your machine, and every number it gives carries its source.

View on GitHubInstallFAQ

What it checks before you order

3D printing DFM checker

Measured wall thickness against the service's limit for the part's size, trapped resin or powder, build volume, supports, tolerance, mass. SLA, MJF, SLS, SLM metal, FDM.

Assembly fit and clearance

Exact overlap volume and smallest gap between every pair of parts, against the print process's clearance.

Screw length calculator

Grip, washers, nut and the screw's ISO length tolerance: full engagement, room behind, shortest stock length. Clearance holes and captive-nut pockets.

KiCad PCB vs JLCPCB rules

KiCad's DRC with the board's rules and with JLCPCB's limits; layer count, thickness, size, vias that cost extra. Writes a .kicad_dru rules file.

Solder-paste stencil check

IPC-7525 area ratio of every paste opening at 0.08 to 0.15 mm, finest pitch, electropolishing, thermal pads.

BOM prices: LCSC, Mouser, DigiKey

Live price breaks, stock and lifecycle, rounded to each shop's least order; cheapest shop per line; LCSC cart file; datasheets fetched and searched.

Gerber files vs schematic

The copper rebuilt from the files the fab receives and compared with the schematic: shorts, opens, spacing, edge and hole clearance. A self-test plants faults to prove it.

Autorouting and circuit review

KiCadRoutingTools routes, each try judged by KiCad's DRC; kicad-happy reviews the circuit, EMC and layout. Both fetched pinned and checksummed.

Optics and laser instruments

Gaussian beams through lens trains, telescopes, objective back-aperture fill, focal spot, Faxén drag, Mie scattering, stiffness from a thermal-motion record.

Motion and access

Moving parts swept over their whole travel; a straight tool path to every screw; before-and-now render sheets.

Heavy jobs, safely

Simulations and routing queued one at a time under a memory cap, in the background.

Install

Claude Code plugin (skills and MCP tools)

/plugin marketplace add aklofas/kicad-happy
/plugin marketplace add cforcomputer/build-hardware-with-ai
/plugin install build-hardware-with-ai@build-hardware-with-ai

MCP server for Claude Desktop, Cursor, Codex or any MCP client

{ "mcpServers": { "build-hardware-with-ai": {
    "command": "uvx",
    "args": ["--from", "git+https://github.com/cforcomputer/build-hardware-with-ai", "hwkit", "mcp"] } } }

Command line

uv tool install git+https://github.com/cforcomputer/build-hardware-with-ai
hwkit init my-gadget && cd my-gadget && hwkit doctor && hwkit gates

Example: a lid that clips the case

$ hwkit fit case.stl lid.stl --process mjf
== Fit of 2 parts (gap needed 0.4 mm: MJF nylon, assembled parts)
  FAIL  case.stl / lid.stl  overlap 38.40 mm3, 60.00 x 40.00 x 0.10 mm around (0.0, 0.0, 19.9)

Skills for AI agents

SkillCovers
hardware-projectthe method from idea to a verified order: stages, gates, order day
pcb-fabJLCPCB rules in KiCad, kicad-cli Gerber/drill/BOM/placement export, order-form and stencil settings
printed-partschoosing SLA, MJF, SLM or FDM; walls, holes, threads, captive nuts, warp, the order package
hand-assemblyhot plate or reflow oven, lead-free SAC305 paste and reflow profile, part heat limits
part-sourcinglive prices with dates, lifecycle, LCSC vs Mouser vs DigiKey, API keys, substitutions
hardware-simulationngspice and openEMS done right: known answers, convergence, memory-capped job queue
optical-instrumentsmicroscopes and laser instruments: laser safety, objectives and filling, conjugate planes, detection, calibration, heating, drift

FAQ

Can an AI agent like Claude Code design a PCB that can be ordered?

It can draw the board with KiCad MCP servers. This toolkit checks that the result can be made: hwkit pcb runs KiCad's DRC with the board's own rules and with JLCPCB's limits, and the pcb-fab skill gives the exact export commands and every order-form setting.

How do I check whether a 3D print will work before ordering it?

hwkit print part.stl --process mjf measures the wall thickness everywhere, finds hollows that trap resin or powder, and checks the build volume, supports and mass.

What are JLCPCB's design rules for KiCad?

For 2 layers and 1 oz copper: 0.10 mm tracks and spacing, vias from 0.15 mm hole and 0.25 mm diameter (under 0.3 mm hole with 0.4 mm or less diameter costs extra), 0.2 mm copper to edge, 1.0 mm silkscreen text. hwkit jlc-rules writes them as a KiCad rules file.

What stencil thickness do I need?

hwkit stencil board.kicad_pcb gives the area ratio of every opening at each thickness (0.10 mm is JLCPCB's default). JLCPCB recommends electropolishing at 0.5 mm pitch or finer.

How do I calibrate stiffness from Brownian motion?

hwkit optics calibrate positions.csv --fs 50000 --radius-um 0.5 fits the aliased Lorentzian power spectrum (Berg-Sørensen & Flyvbjerg 2004) and returns the corner frequency and stiffness, and the detector's metres per volt with --volts.

How does it relate to kicad-happy and KiCad MCP servers?

It drives kicad-happy as its circuit reviewer and KiCadRoutingTools as its router; KiCad MCP servers draw boards, and this toolkit checks and orders them. Use them together.