Skip to content
Simurq Labs

Learn

How do you put AI to work in KiCad?

By Semih Özbir, Electrical and Electronics Engineer

Published · Last reviewed

In this guide · 10

AI works with KiCad in three ways: an assistant inside the editor, an MCP server a chat model calls, or an agent that hands back a project. PCB Agent is the third. It is neither a plugin nor an MCP server: it runs KiCad 10 with no window and checks each board before you see it.

Three ways to put AI to work in KiCad

They differ in where the model sits, who drives KiCad, and what you get back.

  • An assistant inside the editor. A plugin opens a chat in KiCad's own window, on the design you have open. KiCad AI Assistant, for one, is an action plugin whose chat panel gives the model tools to read and edit your schematic and board. You watch each change land.
  • An MCP server. The Model Context Protocol lets a chat model call tools that run outside it. A KiCad MCP server offers KiCad's operations as such tools: open a board, place a part, route a track, run DRC, export Gerbers. The model chooses each call, one at a time.
  • An agent that hands back a project. You describe the board, and it returns a KiCad project with its fab files and the results of its checks. Nothing runs in KiCad on your side. PCB Agent works this way.

Many projects of the first two kinds exist, and people often build their own. The KiCad forum keeps a thread that points to an index of them, KiCad AI-related projects. This article ranks none of them.

What is a KiCad MCP server, and what can it check?

A KiCad MCP server is a program that offers KiCad's operations to a chat model as tools, over the Model Context Protocol: open a board, place a part, route a track, run ERC and DRC, export Gerbers. It checks what those checks check, and no more. The model reads the reports and decides what happens next.

What each can and cannot check

Every way ends at the same two checks. ERC reads the schematic for electrical faults: an input nothing drives, outputs tied together, a pin left unconnected. DRC reads the board's geometry: clearances, track widths, holes, and connections not yet routed. What differs is who runs them, and what happens when one fails.

Three ways to use AI with KiCad side by side. An assistant inside the editor runs in KiCad's own window and you run ERC and DRC. Through an MCP server the model chooses each call and runs the checks. An agent that hands back a project runs KiCad with no window, and code runs every check.

Three ways AI works with KiCad and who runs ERC and DRC in each, drawn from the KiCad 10.0 documentation and the projects named above.

  • In the editor, you run the checks, and you decide what each violation means.
  • Through an MCP server, the model can run them and read the result. kicad-cli writes both reports as JSON, and with --exit-code-violations it exits with 5 when there is any violation. What to do next is still the model's call: fix the board, carry on, or mark the violation excluded.
  • In an agent, code can run every check on every board and refuse to go on. A PCB Agent board that fails ERC, DRC under its fab's rules or its review goes to one of us, never to you.

None of these checks reads a part's datasheet. A section below shows what that misses.

What KiCad 10 does with no window, and what it does not

KiCad 10.0 came out on 20 March 2026. PCB Agent runs 10.0.6, in a Docker image pinned to that release, on a server with no screen. Its command line, kicad-cli, covers most of a job:

  • The checks: kicad-cli sch erc and kicad-cli pcb drc, which can refill zones first and compare the board with its schematic.
  • The outputs a fab and an assembler take: Gerbers, drill files, the placement file, the BOM, the netlist, a STEP model and PDFs.

What it does not do is build a board. No kicad-cli command places a footprint, routes a track, or writes and reads the Specctra files an external router exchanges. That leaves three routes:

  • The SWIG Python bindings, import pcbnew. They do all of it, Specctra export and import included. KiCad deprecated them in version 9, and its developer documentation plans their removal in KiCad 11.
  • The IPC API, their replacement. In KiCad 10 it talks only to a running KiCad, window and all. It can move footprints and add tracks, but not yet place a footprint from a library, run DRC or exchange Specctra files.
  • KiCad's files, written as text. The schematic editor has no Python bindings, and in KiCad 10 the IPC API does not reach it either. So our schematic is written as text, in KiCad 10's own format, and KiCad reads it as it reads any other: ERC checks it.

The board takes the first route, behind one rule.

Why each pcbnew call runs in its own process

The SWIG bindings keep global state, and one bad call can take the whole Python interpreter down. So the long-running service never imports pcbnew. Each board operation starts a Python process of its own, does one thing and exits: build the board and write its Specctra file, read the router's session back, measure the finished board, or check a footprint. Success prints one JSON object and exits with 0. A known failure exits with 3 and says why. Anything else is a crash, and the step runs again from its inputs. A process start costs well under a second. Every pcbnew call lives in one file, so KiCad 11 changes one place.

The same board twice: what it takes

The same approved request gives the same files, byte for byte. Then a file's hash names it, and any difference between two runs is a real change. KiCad does not give you that by itself. Five things had to be fixed:

  • The time. KiCad writes the moment of export into every Gerber, drill and job file, and into the DRC report. We put a fixed instant in its place, 1 January 1970, so each file stays well-formed.
  • The identifiers. Every item in a KiCad file carries a UUID, random by default. The board's come from a seeded generator, the schematic's from a hash of the job's inputs. For the same reason, kicad-cli fp upgrade never runs on a footprint we generate: it gives each item a new random UUID every time.
  • The paths. A Specctra file records the path it was written to, so every tool runs inside the job's own folder, on relative paths.
  • The threads. Freerouting, the autorouter, routes with several threads by default, and its result varies from run to run. Ours runs with one, and no part moves once placement has put it down.
  • The clock. Freerouting bounds some of its work by time, so a slower machine stops that work at another point. On a slower test runner, boards came out differently: the same copper in another order, or vias in other places. A class of our own now takes the place of its time limit, and counts work instead of milliseconds. Our article on KiCad's autorouter tells that part at length.

Where a chat model goes wrong on a board, and what catches it

A board can pass ERC and DRC and still be wrong. ERC reads the schematic and DRC the geometry, and neither reads a maker's layout guidelines. A Wi-Fi module shows the gap. Espressif's layout guidelines put its ESP32-C3 module in a corner, the antenna over the board's edge. Place that module in the middle of a board, with nothing routed under its antenna, and both checks still pass it: nothing they read says the antenna belongs at the edge. A chat model that places the module there and runs both checks gets two clean reports.

A model that calls KiCad's checks stops where those checks stop, and so does anyone who trusts them. What closes the gap is reading the makers' documents for layout requirements. Our library holds 45 such rules now, each citing its source. Placement keeps them, and the review or DRC treats a break as an error. The roadmap tells how we came to it, and Can AI design a PCB? goes through what each check catches.

Why the model here never touches KiCad

PCB Agent's models have no tools: no files, no shell, no KiCad. Each one returns a decision in a fixed shape, such as the spec's fields read from your request, the parts or the circuit modules, and code checks it before anything is written. Parts are checked at two distributors, and the module graph against its rules. Code then builds the board: the netlist, the schematic, placement, routing, the checks and the files. A model that can call KiCad can also skip a check. Ours cannot reach one. How an AI PCB design agent works goes through every step and what code checks there.

What changes with KiCad 11

KiCad's development branch, which becomes KiCad 11, has already removed the SWIG bindings. The IPC API takes their place, and gains a headless mode: kicad-cli api-server serves it with no window. The same branch adds what KiCad 10's API lacks for building a board: placing a footprint from a library, running DRC and exchanging Specctra files.

Anything built on import pcbnew has to move. One KiCad MCP server, KiCAD-MCP-Server, lists KiCad's pcbnew Python module among its requirements, and works through the SWIG API with an experimental IPC backend. For PCB Agent, the move touches the one file that calls pcbnew.

Limits

This article compares no tools. What it says of KiCad's interfaces holds for KiCad 10, and the development branch may change again before KiCad 11 ships. Our measurements come from two-layer boards. PCB Agent takes a request, not a design in progress: it does not edit a board you have open.

Sources

Have a board in mind?

PCB Agent is not open to the public yet. Leave your email, and we'll write when early access starts.