Skip to the content
2 layers790 × 980 mmBedCAN MCP, the printed circuit board in 3D

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

Size
790 × 980 mm
Copper layers
2
Thickness
1.6 mm
Parts
233
Nets
118
Pads
577
Tracks, vias
813, 236
Routed
Yes
KiCad
KiCad 1.0 (file 20260206)
Created
7 May 2026
Updated
17 May 2026

Overview

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.

Main components

1

README

README.md

KiCad MCP

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.

Setup

bash
uv sync
uv run kicad-mcp --help
uv run python -m kicad_mcp --help

After publication, the console script can also run through uvx:

bash
uvx kicad-mcp --version
uvx kicad-mcp stdio

Commands

Start the MCP stdio server with either entrypoint:

bash
uv run kicad-mcp stdio
uv run python -m kicad_mcp stdio

The stdio server speaks line-delimited JSON-RPC. Stdout is reserved for protocol responses. Diagnostics go to stderr so MCP clients can parse stdout safely.

Tools

The stdio tool list exposes only MVP-safe tools:

ToolPurposeBackend
project.inspectSummarize one sandboxed KiCad project root.file
schematic.summarySummarize one .kicad_sch file by project-relative path.file
pcb.summarySummarize one .kicad_pcb file by project-relative path.file
schematic.resolve_pinsResolve project-local symbol pin offsets for pin-aware schematic authoring; optional symbol_reference returns placed-symbol absolute coordinates with coordinate_frame.file
schematic.apply_patchApply 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_operationsApply 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.beginStart a transaction overlay and return the tx_id used by mutation tools.file
transaction.commitValidate and promote touched overlay files, then close the transaction.file
transaction.rollbackDelete the overlay and close the transaction without promoting files.file
validate.runRun schema and parse gates, then optional kicad-cli ERC/DRC when available.file, optional cli
supplier.searchSearch configured supplier adapters for part candidates, with optional supplier filtering and obsolete part filtering.supplier APIs or fixture-backed adapters
supplier.compareCompare configured supplier pricing and select the cheapest eligible in-stock, MOQ-valid offer by unit_price * quantity.supplier APIs or fixture-backed adapters
bom.generateGenerate KiCad-style XML and structured JSON BOM output from caller-provided entries.file, supplier APIs when pricing is available
supplier.configRead 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.

Capability Profiles

Profiles are fail-closed and backed by a capability registry:

ProfileStatusNotes
inspectEnabledExposes project, schematic, and PCB read tools.
author-schematicEnabledConservative file-backed schematic mutation with strict operation schemas.
author-pcbEnabledConservative file-backed PCB mutation with strict operation schemas.
validate-exportEnabledParse validation always runs. CLI checks run only when kicad-cli is detected.
supplierEnabledExposes supplier.search, supplier.compare, bom.generate, and supplier.config in that order.
librariesDisabledNo library search tool is exposed. Mutations resolve only project-local symbol and footprint libraries.
routingDisabledRoadmap 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.

Transaction Semantics

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:

  1. Call transaction.begin with the absolute project_root.
  2. Copy the returned tx_id from structuredContent.
  3. Call supported mutations such as schematic.apply_patch or pcb.apply_operations with the same project_root, returned tx_id, target path, and typed operation payload.
  4. Call 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 Setup

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:

SupplierRequired environment variables
lcscLCSC_API_KEY, LCSC_API_SECRET
digikeyDIGIKEY_CLIENT_ID, DIGIKEY_CLIENT_SECRET
newarkNEWARK_API_KEY; optional contract-pricing fields are NEWARK_CUSTOMER_ID and NEWARK_SECRET_KEY
nexarNEXAR_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.

Security Model

The MVP is local, file-first, and sandboxed around an absolute KiCad project root.

  • Project roots must be absolute directories.
  • Project paths are normalized under the root.
  • Parent traversal and absolute paths outside the root are rejected.
  • Symlink escapes are rejected after resolution.
  • KiCad project, schematic, and PCB files are limited to 2,000,000 bytes by default.
  • Files must be UTF-8 text with expected KiCad root forms where applicable.
  • Mutation tools write only to transaction overlays until commit.
  • MCP stdout contains protocol JSON only. Diagnostics use stderr.

Testing

Default tests do not require KiCad binaries:

bash
uv run pytest
uv run pytest -m "not integration"
uv run ruff check .
uv run ruff format --check .
uv run mypy src
uv build

Optional integration tests require kicad-cli and skip when it isn't available:

bash
uv run pytest -m integration

Useful smoke checks:

bash
uv run python -m kicad_mcp --help
uv run kicad-mcp --help

Optional KiCad CLI Integration

KiCad 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.

MVP Exclusions

This release does not implement or expose:

  • No HTTP, SSE, or WebSocket MCP transport.
  • No autorouting.
  • No GUI IPC requirement.
  • GUI IPC mutation.
  • Remote, global, or downloaded symbol and footprint libraries.
  • Arbitrary KiCad version semantic mutation support.
  • PCB net creation independent from the schematic.
  • Selective zone refill. refill_zones refills the whole board through KiCad CLI.
  • No production-grade full electrical correctness guarantee.
  • No KiCad 11 headless IPC implementation.
  • Legacy SWIG pcbnew dispatch.
  • Supplier order placement, carts, payment, RFQ submission, and procurement checkout flows.
  • Auto-BOM extraction from schematics or PCB files.
  • Supplier plugins or third-party supplier plugin loading.
  • Datasheet fetching, extraction, indexing, or search pipeline.
  • Plugin placement, routing, scoring, or plugin pipeline automation.

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.

Architecture

See docs/architecture.md for a concise architecture, security, and tool reference.

License

Apache-2.0. See LICENSE.

Parts

233
QtyValueFootprintReferences
24Test pointGEN_1TP_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
23100nFGEN_2C_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
22100kGEN_2R_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
1510kGEN_2R_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
101kGEN_2R_3V3, R_FAULTLED, R_FILT0, R_FILT1, R_FILT2, R_FILT3, R_FILT4, R_FILT5, R_STATUS, R_XOUT
7100RGEN_2R_G0, R_G1, R_G2, R_G3, R_G4, R_G5, R_G7
7BAT54/1N4148 fault ORGEN_2D_F0, D_F1, D_F2, D_F3, D_F4, D_F5, D_F6
62N7002/BSS123GEN_3Q1, Q2, Q3, Q4, Q5, Q6
64.7k 0.1-1%GEN_2R_PU0, R_PU1, R_PU2, R_PU3, R_PU4, R_PU5
6Channel LEDGEN_2D_SSR0, D_SSR1, D_SSR2, D_SSR3, D_SSR4, D_SSR5
6low leakage ESD optionalGEN_2D_T0, D_T1, D_T2, D_T3, D_T4, D_T5
6optional cable TVSGEN_2TVS_SSR0, TVS_SSR1, TVS_SSR2, TVS_SSR3, TVS_SSR4, TVS_SSR5
31uFGEN_2C_ADS2, C9, C12
2100k spare pulldownGEN_2R_AIN2PD, R_AIN3PD
215pFGEN_2C_X1, C_X2
22.2k/4.7kGEN_2R_SCL, R_SDA
227RGEN_2R_USBM, R_USBP
25.1kGEN_2R_CC1, R_CC2
2SN74LVC08 AND gatesGEN_14U13, U14
2net tieGEN_2NT_FAULT_STATUS, NT_SAFE_STATUS
110.0k 0.1%GEN_2R_OT_BOT
110.0k 1%GEN_2R_REQ_BOT
1100nF 50VGEN_2C3
1100nF ADC_AVDDGEN_2C30
1100nF USB_VDDGEN_2C29
1100uF 50VGEN_2C1
110k optionalGEN_2R_ALERT
110uF bulkGEN_2C31
1120RGEN_2R_TERM
112MHz crystalGEN_2X1
113.0k 0.1%GEN_2R_OT_TOP
113.7k 1%GEN_2R_REQ_TOP
11A safety feed fuseGEN_2F2
11nFGEN_2C_SUM
11uF 50VGEN_2C2
11uF VREG_VOUTGEN_2C26
1220uF 10VGEN_2C5
1220uF 50VGEN_2C4
124V DC contactor coilGEN_2J_COIL
124V input 5.08mmGEN_2J1
124V power LEDGEN_2D_PWR24
12A fuse/PTCGEN_2F1
12x 100nF DVDDGEN_2C27-C28
13.3V LEDGEN_2D_3V3
14.7k 0.25WGEN_2R_SAFE_OPTO
14.7uFGEN_2C10
147uF 10VGEN_2C7
15-pin SWDGEN_5J_SWD
160V logic NMOSGEN_3Q7
168uH >=3AGEN_2L1
16x 100nF IOVDDGEN_2C20-C25
1ADS1115GEN_10U7
1AGND-GND single pointGEN_2TP_AGND_TIE
1AP7333-33 LDOGEN_3U6
1BOOTSELGEN_2SW_BOOT
1Board status LEDGEN_2D_STATUS
1CAN CMC optionalGEN_4CMC_CAN
1CAN connectorGEN_4J_CAN
1CAN termination jumperGEN_2JP_TERM
1Coil LED optionalGEN_2LED_COIL
1DC flyback diodeGEN_2D_COIL
1Fault resetGEN_2SW_FAULT_RESET
1LM2596S-5.0 buckGEN_5U5
1MBR360/SS34GEN_2D3
1MCP6544 OT/max-twoGEN_11U9
1MCP6544 overtemp comparatorsGEN_14U8
1MMBT3904 MCU reset pullGEN_3Q9
1MMBT3904 safety fault pullGEN_3Q8
1NC safety loopGEN_2J2
1PC817/LTV-817GEN_4U10
1PESD2CAN/SM24CANBGEN_3D_CAN
1RP2040 QFN-56GEN_37U1
1Red fault LEDGEN_2D_FAULT
1ResetGEN_2SW_RESET
1SMBJ33A TVSGEN_2D2
1SN74LVC00 fault latchGEN_8U12
1SN74LVC14 Schmitt inverterGEN_4U11
1SS14 USB ORingGEN_2D5
1SS14 buck ORingGEN_2D4
1SS54 reverse protectionGEN_2D1

The 215 most common of 233 parts.

More from matheusfalcaopinto/kAIcad-MCP

1
  • 2 layers50 × 40 mmRev3-kicad mcp, the printed circuit board in 3D

    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.

    6 partsApache-2.0

Similar boards

  • 2 layers168.9 × 123.3 mmOEM ECU, the printed circuit board in 3D

    OEM ECU

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

    Volvo MKII Open Hardware

    296 parts161CC0-1.0
  • 2 layers94 × 79 mm5 - Lizard Car, the printed circuit board in 3D

    5 - Lizard Car

    TRD-B/Lizard

    3D printed RC race car with custom electronics

    54 parts129CC-BY-4.0
  • 2 layers54.6 × 33 mmJuntekOnSteroidsTTGO, the printed circuit board in 3D

    JuntekOnSteroidsTTGO

    rin67630/Drok-Juntek-on-steroids

    Extend the possibilities of cheap digital power supplies with a WiFi module

    35 parts62
  • 2 layers155 × 70 mmPayphone v1, the printed circuit board in 3D

    Payphone v1

    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…

    137 parts46
  • 2 layers32.4 × 33 mmOpenXsensor, the printed circuit board in 3D

    OpenXsensor

    Ingwie/OpenAVRc_Hw

    OpenAVRc Hardware and addons

    40 parts26
  • 2 layers33.9 × 90 mmBiasPro InputProtection v3, the printed circuit board in 3D

    BiasPro InputProtection v3

    ToneAlchemy/BiasPro

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

    18 parts16MIT
  • 4 layers52.5 × 59.7 mmESPHome Indoor Multi Sensor, the printed circuit board in 3D

    ESPHome Indoor Multi Sensor

    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.

    113 parts14CERN-OHL-P-2.0
  • 4 layers260 × 113 mmCellKeeper, the printed circuit board in 3D

    CellKeeper

    cellkeeper-bms/cellkeeper-hardware

    PCB for the CellKeeper BMS

    480 parts11GPL-3.0

Questions

How big is the BedCAN MCP PCB?

It measures 790 × 980 mm and has 2 copper layers, 1.6 mm thick.

What parts does the BedCAN MCP use?

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.

Where can I download the BedCAN MCP KiCad files?

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.

Can I use the BedCAN MCP design in my own project?

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).