Skip to main content
Glama
KiCad MCP Server

KiCad MCP Server

by Seeed-Studio

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_URL to 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-cli in PATH (included with KiCad)

Installation

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

C:\Program Files\KiCad\<version>\bin\python.exe

macOS

/Applications/KiCad/KiCad.app/Contents/Frameworks/python3

Linux

/usr/bin/python3 (if kicad python bindings installed)

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

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux: ~/.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_server

Cursor / 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:

  1. KiCad is installed and kicad-cli is accessible

  2. The cwd path in your config points to the correct directory

  3. Python 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_schematic_components

List components with filtering by type, value, or DNP status

list_schematic_nets

List all nets, optionally filter power nets

get_schematic_info

Project metadata and statistics

search_symbols

Search components by pattern (regex)

get_symbol_details

Detailed info for a specific component

PCB Analysis

Tool

Description

list_pcb_footprints

List footprints with optional layer filter

get_pcb_statistics

Board dimensions, layer count, design rules

find_tracks_by_net

Track segments, lengths, widths, vias for a specific net

analyze_pcb_nets

Routing analysis: width/via distribution, net length ranking

analyze_pcb_signal_integrity

Diff pair matching, RF traces, longest signal nets

analyze_pcb_power_integrity

Power zones, GND coverage, power routing analysis

Netlist Analysis

Tool

Description

generate_netlist

Export netlist from schematic via kicad-cli

trace_netlist_connection

Trace all connections from a component/pin

get_netlist_nets

List all nets with pin connections

get_netlist_components

List components with their net connections

Validation

Tool

Description

run_erc

Electrical Rules Check on schematic

run_drc

Design Rules Check on PCB

detect_pin_conflicts

Find conflicting pin connections

Editing

Tool

Description

create_kicad_project

Create an empty project (default) or one from a KiCad template (template="Arduino_Uno")

add_component_from_library

Add component with symbol from library

add_wire

Add wire connection

add_label

Add local label

setup_pcb_layout

Initialize PCB with dimensions

export_gerber

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 tools
add_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

    B3/5.0

    Scored across 39 tools

    Disambiguation2/5

    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.

    Naming Consistency4/5

    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.

    Tool Count3/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessMixed handling

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      This MCP server enables AI agents to understand and analyze electrical schematics from Cadence and Altium for comprehensive design reviews through natural conversations.
      11
      491 npm
      69
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      An 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
    • A
      license
      Not graded
      quality
      C
      maintenance
      An 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
    • F
      license
      Not graded
      quality
      B
      maintenance
      An 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
      -