KiCad MCP Server
Allows inspection, editing, analysis, and rendering of PCB layouts using KiCad's Python API, including tools for managing footprints, tracks, vias, zones, nets, text, shapes, dimensions, groups, selection, appearance, exports, screenshots, and CLI operations.
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 Show me the current board stackup"
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 ππ
An implementation of the Model Context Protocol (MCP) server for KiCad 9.0+, enabling Large Language Models (LLMs) like Claude to inspect, edit, analyze, and render PCB layouts in real-time.
It leverages the official kicad-python API to communicate with running KiCad instances over local Unix domain sockets or Windows named pipes.
π Key Features
This server exposes 14 specialized modules providing comprehensive control over the board layout:
Module | Description | Key Tools |
ποΈ Board | Inspect/update PCB configurations, units, and canvas settings |
|
π§© Footprints | Manage component properties, placements, and pads |
|
β‘ Tracks & Vias | List, route, resize, and remove traces and vias |
|
πΊοΈ Zones | Control copper pours, fill/unfill, and rule boundaries |
|
π Nets | Import netlists, manage classes, and trace connectivity |
|
π€ Text | Add and style free-standing board text labels and textboxes |
|
π¨ Shapes | Draw graphic segments, rects, circles, and polygons on user layers |
|
π Dimensions | Place precise dimension and measurement markings |
|
π₯ Groups | Read structural component groupings (KiCad 10+) |
|
π― Selection | Read active selection, select footprints, and invoke actions |
|
ποΈ Appearance | Adjust layer visibility, contrast modes, ratsnest lines, and flip view |
|
π¦ Exports | Export manufacturing files (Gerbers, drills, position, ODB++, PDF, STEP) |
|
πΈ Screenshots | Render visual PNG screenshots of the board or specific selection |
|
π» CLI Wrapper | Headless CLI automation for schematics, ERC, DRC, and more |
|
Related MCP server: KiCAD MCP Server
π Prerequisites
KiCad 9.0 or higher must be installed and running.
Enable the IPC API inside KiCad:
Go to Preferences β Preferences...
Navigate to Plugins
Check the Enable KiCad IPC API box.
Python 3.10+ (tested on Python 3.10 through 3.14).
βοΈ Installation & Setup
We recommend using uv for fast and isolated environment setup.
1. Clone the Repository
git clone https://github.com/brovk2008/Kicad-MCP-server.git
cd Kicad-MCP-server2. Set Up the Virtual Environment
# Using uv (recommended)
uv venv
uv pip install -e .
# Or using standard pip
python -m venv .venv
source .venv/bin/activate # Or `.venv\Scripts\activate` on Windows
pip install -e .Note: The project automatically applies a dynamic Protobuf descriptor pool patch to ensure compatibility with kicad-python 0.7.1 on Python 3.14.
π οΈ MCP Configuration
To use this server with Claude Desktop, add the configuration snippet below to your Claude configuration file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json
Configuration Snippet
{
"mcpServers": {
"kicad-mcp": {
"command": "uv",
"args": [
"run",
"--package",
"kicad-mcp",
"kicad-mcp"
],
"cwd": "C:/Users/techp/Downloads/more projects/Kicad mcp",
"env": {
"KICAD_API_SOCKET": "ipc:///tmp/kicad/api.sock"
}
}
}
}(Adjust the cwd directory to point to your local installation path. For Windows, the socket path defaults to ipc://%TEMP%\\kicad\\api.sock if not explicitly set).
π§ͺ Running Tests
A test suite is included to verify unit conversions, coordinate mappings, and error wrappers:
# Activate your virtual environment and run:
pytest tests/unit/π License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
141 toolsadd_aligned_dimensionB
Add an aligned dimension annotation to the board.
Inputs: end_x_mm (required), end_y_mm (required), height_mm (required), layer_name (required), +2 more.
add_arcC
Add a graphic arc to the board.
Inputs: end_x_mm (required), end_y_mm (required), mid_x_mm (required), mid_y_mm (required), +4 more.
add_arc_trackC
Add an arc track segment to the board.
Inputs: end_x_mm (required), end_y_mm (required), mid_x_mm (required), mid_y_mm (required), +6 more.
add_circleB
Add a graphic circle to the board.
Inputs: radius_mm (required), layer_name (required), center_x_mm (required), center_y_mm (required), +2 more.
add_polygonC
Add a graphic polygon to the board.
points_mm should be a list like [{"x_mm": 0, "y_mm": 0}, ...]
Inputs: points_mm (required), layer_name (required), filled, width_mm.
add_polygon_copper_zoneC
Add a polygonal copper pour zone to the board.
points_mm should be a list of dicts like [{"x_mm": 0, "y_mm": 0}, ...]
Inputs: points_mm (required), layer_name (required), name, net_name, +1 more.
add_rectangleC
Add a graphic rectangle to the board.
Inputs: x1_mm (required), x2_mm (required), y1_mm (required), y2_mm (required), +3 more.
add_rect_copper_zoneC
Add a rectangular copper pour zone to the board.
Inputs: x1_mm (required), x2_mm (required), y1_mm (required), y2_mm (required), +6 more.
add_rect_rule_areaB
Add a keep-out / rule area zone (non-copper) to the board.
Inputs: x1_mm (required), x2_mm (required), y1_mm (required), y2_mm (required), +2 more.
add_segmentC
Add a straight graphic segment (line) to the board.
Inputs: x1_mm (required), x2_mm (required), y1_mm (required), y2_mm (required), +2 more.
add_textC
Add a free text object to the board.
Inputs: x_mm (required), y_mm (required), value (required), bold, +4 more.
add_text_boxC
Add a text box to the board.
Inputs: value (required), x1_mm (required), x2_mm (required), y1_mm (required), +3 more.
add_to_selectionC
Add items to the active selection on the board by their IDs.
Inputs: item_ids (required).
add_trackC
Add a straight track segment to the board.
Inputs: end_x_mm (required), end_y_mm (required), start_x_mm (required), start_y_mm (required), +4 more.
add_viaC
Add a via to the board.
Inputs: x_mm (required), y_mm (required), locked, drill_mm, +3 more.
begin_commitA
Begin an edit transaction for batching multiple operations into a single Undo step.
Inputs: no named parameters.
clear_selectionA
Clear all active selections on the board.
Inputs: no named parameters.
drop_commitB
Drop/cancel the active transaction and discard changes.
Inputs: commit_id (required).
expand_text_variablesB
Expand text variables in the given string based on board/project settings.
Inputs: text (required).
export_3dC
Export the 3D STEP model of the board.
Inputs: output_path (required).
export_drillC
Export CNC drill files for manufacturing.
Inputs: output_path (required), format.
export_dxfC
Export the board layout to a DXF file.
Inputs: output_path (required), layers, polygon_mode.
export_gencadC
Export the board layout in GenCAD format.
Inputs: output_path (required).
export_gerbersC
Export the board layout to Gerber files in the specified output directory.
Inputs: output_dir (required), layers.
export_ipc2581C
Export the board in IPC-2581 assembly/manufacturing format.
Inputs: output_path (required).
export_ipc_d356B
Export netlist test data in IPC-D-356 format.
Inputs: output_path (required).
export_odbC
Export the board in ODB++ manufacturing format.
Inputs: output_path (required).
export_pdfC
Export the board to a PDF document.
Inputs: output_path (required), layers, single_document.
export_positionC
Export footprint component placement position files for assembly.
Inputs: output_path (required), side, format.
export_psC
Export the board layout to PostScript files.
Inputs: output_path (required), force_a4.
export_renderC
Render the 3D raytrace view of the board to an image file.
Inputs: output_path (required), width_px, height_px.
export_schematic_netlistC
Export the schematic design headlessly to a netlist file (e.g. ipc356).
Inputs: output_path (required), schematic_path (required), format.
export_schematic_pdfC
Export the schematic design headlessly to a PDF file.
Inputs: output_path (required), schematic_path (required).
export_statsC
Export board statistics report.
Inputs: output_path (required).
export_svgC
Export the board to an SVG file.
Inputs: output_path (required), layers, precision, fit_page_to_board.
flip_footprintB
Flip a footprint to the opposite side of the board (F.Cu <=> B.Cu).
Inputs: reference (required).
get_active_layerA
Get current active board layer name.
Inputs: no named parameters.
get_board_as_stringA
Retrieve the entire board (.kicad_pcb) content as text.
Inputs: no named parameters.
get_board_infoA
Get high-level information about the currently open board.
Inputs: no named parameters.
get_board_originC
Get board origin coordinates (grid or drill).
Inputs: origin_type.
get_board_screenshotC
Take a visual screenshot of the board and return it as a base64 PNG.
Inputs: layers, width_px.
get_board_screenshot_svgB
Retrieve the board visual layout as raw SVG text.
Inputs: layers.
get_connected_itemsC
Retrieve items connected to a specific pad.
Inputs: reference (required), pad_number (required).
get_custom_design_rulesA
Get custom design rules text and any parsing errors (KiCad 11+).
Inputs: no named parameters.
get_design_rulesA
Get raw design rules (KiCad 11+).
Inputs: no named parameters.
get_dimensionB
Get details of a specific dimension annotation by its ID.
Inputs: dim_id (required).
get_editor_appearanceB
Retrieve current visual settings for the PCB editor.
Inputs: no named parameters.
get_enabled_layersB
Get list of currently enabled board layers.
Inputs: no named parameters.
get_footprintB
Retrieve detailed information about a specific footprint by its reference designator.
Inputs: reference (required).
get_footprint_bounding_boxC
Get the bounding box of a footprint (in millimeters).
Inputs: reference (required).
get_groupB
Retrieve detailed information about a group and its member items by ID (KiCad 10+).
Inputs: group_id (required).
get_items_by_netclassC
Retrieve all board items associated with nets in a specific netclass.
Inputs: netclass (required), item_types.
get_netclass_for_netC
Retrieve netclass settings for a given net.
Inputs: net_name (required).
get_net_itemsC
Retrieve all board items associated with a specific net.
Inputs: net_name (required), item_types.
get_padB
Get detailed information for a single pad of a footprint.
Inputs: reference (required), pad_number (required).
get_selectionC
Retrieve items in the current board editor selection.
Inputs: no named parameters.
get_selection_as_stringA
Retrieve the selection content serialized in KiCad's board file format.
Inputs: no named parameters.
get_selection_screenshotC
Take a visual screenshot of only the selected items and return as base64 PNG.
Inputs: width_px.
get_shapeB
Get details of a specific graphic shape by its ID.
Inputs: shape_id (required).
get_stackupA
Get stackup layers, thickness, material, and electrical properties.
Inputs: no named parameters.
get_text_itemA
Get details of a specific text or text box item by its ID.
Inputs: text_id (required).
get_title_blockB
Get the board title block info.
Inputs: no named parameters.
get_trackC
Get details of a specific track by its ID.
Inputs: track_id (required).
get_tracks_by_netC
List tracks belonging to a specific net.
Inputs: net_name (required).
get_tracks_by_netclassA
List tracks belonging to all nets in a net class.
Inputs: netclass (required).
get_viaC
Get details of a specific via by its ID.
Inputs: via_id (required).
get_visible_layersB
Get list of visible board layers.
Inputs: no named parameters.
get_zoneC
Get details of a specific zone by its ID.
Inputs: zone_id (required).
import_netlistC
Import a netlist file into the board. (Requires newer KiCad/kipy API).
Inputs: netlist_path (required), dry_run, delete_extra, override_locks, +1 more.
interactive_move_footprintA
Initiates an interactive move in the GUI. Returns immediately but blocks further API calls until complete.
Inputs: reference (required).
kicad_check_versionA
Check if the connected KiCad version matches the kipy library version.
Inputs: no named parameters.
kicad_pingA
Check connection to KiCad and return version info.
Inputs: no named parameters.
list_dimensionsA
List dimension annotations on the board, optionally filtered by layer name.
Inputs: layer_name.
list_footprintsA
List footprints on the board, optionally filtered by reference designator substring.
Inputs: ref_filter.
list_groupsA
List structural groups of items defined on the board (KiCad 10+).
Inputs: no named parameters.
list_netsB
List nets on the board, optionally filtered by netclass name.
Inputs: netclass_filter.
list_padsC
List all pads of a footprint.
Inputs: reference (required).
list_shapesA
List graphic shapes on the board, optionally filtered by layer name.
Inputs: layer_name.
list_textA
List free text and text box items on the board, optionally filtered by layer name.
Inputs: layer_name.
list_tracksC
List tracks on the board, optionally filtered by net name and/or layer name.
Inputs: net_name, layer_name.
list_viasA
List vias on the board, optionally filtered by net name.
Inputs: net_name.
list_zonesA
List zones on the board, optionally filtered by net and/or layer.
Inputs: net_name, layer_name.
lock_dimensionC
Lock or unlock a dimension annotation.
Inputs: dim_id (required), locked (required).
lock_footprintC
Lock or unlock a footprint to prevent accidental movement.
Inputs: locked (required), reference (required).
lock_shapeC
Lock or unlock a shape.
Inputs: locked (required), shape_id (required).
lock_textC
Lock or unlock a text or text box item.
Inputs: locked (required), text_id (required).
lock_trackC
Lock or unlock a track segment.
Inputs: locked (required), track_id (required).
lock_viaC
Lock or unlock a via.
Inputs: locked (required), via_id (required).
lock_zoneC
Lock or unlock a zone.
Inputs: locked (required), zone_id (required).
move_and_rotate_footprintC
Move and rotate a footprint in one operation.
Inputs: x_mm (required), y_mm (required), reference (required), rotation_deg (required).
move_footprintB
Move a footprint to absolute coordinates (in millimeters).
Inputs: x_mm (required), y_mm (required), reference (required).
move_shapeC
Move a shape by a relative offset (in millimeters).
Inputs: shape_id (required), delta_x_mm (required), delta_y_mm (required).
move_trackB
Move a track by a relative delta (in millimeters).
Inputs: track_id (required), delta_x_mm (required), delta_y_mm (required).
move_zoneB
Shift a zone by a relative delta (in millimeters).
Inputs: zone_id (required), delta_x_mm (required), delta_y_mm (required).
push_commitC
Push/apply the active transaction and close the commit.
Inputs: commit_id (required), message.
refill_zonesC
Trigger refilling of all zones on the board.
Inputs: block, timeout_s.
remove_dimensionC
Remove a dimension annotation from the board.
Inputs: dim_id (required).
remove_footprintC
Remove a footprint from the board.
Inputs: reference (required).
remove_from_selectionA
Remove items from the active selection on the board by their IDs.
Inputs: item_ids (required).
remove_shapeB
Remove a shape from the board.
Inputs: shape_id (required).
remove_textC
Remove a text or text box item from the board.
Inputs: text_id (required).
remove_trackB
Remove a track segment from the board.
Inputs: track_id (required).
remove_tracks_in_rectA
Remove all tracks within a bounding box, optionally filtered by layer name.
Inputs: x1_mm (required), x2_mm (required), y1_mm (required), y2_mm (required), +1 more.
remove_viaC
Remove a via from the board.
Inputs: via_id (required).
remove_zoneC
Remove a zone from the board.
Inputs: zone_id (required).
revert_boardA
Revert board to the last saved state on disk.
Inputs: no named parameters.
rotate_footprintC
Rotate a footprint to a specific absolute angle (in degrees).
Inputs: reference (required), rotation_deg (required).
rotate_shapeB
Rotate a shape by an angle around a center point (in degrees).
Inputs: shape_id (required), angle_deg (required), center_x_mm (required), center_y_mm (required).
run_actionB
Trigger a KiCad TOOL_ACTION in the editor.
WARNING: Action names can be unstable between KiCad versions. Use with caution. Known actions:
'pcbnew.ZoneFiller.zoneFill'
'pcbnew.InteractiveRouter.DRCCheck'
'pcbnew.ZoneFiller.zoneUnfill'
'pcbnew.Editor.selectAll'
Inputs: action (required).
run_drcC
Run Design Rules Check (DRC) on a PCB layout.
Returns the report and any violations detected.
Inputs: board_path (required), severity.
run_ercB
Run Electrical Rules Check (ERC) on a schematic sheet.
Returns the report and any violations detected.
Inputs: schematic_path (required), severity.
run_kicad_cliC
Run an arbitrary headless kicad-cli command.
Example: command="sch", args=["erc", "project.kicad_sch"] command="pcb", args=["drc", "project.kicad_pcb"]
Inputs: args (required), command (required).
save_boardC
Save the board changes to file.
Inputs: no named parameters.
save_board_asC
Save the board as a new file.
Inputs: path (required), overwrite, include_project.
select_footprintsB
Select footprints on the board by their reference designators.
Inputs: references (required).
set_active_layerC
Set the active board layer.
Inputs: layer_name (required).
set_board_flipC
Flip the editor board view (view from back).
Inputs: flipped (required).
set_board_originC
Set board origin coordinates (grid or drill).
Inputs: x_mm (required), y_mm (required), origin_type (required).
set_custom_design_rulesC
Set custom design rules text (KiCad 11+).
Inputs: rules_text (required).
set_footprint_bom_excludedC
Set whether a footprint is excluded from the Bill of Materials (BOM).
Inputs: excluded (required), reference (required).
set_footprint_dnpC
Set the Do Not Populate (DNP) flag on a footprint.
Inputs: dnp (required), reference (required).
set_footprint_fieldB
Update or add a field on a footprint (e.g. Reference, Value, custom fields).
Inputs: value (required), reference (required), field_name (required), visible.
set_inactive_layer_displayA
Set the display mode of inactive layers.
Choose: 'normal', 'dimmed', or 'hidden'
Inputs: mode (required).
set_net_color_displayB
Set the display mode of net and netclass colors.
Choose: 'all', 'ratsnest', or 'off'
Inputs: mode (required).
set_ratsnest_displayA
Set the display mode of ratsnest lines.
Choose: 'all' (all layers) or 'visible' (visible layers only)
Inputs: mode (required).
set_title_blockA
Update title block information for the board.
All parameters are optional. Values not specified will remain unchanged.
Inputs: date, title, company, comments, +1 more.
set_visible_layersC
Set the list of visible board layers.
Inputs: layer_names (required).
update_dimension_layerC
Change the layer of a dimension annotation.
Inputs: dim_id (required), layer_name (required).
update_shape_layerC
Change the layer of a shape.
Inputs: shape_id (required), layer_name (required).
update_shape_widthC
Update the stroke line width of a shape.
Inputs: shape_id (required), width_mm (required).
update_text_attributesB
Update text formatting attributes.
Inputs: text_id (required), bold, italic, size_mm, +1 more.
update_text_layerB
Update the layer of a text or text box item.
Inputs: text_id (required), layer_name (required).
update_text_positionB
Update the position of a text item (top-left for text boxes).
Inputs: x_mm (required), y_mm (required), text_id (required).
update_text_valueC
Update the text value of a text or text box item.
Inputs: value (required), text_id (required).
update_track_netC
Update the net assigned to a track.
Inputs: net_name (required), track_id (required).
update_track_widthC
Update the width of a track segment.
Inputs: track_id (required), width_mm (required).
update_via_netC
Update the net assigned to a via.
Inputs: via_id (required), net_name (required).
update_via_sizeB
Update the diameter and/or drill size of a via.
Inputs: via_id (required), drill_mm, diameter_mm.
update_zone_clearanceC
Update the clearance setting of a copper zone.
Inputs: zone_id (required), clearance_mm (required).
update_zone_netB
Change the net assigned to a copper zone.
Inputs: zone_id (required), net_name (required).
update_zone_priorityC
Change the priority level of a zone.
Inputs: zone_id (required), priority (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 141 tools
Each tool has a distinct prefix (add_, remove_, list_, get_, set_, update_, etc.) and targets a specific board element (footprint, track, via, zone, etc.), making them easily distinguishable.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., add_track, remove_footprint, get_zone), with no mixing of conventions.
With 141 tools, the set is far too large. This overwhelms the agent and indicates a lack of scoping to essential operations.
Despite the huge number of tools, there are obvious gaps: no tool to add a footprint or add/edit nets directly, only import_netlist. Core lifecycle operations are missing.
Related MCP Connectors
Design, route, check, review and export manufacturable PCBs from plain language; KiCad import.
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
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.
Verified KiCad footprints, symbols & 3D models for AI agents. No signup, CC-BY-4.0, quality-gated.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to read and modify KiCAD PCB designs through the KiCAD IPC API, providing tools for board queries, footprint placement, track creation, DRC, and export.14MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with KiCAD for PCB design automation. Users can design PCBs using natural language, including component placement, routing, checks, and export.59 npmMIT
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with KiCAD for PCB design automation, including schematic editing, component placement, routing, DRC/ERC, and export.10027 npm2MIT
- AlicenseBqualityCmaintenanceEnables creating and editing KiCad projects through natural language, including scaffolding projects, placing schematic symbols, wires and labels, and adding PCB footprints, tracks and nets. It also runs ERC/DRC checks and exports to PDF, SVG, netlist, BOM, STEP, DXF, gerbers and drill files via kicad-cli.141MIT