KiCad MCP Server
KiCad MCP Server enables AI assistants to analyze, validate, trace, generate code for, and edit KiCad schematics and PCBs through MCP tools.
Analyze schematics: list/search components, symbols, nets, hierarchical connections, pin functions, and I2C/SPI/GPIO/power domains.
Analyze PCBs: list footprints, get statistics, inspect nets/tracks, assess signal and power integrity, and initialize layout.
Trace connectivity: generate netlists and trace pin-level component/net connections accurately.
Validate designs: run ERC/DRC, detect pin conflicts, filter violations, and export reports.
Generate embedded code/config: device tree files, pinmux configuration, and hardware-oriented outputs.
Create/edit projects: create KiCad projects from templates, add components/wires/labels, and export Gerber manufacturing files.
Provides tools for analyzing KiCad schematics and PCBs, tracing netlist connections, validating designs with ERC/DRC, generating device tree and hardware test code, and creating new 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., "@KiCad MCP Server List all components in MyBoard.kicad_sch"
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.
KiCad MCP Server
A Model Context Protocol (MCP) server for KiCad 9.0+ that lets AI assistants analyze schematics, inspect PCBs, trace connections, validate designs, and generate embedded code.
Features
Schematic Analysis - Components, nets, symbols, hierarchical sheets
PCB Analysis - Footprints, tracks, routing quality, signal/power integrity via pcbnew API
Netlist Tracing - 100% accurate pin-level connection tracking
Design Validation - ERC/DRC via kicad-cli (headless, CI friendly)
Pin Analysis - Pin function detection, conflict analysis, pinmux config
Code Generation - Device tree (.dts) and hardware test code generation
Project Management - Create KiCad projects from templates
Parts Registry - Search 21,000+ verified parts on an open, no-login registry (PartReel by default,
PARTS_REGISTRY_URLto change) and download footprints/symbols/3D into the project; downloads are host-allowlisted, extension-checked and size-capped
Related MCP server: kicad-mcp
Requirements
KiCad 8.0+ (9.0 or 10.0 recommended)
kicad-cliin PATH (included with KiCad)
Installation
Recommended: Install into KiCad Python (Full PCB Analysis)
KiCad ships with its own Python that includes the pcbnew module. Installing into this Python gives you full PCB analysis capabilities (precise track lengths, via statistics, signal integrity, power integrity).
Step 1: Find your KiCad Python path:
Platform | Path |
Windows |
|
macOS |
|
Linux |
|
Step 2: Install the package into KiCad Python:
# Windows example (KiCad 10.0)
"C:\Program Files\KiCad\10.0\bin\python.exe" -m pip install fastmcp
"C:\Program Files\KiCad\10.0\bin\python.exe" -m pip install -e .
# macOS example
/Applications/KiCad/KiCad.app/Contents/Frameworks/python3 -m pip install fastmcp
/Applications/KiCad/KiCad.app/Contents/Frameworks/python3 -m pip install -e .Step 3: Configure MCP to use KiCad Python (see Configuration section below).
Fallback: Install into System Python (Limited PCB Analysis)
If you skip KiCad Python setup, the server still works but falls back to text-based PCB parsing. You get basic data (track counts, net names, widths) but lose precise lengths, design rules, and signal integrity analysis.
pip install -e .Configuration
Claude Desktop
Edit your config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
With KiCad Python (recommended):
{
"mcpServers": {
"kicad": {
"type": "stdio",
"command": "C:\\Program Files\\KiCad\\10.0\\bin\\python.exe",
"args": ["-m", "kicad_mcp_server"],
"cwd": "C:\\Users\\YourName\\Desktop\\kicad-mcp-server"
}
}
}With system Python (fallback):
{
"mcpServers": {
"kicad": {
"type": "stdio",
"command": "python",
"args": ["-m", "kicad_mcp_server"],
"cwd": "C:\\Users\\YourName\\Desktop\\kicad-mcp-server"
}
}
}Claude Code CLI
# With KiCad Python (recommended)
claude mcp add kicad -s user -- "C:\Program Files\KiCad\10.0\bin\python.exe" -m kicad_mcp_server
# With system Python (fallback)
claude mcp add kicad -s user -- python -m kicad_mcp_serverCursor / Windsurf / Other MCP Clients
Use the same config structure with your client's MCP settings. Point command to KiCad Python for full analysis, or python for fallback mode.
Verify Installation
After restarting your AI client, ask it:
"What tools are available for KiCad?"
You should see a list of KiCad MCP tools. To verify pcbnew is working:
"Get PCB statistics for MyBoard.kicad_pcb"
If the response shows Design Rules section with clearance/width values, pcbnew is active. If it shows board dimensions as approximation, you're in text-only mode.
Common issues:
KiCad is installed and
kicad-cliis accessibleThe
cwdpath in your config points to the correct directoryPython can import the package (
python -c "import kicad_mcp_server")
Usage
Once configured, you can interact with your KiCad projects through natural language in your AI assistant. Below are common workflows.
1. Analyze a Schematic
Point the AI to your .kicad_sch file and ask questions:
"List all components in C:\Projects\MyBoard\MyBoard.kicad_sch"
"Show me all the power nets in MyBoard.kicad_sch"
"Find all resistors with value 10k"
The AI will call tools like list_schematic_components, list_schematic_nets, search_symbols behind the scenes.
2. Trace Connections (Netlist-based)
First export a netlist, then trace connections with pin-level accuracy:
"Generate a netlist from MyBoard.kicad_sch"
"Trace all connections from U1"
"What pins are connected to the I2C_SDA net?"
This uses generate_netlist and trace_netlist_connection for 100% accurate results.
3. Validate Your Design
Run electrical and design rule checks:
"Run ERC on MyBoard.kicad_sch and show me any errors"
"Run DRC on MyBoard.kicad_pcb"
"Are there any unconnected pins?"
Uses run_erc, run_drc, and detect_pin_conflicts.
4. Analyze PCB
"Get statistics for MyBoard.kicad_pcb"
"List all footprints on the top layer"
"Find all tracks on the VDD_nRF net"
"Analyze PCB routing quality"
"Check signal integrity - are USB differential pairs length-matched?"
"Analyze power integrity - how's the GND coverage?"
5. Create a New Project
"Create a new KiCad project called LED_Blinker in C:\Projects"
"Add a 1k resistor called R1 to the schematic"
"Add an LED called D1"
"Add a wire from R1 pin 2 to D1 pin 1"
6. Pin Analysis and Code Generation
"Analyze pin functions for U1 in MyBoard.kicad_sch"
"Detect any pin conflicts in the design"
"Generate a device tree file for the STM32 on this board"
"Generate pytest hardware tests for all I2C devices"
Available Tools Reference
Schematic Analysis
Tool | Description |
| List components with filtering by type, value, or DNP status |
| List all nets, optionally filter power nets |
| Project metadata and statistics |
| Search components by pattern (regex) |
| Detailed info for a specific component |
PCB Analysis
Tool | Description |
| List footprints with optional layer filter |
| Board dimensions, layer count, design rules |
| Track segments, lengths, widths, vias for a specific net |
| Routing analysis: width/via distribution, net length ranking |
| Diff pair matching, RF traces, longest signal nets |
| Power zones, GND coverage, power routing analysis |
Netlist Analysis
Tool | Description |
| Export netlist from schematic via kicad-cli |
| Trace all connections from a component/pin |
| List all nets with pin connections |
| List components with their net connections |
Validation
Tool | Description |
| Electrical Rules Check on schematic |
| Design Rules Check on PCB |
| Find conflicting pin connections |
Editing
Tool | Description |
| Create an empty project (default) or one from a KiCad template ( |
| Add component with symbol from library |
| Add wire connection |
| Add local label |
| Initialize PCB with dimensions |
| Export Gerber files |
Editing Limitations
Schematic editing is experimental. KiCad has no Python API for schematic editing, so tools use manual S-expression manipulation. When adding components via add_component_from_library, the tool automatically reads the symbol definition from KiCad's library files and inserts it into the schematic — this ensures proper rendering.
Known limitations:
Wire connections may not form perfect electrical connections
Visual alignment is basic
KiCad must be closed and reopened to see file changes (no hot-reload)
Recommendation: Use KiCad GUI for design work. Use this MCP server for analysis, validation, and code generation.
Troubleshooting
"KiCad template not found" / "KiCad's Python (pcbnew) not found"
Make sure KiCad is installed at the standard path:
Windows:
C:\Program Files\KiCad\<version>\macOS:
/Applications/KiCad/Linux:
/usr/share/kicad/
create_kicad_project writes empty projects with KiCad's own pcbnew module, using KiCad's bundled Python when the server runs under another interpreter. For a non-standard install, set KICAD_PYTHON to KiCad's python executable.
"kicad-cli not found"
Add KiCad's bin directory to your PATH:
# Windows example
set PATH=%PATH%;C:\Program Files\KiCad\10.0\bin
# Linux/macOS example
export PATH="/usr/bin:$PATH""pcbnew module not found" / PCB analysis is limited
pcbnew is only available in KiCad's bundled Python. Two options:
Option A (recommended): Configure MCP to use KiCad Python — see Installation.
Option B: Accept text-only mode. You'll still get basic PCB data (footprints, track counts, net names) but without precise lengths or design rules.
Python 3.14 install fails
Make sure you have pip >= 26.0:
pip install --upgrade pip
pip install -e .Resources
Acknowledgments
Thanks to all contributors and community feedback:
@raffaeler for KiCad 10 compatibility testing and feedback (#9)
@shivam5594 for Python 3.14 install issue report (#11)
@derekc00 for lint fixes (#10)
@befedo for SchematicComponent dataclass access bug report and patch (#13)
License
MIT
Available Tools
39 toolsadd_component_from_libraryC
Add a component from KiCad's built-in library to the schematic.
Inputs: file_path (required), library_name (required), symbol_name (required), reference (required), +5 more. Returns: result
add_labelC
Add a local label (text label) to the schematic.
Inputs: file_path (required), text (required), x (required), y (required), +1 more. Returns: result
add_wireC
Add a wire (connection line) to the schematic.
Inputs: file_path (required), points (required). Returns: result
analyze_hierarchical_netsA
Analyze all nets in hierarchical schematic design.
This tool analyzes network connections across the entire hierarchy, showing how signals flow between main schematic and sub-sheets.
Inputs: file_path (required), filter_pattern, show_hierarchy. Returns: result
analyze_pcb_netsA
Analyze nets in a KiCad PCB file.
Provides track width distribution, via distribution, per-net track length ranking, layer coverage, and design rule comparison.
Inputs: file_path (required). Returns: result
analyze_pcb_power_integrityC
Analyze power integrity: copper zones, power net routing, GND coverage.
Inputs: file_path (required). Returns: result
analyze_pcb_signal_integrityA
Analyze signal integrity: diff pair matching, RF traces, critical nets.
Auto-detects differential pairs (e.g., USB_N/USB_P, DP/DN) and checks length matching. Reports RF trace dimensions and longest signal nets.
Inputs: file_path (required), net_name. Returns: result
analyze_pin_functionsB
Analyze pin functions and detect conflicts.
This function analyzes schematic to determine pin functions by:
Examining net names to infer functionality
Identifying MCU components and their pin mappings
Detecting potential pin conflicts
Inputs: schematic_path (required), reference. Returns: result
create_kicad_projectB
Create a complete KiCad 9.0+ project by copying KiCad's template.
This method copies a KiCad template project and modifies it, ensuring 100% compatibility with KiCad 9.0+.
Inputs: project_path (required), project_name (required), title, company. Returns: result
detect_pin_conflictsA
Detect pins with conflicting electrical connections.
This function checks for:
Multiple outputs on same net
Power-to-power connections
Unconnected input pins
Pin type mismatches
Inputs: schematic_path (required). Returns: result
export_drc_reportC
Export DRC report to file.
Inputs: pcb_path (required), output_path. Returns: result
export_erc_reportB
Export ERC report to file.
Inputs: schematic_path (required), output_path. Returns: result
export_gerberA
Export PCB to Gerber format for manufacturing.
Gerber files are required for PCB fabrication. This tool generates all necessary Gerber files including:
Copper layers (F.Cu, B.Cu)
Solder mask layers
Silkscreen layers
Edge cuts (board outline)
Drill files
Inputs: pcb_path (required), output_dir. Returns: result
extract_gpio_configB
Extract GPIO pin configurations from schematic.
Inputs: schematic_path (required), soc_family. Returns: result
extract_i2c_devicesC
Extract I2C bus and device configurations.
Inputs: schematic_path (required). Returns: result
extract_pinmux_configA
Extract pin multiplexing configuration for MCUs.
This function extracts pin multiplexing (pinmux) configuration for MCU components, showing which peripherals are assigned to which pins.
Inputs: schematic_path (required), component_type. Returns: result
extract_power_domainsC
Extract power domain and regulator configurations.
Inputs: schematic_path (required). Returns: result
extract_spi_devicesB
Extract SPI bus and device configurations.
Inputs: schematic_path (required). Returns: result
find_tracks_by_netB
Find track segments belonging to a specific net.
Inputs: file_path (required), net_name (required). Returns: result
generate_device_treeB
Generate device tree source (.dts) file from schematic.
This function analyzes a KiCad schematic and generates a device tree source file compatible with the specified SOC family.
Inputs: schematic_path (required), target_soc, output_path. Returns: result
generate_netlistB
Generate KiCad netlist from schematic file.
Inputs: schematic_path (required). Returns: result
get_drc_violationsB
Get filtered DRC violations from PCB.
Inputs: pcb_path (required), violation_type. Returns: result
get_erc_violationsB
Get filtered ERC violations from schematic.
Inputs: schematic_path (required), severity. Returns: result
get_netlist_componentsA
Get all components from netlist with their network connections.
Inputs: netlist_path (required), filter_ref. Returns: result
get_netlist_netsC
Get all nets from netlist file.
Inputs: netlist_path (required), filter_pattern. Returns: result
get_pcb_statisticsC
Get statistics about a KiCad PCB design.
Inputs: file_path (required). Returns: result
get_schematic_infoC
Get general information about a schematic file.
Inputs: file_path (required). Returns: result
get_symbol_detailsC
Get detailed information about a specific symbol/component.
Inputs: file_path (required), reference (required). Returns: result
list_pcb_footprintsB
List all footprints in a KiCad PCB file.
Inputs: file_path (required), filter_layer. Returns: result
list_schematic_componentsC
List all components in a KiCad schematic file.
Inputs: file_path (required), filter_type, filter_value, filter_dnp. Returns: result
list_schematic_netsB
List all nets in a KiCad schematic.
Inputs: file_path (required), filter_power. Returns: result
run_drcA
Run Design Rules Check (DRC) on PCB.
Checks for:
Clearance violations
Track spacing violations
Missing connections
Pad/footprint overlaps
Board edge constraints
Inputs: pcb_path (required). Returns: result
run_ercA
Run Electrical Rules Check (ERC) on schematic.
Checks for:
Unconnected pins
Power conflicts
Multiple outputs on same net
Pin type mismatches
Inputs: schematic_path (required). Returns: result
search_components_by_typeC
Search for components by type (OLED, sensor, display, etc.).
This tool intelligently searches for components by their type, value, footprint, or network connections to identify specific component categories.
Inputs: file_path (required), component_type (required), search_in_subsheets. Returns: result
search_symbolsC
Search for symbols/components matching a pattern.
Inputs: file_path (required), pattern (required), search_fields. Returns: result
setup_pcb_layoutA
Initialize PCB layout with specified dimensions.
Creates a .kicad_pcb file with the specified size based on the schematic. The PCB will be initialized with:
Specified dimensions
Default grid settings
Default layers
Standard design rules
Inputs: schematic_path (required), width, height, unit. Returns: result
trace_hierarchical_connectionA
Trace component connections across hierarchical schematics.
This tool traces connections through the entire schematic hierarchy, including sub-sheets, to show complete signal paths.
Inputs: file_path (required), reference (required), pin_number. Returns: result
trace_netlist_connectionB
Trace component connections using netlist file (most accurate).
Inputs: netlist_path (required), reference (required), pin_number. Returns: result
validate_pin_configurationC
Validate pin configuration conflicts for device tree generation.
This function validates that the pin configuration is suitable for device tree generation and reports any conflicts or issues.
Inputs: schematic_path (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 39 tools
Many tools have overlapping purposes, such as multiple net analysis tools (analyze_hierarchical_nets, analyze_pcb_nets, analyze_pcb_power_integrity, analyze_pcb_signal_integrity) and multiple pin analysis tools. This can cause confusion for agents.
Most tools follow a verb_noun pattern (e.g., add_component_from_library, create_kicad_project, list_schematic_components). Some deviations like analyze_hierarchical_nets and analyze_pcb_nets use adjectives but are still clear.
39 tools is high for a single server. While many are needed for comprehensive PCB design, several tools perform similar analyses (e.g., multiple net and DRC tools), suggesting possible consolidation.
The tool set covers a wide range of KiCad operations including schematic creation, analysis, extraction, and PCB layout setup. Minor gaps exist like missing component editing tools, but core workflows are well-supported.
Maintenance
Related MCP Connectors
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server for building and testing AI agents with multi-model experimentation and insights.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseAqualityAmaintenanceThis MCP server enables AI agents to understand and analyze electrical schematics from Cadence and Altium for comprehensive design reviews through natural conversations.11491 npm69Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents end-to-end control of KiCad 9+ for rule checks, manufacturing exports, production-readiness certification, and live PCB editor control.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for controlling KiCad EDA software, enabling schematics, PCB design, manufacturing outputs, design checks, and library management through any MCP-compatible AI assistant.MIT
- FlicenseNot gradedqualityBmaintenanceAn MCP server that enables language models to design real KiCad electronic schematics from plain-language descriptions, placing parts, wiring nets, and running KiCad's electrical rules check to produce editable .kicad_sch files.4-