Skip to content

CLI and MCP

Use Hardwright from your terminal or editor

The checks behind the app are an open-source Python package. Install it once and your coding agent can run the same verifiers the app uses, before it tells you a board or a heat sink is right. It runs on your machine: no account, no API key, no network, no cost.

What your agent gets

  • board_check

    Runs the five board checks on a design: well formed, electrical rules, bus rules, firmware pins vs netlist and boot-strapping hazards, battery estimate.

  • board_fix_pin

    Moves one firmware pin (for example the wake button) to another GPIO and re-checks.

  • board_templates

    Lists the built-in example designs: one clean, two with a known wiring fault.

  • board_get_template

    Returns an example design as JSON, ready to edit.

  • board_parts

    Lists the parts and facts the checks rest on, and which facts are checked against a source.

  • matter_simulate

    Solves a 2D heat spreader, cross-checks it with a second solver, compares it with plain fins and can write the printable STL.

Every check answers pass, fail or unknown. Only pass is a claim, and unknown is never counted as a pass. Results name the facts they rest on.

1. Install

Python 3.11 or newer.

pip install "hardwright[matter] @ git+https://github.com/hash066/siliconsmith#subdirectory=engine"
Or from a clone
git clone https://github.com/hash066/siliconsmith.git
cd siliconsmith
pip install -e "engine[matter]"

Check it worked: hardwright board check --template clean_sensor should print five passes.

2. Connect your agent

The server starts when your agent needs it and stops with it. Pick your tool.

Claude Code · Run once in your project

claude mcp add hardwright -- hardwright mcp

Codex · Run once

codex mcp add hardwright -- hardwright mcp

Cursor · Save as .cursor/mcp.json

{
  "mcpServers": {
    "hardwright": { "command": "hardwright", "args": ["mcp"] }
  }
}

VS Code · Save as .vscode/mcp.json

{
  "servers": {
    "hardwright": { "type": "stdio", "command": "hardwright", "args": ["mcp"] }
  }
}

Claude Desktop · Add to claude_desktop_config.json

{
  "mcpServers": {
    "hardwright": { "command": "hardwright", "args": ["mcp"] }
  }
}

If your editor cannot find hardwright, use python -m hardwright mcp as the command. Run hardwright mcp --setup to print these lines again.

3. Ask for it

Say what you want in plain words. Mentioning hardwright helps the agent pick the tools.

  • Check the board in design.json with hardwright and tell me which check fails.
  • My wake button is on GPIO12 with a pull-up. Use hardwright to check it, fix the pin, and re-check.
  • Design a heat sink for a 5 W chip on a 40 mm plate with hardwright and write the STL to heat-sink.stl.

Terminal, scripts and CI

hardwright board check exits 0 only when all five checks pass, 1 when any does not, and 2 on bad input, so it works as a CI gate for a design file.

hardwright board check --template fault_gpio12_vs_gpio14
hardwright board fix-pin --template fault_gpio12_vs_gpio14 wake_btn GPIO14
hardwright board check design.json --json
hardwright matter simulate --power 5 --param n_fins=8 --stl heat-sink.stl

As a Python library

import hardwright as hw

report = hw.board_check(template="fault_gpio12_vs_gpio14")
print(report["passed"])                       # False
print([c["id"] for c in report["checks"] if c["status"] == "fail"])   # ['B4']

part = hw.matter_simulate(power_w=5, stl_path="heat-sink.stl")
print(part["peak_c"], part["verdict"])

No install: the hosted checks

The board checker and the heat solver are also open over HTTP, free and rate limited. Nothing here uses AI credits.

hardwright board template fault_gpio12_vs_gpio14 > design.json
curl -s https://siliconsmith.vercel.app/api/board/check \
  -H 'content-type: application/json' \
  -d "{\"design\": $(cat design.json)}"
curl -s https://siliconsmith.vercel.app/api/matter/simulate \
  -H 'content-type: application/json' \
  -d '{"generator": "rect_fins", "spreader": {"Q": 5}}'

What it does not do

  • The board check is netlist level. It does not prove a board works, and it does no layout or routing.
  • Part facts are author-curated. A fact that was not checked against its datasheet is reported as such.
  • The heat model is 2D and steady state with stated constants. It is not CFD and not a measurement.