Repository avatar
Cloud Platforms
v0.1.1
active

fritzing-mcp

io.github.KK4HFJ/fritzing-mcp

Build Fritzing breadboard sketches step by step; Fritzing draws the breadboard, schematic and PCB.

Documentation

fritzing-mcp

An MCP server that lets Claude (or any MCP client) build Fritzing breadboard sketches step by step. Claude picks parts and puts each pin in a breadboard hole, and Fritzing draws the result: the breadboard, a routed schematic and the PCB view. Claude never draws anything itself. It writes a normal .fzz file that opens in Fritzing as if you had built it by hand.

Status: v0.1.1 (December 2026). On PyPI, the MCP Registry (io.github.KK4HFJ/fritzing-mcp) and Glama. Tested on Windows 11 with Fritzing 1.0.8, used live from Claude Code, and on Linux (Ubuntu 24.04) with Fritzing 1.0.8 built from source by tools/build-fritzing-linux.sh. Not yet tested on macOS.

BreadboardSchematic
USB-C LED board on a half breadboard, drawn by FritzingIts schematic, routed with a ground bus, drawn by Fritzing

Created with Fritzing. A USB-C powered LED (two 5.1 kΩ CC pull-downs, 1 kΩ LED resistor), placed and wired through the MCP tools; sketch: fritzing-mcp/sketches/led_usb.

A bigger one, one channel of a USB power cycler (fail-safe-ON high-side P-FET switch with an ESP32 control header), schematic placed by hand with place_schematic:

USB power cycler channel schematic, drawn by Fritzing

More pictures, and every tool call used: fritzing-mcp/docs/images/.

What it does

  • Parts: searches Fritzing's ~2,100 core, contrib and user parts. part_number maps real parts (2N3904, IRL520, L7805, LM317...) to a Fritzing part with the same package and the same leg order. It refuses lookalikes whose legs are in a different order.

  • Building: places a part by putting one of its pins in a hole (with rotation), adds jumper wires (bent if needed), and handles parts that sit off the board (modules, controller headers).

  • Making parts: generates DIP ICs (make_dip), labelled pin headers and breakout modules (make_header) and a radial PTC (make_ptc). They are packed inside the .fzz, so the sketch opens anywhere.

  • Checking: after every edit it reports the nets (which pins are connected) plus a breadboard layout check. The check warns when something can't be built (a part body over a hole something needs). It also notes things that read badly: wires over parts or leads, crossings, wires that look connected but aren't.

  • Schematic: lays parts out as signal flow (input left, output right, pull-ups above, pull-downs below), routes real schematic wires with tees, adds labels, and checks that no two nets look shorted. You can also place symbols by hand (place_schematic).

  • Rendering: writes the .fzz, runs Fritzing's own headless export (Fritzing.exe -svg), and returns PNGs so Claude can look at the result.

  • KiCad add-on (optional): start a sketch from a KiCad board or netlist and check the breadboard against the KiCad nets on every edit. Off unless FRITZING_MCP_KICAD=1; see below.

Full tool list, placement rules and limits: fritzing-mcp/README.md. How it works and everything we learned about the .fzz format (written to be explained): fritzing-mcp/NOTEBOOK.md.

Layout

PathWhat
fritzing-mcp/server.pyThe MCP server (stdio)
fritzing-mcp/kicad_addon/Optional KiCad add-on (reader + import_kicad)
fritzing-mcp/part_numbers.yamlReal part number → Fritzing part, with leg order
fritzing-mcp/run_tests.pyPass/fail tests (no pytest needed)
fritzing-mcp/sketches/Example and test sketches (.yaml source + .fzz)
tools/fzgen/YAML → .fzz writer the server uses, plus the DIP/header/PTC part generators
tools/svg2png.py, tools/screenshot.pySVG → PNG (resvg); capture a single window (Windows) to check the Fritzing GUI

The server finds fzgen as ../tools/fzgen, so keep the two folders side by side. pyproject.toml packages the same two folders as fritzing_mcp and fritzing_mcp.fzgen for PyPI.

Requirements

  • Fritzing 1.0.8, installed by you (fritzing.org). This project does not include or redistribute Fritzing.
  • Python 3.12+. Either install the package from PyPI, which gives you a fritzing-mcp command:
python -m pip install fritzing-mcp

or run it from a checkout of this repo after installing requirements.txt:

python -m pip install -r requirements.txt

A checkout keeps sketches and its parts cache beside server.py. The installed package keeps them in a per-user folder (~/.local/share/fritzing-mcp, %LOCALAPPDATA%\fritzing-mcp on Windows, ~/Library/Application Support/fritzing-mcp on macOS), or in FRITZING_MCP_DATA if you set it.

Defaults assume Windows (C:\Program Files\Fritzing\Fritzing.exe). Override with environment variables: FRITZING_EXE, FRITZING_PARTS (the fritzing-parts folder), FRITZING_SKETCHES (where sketches are kept). On Linux, tools/build-fritzing-linux.sh builds Fritzing 1.0.8 from source (no root) with a headless wrapper.

Use with Claude Code

From the folder you want to use it in:

claude mcp add fritzing -s project -- python /path/to/fritzing-mcp/fritzing-mcp/server.py

With the PyPI package, use the command instead: claude mcp add fritzing -s project -- fritzing-mcp (add -e FRITZING_EXE=... -e FRITZING_PARTS=... if Fritzing isn't in the Windows default place).

That writes a project-scoped .mcp.json. Claude Code asks you to approve the server on the next start, and the tools appear as mcp__fritzing__*. Then ask Claude for a circuit, e.g. "build an LED with a 330 Ω resistor on a half breadboard and render it".

Server install (HTTP, Docker)

For a server next to n8n or another automation tool, the server also speaks streamable HTTP: FRITZING_MCP_TRANSPORT=http with FRITZING_MCP_TOKEN (24+ random characters; every request needs Authorization: Bearer <token>). It binds 127.0.0.1 unless FRITZING_MCP_HOST says otherwise (FRITZING_MCP_PORT, default 8765), and only accepts Host headers it knows (FRITZING_MCP_ALLOWED_HOSTS adds names). The endpoint is /mcp.

The Dockerfile builds an image with Fritzing 1.0.8 compiled from source (non-root user, sketches in the /data volume). CI publishes it as ghcr.io/kk4hfj/fritzing-mcp after running the test suite inside it. The image speaks stdio by default, so any MCP client can run it with no Fritzing install of its own:

docker run -i --rm -v fz:/data ghcr.io/kk4hfj/fritzing-mcp

docker-compose.yml runs it in HTTP mode with the port published on 127.0.0.1 only:

FRITZING_MCP_TOKEN=$(openssl rand -hex 24) docker compose up -d

Don't publish the port on a public interface; put other containers (e.g. n8n) on the same Docker network instead.

KiCad add-on (optional)

If you design boards in KiCad, the add-on turns a KiCad design into a breadboard sketch so you can publish a build picture that matches the real board. Turn it on by adding -e FRITZING_MCP_KICAD=1 to the claude mcp add line (or setting it in your client's server environment). Then:

  • import_kicad(sketch, path) reads a .kicad_pcb (no KiCad install needed), a netlist (.net/.xml), or a .kicad_sch (needs kicad-cli) and chooses a Fritzing part for every component;
  • parts are placed by KiCad pad number (pin="pad:1");
  • every edit ends with a KiCad check: nets split on the breadboard, shorts between KiCad nets, extra connections, parts not placed yet, or OK.

Details and its limits: fritzing-mcp/README.md. Without the switch nothing KiCad-related is loaded.

Tests

cd fritzing-mcp
python run_tests.py            # needs Fritzing's parts folder (FRITZING_PARTS)
python run_tests.py --render   # all 23: also runs Fritzing to export sketches and reads the written file back
python test_client.py          # drives the server over stdio, like an MCP client

Limits

  • The schematic router is a simple scored router: good on small circuits, untested on large ones.
  • PCB view: parts are placed in a row, no traces yet.
  • Breadboard check gap: a wire bend or end resting on an unused hole of another net, or under a standing part, isn't flagged yet.
  • Only Fritzing's Half_breadboard_v2 has been exercised much.

Licence and credits

  • Code: GPL-3.0 (see LICENSE), the same licence as Fritzing.
  • Images in this repo were drawn by Fritzing (exports or screenshots of the Fritzing window): Created with Fritzing. Fritzing's part artwork is CC BY-SA 3.0. The Fritzing FAQ asks that its part graphics not be used in other software, which is why this project only ever lets Fritzing itself draw them.
  • Not affiliated with or endorsed by Fritzing / Friends-of-Fritzing.

By Steve Spence, KK4HFJ, built with Claude.

PYPI
fritzing-mcp
Install Command
pip install fritzing-mcp
OCI
ghcr.io/kk4hfj/fritzing-mcp:0.1.1
Install Command
docker pull ghcr.io/kk4hfj/fritzing-mcp:0.1.1:undefined