mcp-kicad-cli
Provides tools for KiCad CLI automation, enabling ERC, DRC, BOM export, netlist export, Gerbers, drill files, STEP, IPC-2581, and GLB output from KiCad projects.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-kicad-cli Run DRC on board.kicad_pcb"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-kicad-cli
Model Context Protocol server for KiCad CLI automation.
mcp-kicad-cli exposes KiCad's command-line tooling to MCP clients for ERC, DRC, BOM export, netlist export, Gerbers, drill files, STEP, IPC-2581, and GLB output. It is local-first: no cloud API key is required, but KiCad must be installed on the machine running the server.
This is an alpha extraction from the SpectraSynq K1 hardware automation stack. It wraps KiCad CLI commands; it does not bundle KiCad or board design files.
Quickstart
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
pytestVerify KiCad CLI is available:
kicad-cli versionRun the server:
export KICAD_CLI="$(command -v kicad-cli)"
mcp-kicad-cliRelated MCP server: KiCad Agentic MCP
Honest terminal demo
After install, this copy-paste check exercises the package through the same command runner used by the MCP tool:
python - <<'PY'
from mcp_kicad_cli.server import version
print(version()["stdout"].strip())
PYExpected output is your installed KiCad CLI version, for example 9.0.6.
MCP client config
After installing the package in the Python environment used by your MCP client, add:
{
"mcpServers": {
"kicad-cli": {
"command": "mcp-kicad-cli",
"args": [],
"env": {
"KICAD_CLI": "/opt/homebrew/bin/kicad-cli"
}
}
}
}See examples/claude_desktop_config.json.
Tools
version()— return the installed KiCad CLI version.sch_erc(schematic, out="erc.json", format="json", exit_code_violations=True)— run ERC on a.kicad_sch.sch_export_bom(schematic, out_csv="bom.csv", fields="*")— export a CSV BOM.sch_export_netlist(schematic, out_net="project.net", fmt="kicadsexpr")— export a schematic netlist.pcb_drc(board, out="drc.json", format="json", exit_code_violations=True)— run DRC on a.kicad_pcb.pcb_export_gerbers(board, out_dir="fab/gerbers")— export Gerbers.pcb_export_drill(board, out_dir="fab/drill")— export drill files.pcb_export_step(board, out_file="mechanical/board.step")— export STEP.pcb_export_ipc2581(board, out_file="fab/board.ipc")— export IPC-2581.pcb_export_glb(board, out_file="mechanical/board.glb")— export GLB.
KiCad returns exit code 5 when violations are found; DRC/ERC wrappers treat 0 and 5 as command-level success and report the violation counts in summary when JSON output exists.
Provenance
Extracted from SpectraSynq/K1.hardware commit 9e0b80beec0840162d3c3946f38c5c83af259790; see docs/provenance.md.
This repo is now the canonical home for the KiCad CLI MCP server.
License
Apache-2.0 — see LICENSE.
Available Tools
10 toolspcb_drcC
Run DRC on a .kicad_pcb file.
Inputs: board (required), out, format, exit_code_violations. Returns: object
pcb_export_drillC
Export drill files.
Inputs: board (required), out_dir. Returns: object
pcb_export_gerbersB
Export one-file-per-layer Gerbers.
Inputs: board (required), out_dir. Returns: object
pcb_export_glbC
Export a GLB 3D model.
Inputs: board (required), out_file. Returns: object
pcb_export_ipc2581C
Export IPC-2581 manufacturing data.
Inputs: board (required), out_file. Returns: object
pcb_export_stepC
Export a STEP 3D model.
Inputs: board (required), out_file. Returns: object
sch_ercC
Run ERC on a .kicad_sch file.
Inputs: schematic (required), out, format, exit_code_violations. Returns: object
sch_export_bomC
Export a CSV BOM from a KiCad schematic.
Inputs: schematic (required), fields, out_csv. Returns: object
sch_export_netlistC
Export a schematic netlist.
Inputs: schematic (required), fmt, out_net. Returns: object
versionA
Return the installed KiCad CLI version.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a unique purpose: schematic tools are prefixed with `sch_`, PCB tools with `pcb_`, and export targets (Gerbers, drill, STEP, IPC2581, GLB) are clearly distinct. No two tools could be confused.
Tool names follow a consistent `sch_`/`pcb_` prefix plus verb and optional object pattern, using lowercase with underscores. The `version` tool is the only one without a prefix, but it is a standalone command and does not break the overall consistency.
10 tools is well-scoped for a KiCad CLI server, covering the essential schematic and PCB checks and exports without unnecessary bloat. Each tool serves a distinct and useful function.
The set covers core KiCad workflows: ERC/DRC checks, BOM/netlist exports, and common manufacturing outputs (Gerbers, drill, STEP, IPC2581, GLB). Minor gaps like schematic PDF or SVG export are possible additions, but the existing surface is comprehensive for typical use.
Related MCP Connectors
Run ERC, DRC, parity, BOM and export checks on KiCad 9 boards before manufacturing.
Design, route, check, review and export manufacturable PCBs from plain language; KiCad import.
EasyGerber brings AI printed circuit board (PCB) design, layout, and routing to MCP-compatible assistants. Describe a circuit or start from firmware pin assignments, search published electronic components, and build schematics using catalog parts with their footprints and available 3D models. Create and revise boards, generate layouts with automatic component placement and routing, inspect previews, and check saved layouts for blocking design issues. Export manufacturing ZIPs containing Gerber and drill files, a bill of materials, and component placement data, or download an editable EasyGerber (.egb) file. Start without signing up. Your agent uses one private board reference to create and continue a board, including catalog access, edits, layout, checks, previews, and exports, without a separate guest setup step or token to manage. To keep the board in your account or work with permitted saved personal or organization boards, complete EasyGerber sign-in and OAuth consent, then resume the same task. Account permissions, plan limits, and generation billing apply; support depends on your MCP client and installed integration.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP servers for KiCad schematic, PCB, symbol, footprint, and project automation, enabling AI-assisted electronic design via tools for read/write, analysis, and exports.109349 PyPI16GPL 3.0
- AlicenseNot gradedqualityBmaintenanceNative KiCad 10 plugin exposing 202 MCP tools for schematics, PCB layout, routing, ERC/DRC and manufacturing output. KiCad itself verifies the result through kicad-cli.13AGPL 3.0
- AlicenseBqualityCmaintenanceProvides schematic/PCB analysis, authoring, and SPICE simulation through MCP, enabling direct KiCad file manipulation and verification without requiring KiCad for reading.18MIT
- AlicenseAqualityCmaintenanceEnables MCP-compatible assistants to inspect and edit the open PCB in KiCad, including reading board info, footprints, nets, tracks, selection, and BOM data, as well as moving footprints, adding tracks and text, updating BOM fields, and saving the board.13MIT