
Rev3-kicad mcp
matheusfalcaopinto/kAIcad-MCP
KiCad MCP is an Apache-2.0 Python package for a Linux stdio Model Context Protocol server for KiCad project workflows.

KiCad MCP is an Apache-2.0 Python package for a Linux stdio Model Context Protocol server for KiCad project workflows.
BedCAN MCP is an open-source printed circuit board by matheusfalcaopinto, from the matheusfalcaopinto/kAIcad-MCP repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 790 × 980 mm with 233 parts on 118 nets, routed with 813 tracks and 236 vias.
It is built around the ADS1115. Its parts include 13 capacitors, 11 ICs, 9 transistors, 5 diodes and 2 connectors. It belongs with the RP2040 boards of this library.
KiCad MCP is an Apache-2.0 Python package for a Linux stdio Model Context Protocol server for KiCad project workflows. The MVP is file-first: it inspects KiCad projects, runs sandboxed validation gates, and applies strict transaction-only schematic and PCB mutations without requiring KiCad for default tests.
uv sync
uv run kicad-mcp --help
uv run python -m kicad_mcp --helpAfter publication, the console script can also run through uvx:
uvx kicad-mcp --version
uvx kicad-mcp stdioStart the MCP stdio server with either entrypoint:
uv run kicad-mcp stdio
uv run python -m kicad_mcp stdioThe stdio server speaks line-delimited JSON-RPC. Stdout is reserved for protocol responses. Diagnostics go to stderr so MCP clients can parse stdout safely.
The stdio tool list exposes only MVP-safe tools:
| Tool | Purpose | Backend |
|---|---|---|
project.inspect | Summarize one sandboxed KiCad project root. | file |
schematic.summary | Summarize one .kicad_sch file by project-relative path. | file |
pcb.summary | Summarize one .kicad_pcb file by project-relative path. | file |
schematic.resolve_pins | Resolve project-local symbol pin offsets for pin-aware schematic authoring; optional symbol_reference returns placed-symbol absolute coordinates with coordinate_frame. | file |
schematic.apply_patch | Apply transaction-only schematic operations with typed args: set_generator, add_symbol, move_symbol, delete_symbol, clear_items, add_wire, add_label, add_global_label, add_hier_label, add_sheet, set_property, and annotate. | file |
pcb.apply_operations | Apply transaction-only PCB operations with typed args: set_generator, add_setup, add_net, import_netlist, clear_items, place_footprint, move_item, rotate_item, delete_item, route_trace, add_board_outline, add_via, add_zone, set_netclass, and refill_zones. | file, operation-specific cli |
transaction.begin | Start a transaction overlay and return the tx_id used by mutation tools. | file |
transaction.commit | Validate and promote touched overlay files, then close the transaction. | file |
transaction.rollback | Delete the overlay and close the transaction without promoting files. | file |
validate.run | Run schema and parse gates, then optional kicad-cli ERC/DRC when available. | file, optional cli |
supplier.search | Search configured supplier adapters for part candidates, with optional supplier filtering and obsolete part filtering. | supplier APIs or fixture-backed adapters |
supplier.compare | Compare configured supplier pricing and select the cheapest eligible in-stock, MOQ-valid offer by unit_price * quantity. | supplier APIs or fixture-backed adapters |
bom.generate | Generate KiCad-style XML and structured JSON BOM output from caller-provided entries. | file, supplier APIs when pricing is available |
supplier.config | Read or update supplier ordering, enablement, region, currency, and base URL while masking credential status. | file, environment |
Transaction lifecycle tools are exposed over MCP stdio. They support begin, commit, rollback, overlay writes, validation hooks, diff summaries, and receipts. transaction.status is not exposed.
Profiles are fail-closed and backed by a capability registry:
| Profile | Status | Notes |
|---|---|---|
inspect | Enabled | Exposes project, schematic, and PCB read tools. |
author-schematic | Enabled | Conservative file-backed schematic mutation with strict operation schemas. |
author-pcb | Enabled | Conservative file-backed PCB mutation with strict operation schemas. |
validate-export | Enabled | Parse validation always runs. CLI checks run only when kicad-cli is detected. |
supplier | Enabled | Exposes supplier.search, supplier.compare, bom.generate, and supplier.config in that order. |
libraries | Disabled | No library search tool is exposed. Mutations resolve only project-local symbol and footprint libraries. |
routing | Disabled | Roadmap metadata only. No autorouting tool is exposed. |
Backends follow the same rule. file is enabled. cli is enabled only when kicad-cli is found and is used for validation, semantic commit checks, and operation-specific KiCad CLI work such as zone refill. ipc_gui is disabled and experimental. ipc_headless is a future KiCad 11 path and is not selectable. swig_legacy is forbidden in core dispatch.
Mutations require an active transaction created by the transaction API. A transaction copies the project into a temporary overlay workspace, records touched files, and keeps original project files unchanged until commit.
Commit can run an injected validation hook, computes file diffs and hashes, emits a receipt, then promotes changed overlay files back to the project. Rollback deletes the overlay. Failed validation blocks commit and keeps the original project intact.
The current stdio mutation tools use strict typed args and write only inside the transaction overlay. Semantic schematic and PCB operations are KiCad 10-only: unsupported file versions, missing required CLI checks, unresolved project-local libraries, invalid hierarchy links, unknown nets, invalid layers, and malformed geometry fail closed with structured errors. When a semantic commit needs kicad-cli and it is missing, commit reports cli_required and leaves the transaction active for rollback.
MCP clients should use this sequence for metadata changes:
transaction.begin with the absolute project_root.tx_id from structuredContent.schematic.apply_patch or pcb.apply_operations with the same project_root, returned tx_id, target path, and typed operation payload.transaction.commit with that tx_id to run commit validation and promote overlay changes, or call transaction.rollback with that tx_id to discard the overlay.Normal MCP metadata mutation preserves existing root file-format (version ...) atoms. It does not auto-migrate user files or turn arbitrary projects into KiCad 10-native files.
Symbol, pin, and footprint lookup is project-local only. The resolver reads root sym-lib-table and fp-lib-table entries, accepts local KiCad library paths under the sandbox, and pins ${KIPRJMOD} to the sandboxed project root. schematic.resolve_pins exposes library pin offsets for pin-aware authoring without opening the KiCad GUI; with optional symbol_reference, it returns placed-symbol absolute coordinates and coordinate_frame="schematic_absolute". It does not read global library tables, search remote catalogs, or download libraries.
Hierarchy support is file-backed and conservative. add_sheet can add a referenced child sheet, add_hier_label requires the target schematic to be referenced by a parent sheet in the transaction workspace, and hierarchy errors fail closed before overlay promotion.
PCB net-sensitive operations treat the schematic as authority. This is the schematic as authority policy for authoring: place_footprint links a footprint to an existing schematic symbol source, and routing, via, zone, and netclass operations use existing board net metadata derived from the project. add_net is an explicit recovery operation for declaring a board net before routing when the caller intentionally needs it.
clear_items removes selected generated schematic or PCB item kinds during a transaction so callers can rebuild stale wires, labels, traces, vias, or zones without direct file edits. add_setup inserts missing KiCad 10 board setup stackup without requiring board nets and writes default clearance, track width, via diameter, and drill constraints to .kicad_dru. add_net inserts an explicit root board net. import_netlist updates board nets and footprint pad-net assignments from the schematic before net-aware routing; if existing board nets are dropped because they are absent from the schematic export, pcb.apply_operations succeeds and returns a non-fatal diagnostics warning with exact dropped_nets. route_trace inserts explicit caller-provided segment geometry only. It is not autorouting and it does not move endpoints, infer paths, or create nets. add_board_outline inserts explicit caller-provided board outline geometry only. It is not autorouting or layout automation. set_netclass writes KiCad 10 .kicad_dru design-rule data instead of legacy board netclass blocks. refill_zones is a KiCad CLI-backed whole-board zone refill on the transaction overlay and must be final in a PCB operation batch.
Supplier tools read ~/.config/kicad-mcp/suppliers.json. If the file is missing, supplier.config and supplier-backed tools create a default config with lcsc, digikey, newark, and nexar enabled in that order, using region US, currency USD, and no custom base URL. Use supplier.config to read or update supplier ordering and enablement; credential status is reported as booleans and secret values are never returned.
Credentials come from environment variables:
| Supplier | Required environment variables |
|---|---|
lcsc | LCSC_API_KEY, LCSC_API_SECRET |
digikey | DIGIKEY_CLIENT_ID, DIGIKEY_CLIENT_SECRET |
newark | NEWARK_API_KEY; optional contract-pricing fields are NEWARK_CUSTOMER_ID and NEWARK_SECRET_KEY |
nexar | NEXAR_CLIENT_ID, NEXAR_CLIENT_SECRET |
Default tests stay offline. Live supplier tests require credentials and run only when KICAD_MCP_LIVE_SUPPLIER_TESTS=1 is set.
supplier.compare chooses the cheapest eligible priced offer by extended price, calculated as unit_price * quantity, after excluding offers that fail stock or MOQ checks. Shipping, tax, import fees, account-specific discounts, and currency conversion are not included.
bom.generate uses caller-provided BOM entries. It returns structured JSON plus KiCad-style XML when requested. DNP entries are marked with DNP="yes" in XML and are excluded from quantity and cost totals.
The MVP is local, file-first, and sandboxed around an absolute KiCad project root.
Default tests do not require KiCad binaries:
uv run pytest
uv run pytest -m "not integration"
uv run ruff check .
uv run ruff format --check .
uv run mypy src
uv buildOptional integration tests require kicad-cli and skip when it isn't available:
uv run pytest -m integrationUseful smoke checks:
uv run python -m kicad_mcp --help
uv run kicad-mcp --helpKiCad CLI support is optional. Without kicad-cli, validate.run still performs schema validation, sandbox checks, project inventory checks, and parse gates, then reports CLI checks as unavailable. With kicad-cli, validation can run KiCad ERC and DRC forms after the parse gate passes.
KiCad old-version warnings are keyed to the root file-format (version ...) atoms in .kicad_sch and .kicad_pcb files. Repo-owned minimal templates and fixtures are KiCad 10-native after this fix, with schematic version 20260306 and PCB version 20260206. For user projects that need a format upgrade, back up or copy the project first, intentionally run KiCad 10 open/save or kicad-cli sch upgrade --force and kicad-cli pcb upgrade --force, then review the resulting diffs.
No MVP test requires opening the KiCad GUI.
This release does not implement or expose:
refill_zones refills the whole board through KiCad CLI.pcbnew dispatch.Future KiCad 11 IPC/headless support fits behind the existing backend registry as ipc_headless. It is documented as a future, disabled backend so tool contracts can stay stable later without pretending the path works today.
See docs/architecture.md for a concise architecture, security, and tool reference.
Apache-2.0. See LICENSE.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 24 | Test point | GEN_1 | TP_3V3, TP_3V3_A, TP_5V_SYS, TP_24V_SAFE, TP_24VV, TP_CANH, TP_CANL, TP_DRV0, TP_DRV1, TP_DRV2, TP_DRV3, TP_DRV4, TP_DRV5, TP_FAULT_OK, TP_FAULT_SET_N, TP_REQ_SUM +8 |
| 23 | 100nF | GEN_2 | C_ADS1, C_CAN, C_FILT0, C_FILT1, C_FILT2, C_FILT3, C_FILT4, C_FILT5, C_FLASH, C_OT, C_REQREF, C_RESET, C6, C8, C11, C13 +7 |
| 22 | 100k | GEN_2 | R_GPD0, R_GPD1, R_GPD2, R_GPD3, R_GPD4, R_GPD5, R_GPD7, R_MASTERPD, R_Q8PD, R_Q9PD, R_REQPD0, R_REQPD1, R_REQPD2, R_REQPD3, R_REQPD4, R_REQPD5 +6 |
| 15 | 10k | GEN_2 | R_BOOT, R_FAULT_SET, R_PWR24, R_Q8B, R_Q9B, R_RESET, R_RUN, R_SAFE_PULL, R_SAFELED, R_SSRLED0, R_SSRLED1, R_SSRLED2, R_SSRLED3, R_SSRLED4, R_SSRLED5 |
| 10 | 1k | GEN_2 | R_3V3, R_FAULTLED, R_FILT0, R_FILT1, R_FILT2, R_FILT3, R_FILT4, R_FILT5, R_STATUS, R_XOUT |
| 7 | 100R | GEN_2 | R_G0, R_G1, R_G2, R_G3, R_G4, R_G5, R_G7 |
| 7 | BAT54/1N4148 fault OR | GEN_2 | D_F0, D_F1, D_F2, D_F3, D_F4, D_F5, D_F6 |
| 6 | 2N7002/BSS123 | GEN_3 | Q1, Q2, Q3, Q4, Q5, Q6 |
| 6 | 4.7k 0.1-1% | GEN_2 | R_PU0, R_PU1, R_PU2, R_PU3, R_PU4, R_PU5 |
| 6 | Channel LED | GEN_2 | D_SSR0, D_SSR1, D_SSR2, D_SSR3, D_SSR4, D_SSR5 |
| 6 | low leakage ESD optional | GEN_2 | D_T0, D_T1, D_T2, D_T3, D_T4, D_T5 |
| 6 | optional cable TVS | GEN_2 | TVS_SSR0, TVS_SSR1, TVS_SSR2, TVS_SSR3, TVS_SSR4, TVS_SSR5 |
| 3 | 1uF | GEN_2 | C_ADS2, C9, C12 |
| 2 | 100k spare pulldown | GEN_2 | R_AIN2PD, R_AIN3PD |
| 2 | 15pF | GEN_2 | C_X1, C_X2 |
| 2 | 2.2k/4.7k | GEN_2 | R_SCL, R_SDA |
| 2 | 27R | GEN_2 | R_USBM, R_USBP |
| 2 | 5.1k | GEN_2 | R_CC1, R_CC2 |
| 2 | SN74LVC08 AND gates | GEN_14 | U13, U14 |
| 2 | net tie | GEN_2 | NT_FAULT_STATUS, NT_SAFE_STATUS |
| 1 | 10.0k 0.1% | GEN_2 | R_OT_BOT |
| 1 | 10.0k 1% | GEN_2 | R_REQ_BOT |
| 1 | 100nF 50V | GEN_2 | C3 |
| 1 | 100nF ADC_AVDD | GEN_2 | C30 |
| 1 | 100nF USB_VDD | GEN_2 | C29 |
| 1 | 100uF 50V | GEN_2 | C1 |
| 1 | 10k optional | GEN_2 | R_ALERT |
| 1 | 10uF bulk | GEN_2 | C31 |
| 1 | 120R | GEN_2 | R_TERM |
| 1 | 12MHz crystal | GEN_2 | X1 |
| 1 | 13.0k 0.1% | GEN_2 | R_OT_TOP |
| 1 | 13.7k 1% | GEN_2 | R_REQ_TOP |
| 1 | 1A safety feed fuse | GEN_2 | F2 |
| 1 | 1nF | GEN_2 | C_SUM |
| 1 | 1uF 50V | GEN_2 | C2 |
| 1 | 1uF VREG_VOUT | GEN_2 | C26 |
| 1 | 220uF 10V | GEN_2 | C5 |
| 1 | 220uF 50V | GEN_2 | C4 |
| 1 | 24V DC contactor coil | GEN_2 | J_COIL |
| 1 | 24V input 5.08mm | GEN_2 | J1 |
| 1 | 24V power LED | GEN_2 | D_PWR24 |
| 1 | 2A fuse/PTC | GEN_2 | F1 |
| 1 | 2x 100nF DVDD | GEN_2 | C27-C28 |
| 1 | 3.3V LED | GEN_2 | D_3V3 |
| 1 | 4.7k 0.25W | GEN_2 | R_SAFE_OPTO |
| 1 | 4.7uF | GEN_2 | C10 |
| 1 | 47uF 10V | GEN_2 | C7 |
| 1 | 5-pin SWD | GEN_5 | J_SWD |
| 1 | 60V logic NMOS | GEN_3 | Q7 |
| 1 | 68uH >=3A | GEN_2 | L1 |
| 1 | 6x 100nF IOVDD | GEN_2 | C20-C25 |
| 1 | ADS1115 | GEN_10 | U7 |
| 1 | AGND-GND single point | GEN_2 | TP_AGND_TIE |
| 1 | AP7333-33 LDO | GEN_3 | U6 |
| 1 | BOOTSEL | GEN_2 | SW_BOOT |
| 1 | Board status LED | GEN_2 | D_STATUS |
| 1 | CAN CMC optional | GEN_4 | CMC_CAN |
| 1 | CAN connector | GEN_4 | J_CAN |
| 1 | CAN termination jumper | GEN_2 | JP_TERM |
| 1 | Coil LED optional | GEN_2 | LED_COIL |
| 1 | DC flyback diode | GEN_2 | D_COIL |
| 1 | Fault reset | GEN_2 | SW_FAULT_RESET |
| 1 | LM2596S-5.0 buck | GEN_5 | U5 |
| 1 | MBR360/SS34 | GEN_2 | D3 |
| 1 | MCP6544 OT/max-two | GEN_11 | U9 |
| 1 | MCP6544 overtemp comparators | GEN_14 | U8 |
| 1 | MMBT3904 MCU reset pull | GEN_3 | Q9 |
| 1 | MMBT3904 safety fault pull | GEN_3 | Q8 |
| 1 | NC safety loop | GEN_2 | J2 |
| 1 | PC817/LTV-817 | GEN_4 | U10 |
| 1 | PESD2CAN/SM24CANB | GEN_3 | D_CAN |
| 1 | RP2040 QFN-56 | GEN_37 | U1 |
| 1 | Red fault LED | GEN_2 | D_FAULT |
| 1 | Reset | GEN_2 | SW_RESET |
| 1 | SMBJ33A TVS | GEN_2 | D2 |
| 1 | SN74LVC00 fault latch | GEN_8 | U12 |
| 1 | SN74LVC14 Schmitt inverter | GEN_4 | U11 |
| 1 | SS14 USB ORing | GEN_2 | D5 |
| 1 | SS14 buck ORing | GEN_2 | D4 |
| 1 | SS54 reverse protection | GEN_2 | D1 |
The 215 most common of 233 parts.

matheusfalcaopinto/kAIcad-MCP
KiCad MCP is an Apache-2.0 Python package for a Linux stdio Model Context Protocol server for KiCad project workflows.

aeonSolutions/AeonLabs-AI-Volvo-MKII-Open-Hardware
Volvo MKII Open Hardware


rin67630/Drok-Juntek-on-steroids
Extend the possibilities of cheap digital power supplies with a WiFi module

sdylewski/Analog-Redial
A circuit board for old telephones to come back to life. Plug one or two phones in, and you can call the other phone, use bluetooth, connect to others via voip, and do a variety of other things with a plain old rotary…


ToneAlchemy/BiasPro
A professional-grade, dual-probe Arduino Bias Meter for guitar tube amplifiers. Open source hardware & firmware

mikelawrence/esphome-indoor-multi-sensor-hardware
ESPHome Indoor Multi-Sensor hardware. This design supports Radar/PIR Presence, Temperature, Humidity, Pressure, Light, CO2, CO, VOC, NOX and PM sensors.

It measures 790 × 980 mm and has 2 copper layers, 1.6 mm thick.
233 parts, built around the ADS1115. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the matheusfalcaopinto/kAIcad-MCP repository on GitHub, at the commit this page was made from: the board is BedCAN_MCP/BedCAN_MCP.kicad_pcb and its schematic BedCAN/BedCAN.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).