KiCAD
STDIOAI-assisted KiCAD PCB design server enabling natural language control of schematic and board design operations
AI-assisted KiCAD PCB design server enabling natural language control of schematic and board design operations
A production-ready Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with KiCAD for PCB design automation. Built on the MCP 2025-06-18 specification, this server provides comprehensive tool schemas and real-time project state access for intelligent PCB design workflows.
The Model Context Protocol is an open standard from Anthropic that allows AI assistants to securely connect to external tools and data sources. This implementation provides a standardized bridge between AI assistants and KiCAD, enabling natural language control of professional PCB design operations.
Key Capabilities:
Every tool now includes complete JSON Schema definitions with:
Access project state without executing tools:
kicad://project/current/info - Project metadatakicad://project/current/board - Board propertieskicad://project/current/components - Component list (JSON)kicad://project/current/nets - Electrical netskicad://project/current/layers - Layer stack configurationkicad://project/current/design-rules - Current DRC settingskicad://project/current/drc-report - Design rule violationskicad://board/preview.png - Board visualization (PNG)The server provides 52 tools organized into functional categories:
create_project - Initialize new KiCAD projectsopen_project - Load existing project filessave_project - Save current project stateget_project_info - Retrieve project metadataset_board_size - Configure PCB dimensionsadd_board_outline - Create board edge (rectangle, circle, polygon)add_layer - Add custom layers to stackset_active_layer - Switch working layerget_layer_list - List all board layersget_board_info - Retrieve board propertiesget_board_2d_view - Generate board preview imageadd_mounting_hole - Place mounting holesadd_board_text - Add text annotationsplace_component - Place single component with footprintmove_component - Reposition existing componentrotate_component - Rotate component by angledelete_component - Remove component from boardedit_component - Modify component propertiesget_component_properties - Query component detailsget_component_list - List all placed componentsplace_component_array - Create component grids/patternsalign_components - Align multiple componentsduplicate_component - Copy existing componentadd_net - Create electrical netroute_trace - Route copper tracesadd_via - Place vias for layer transitionsdelete_trace - Remove tracesget_nets_list - List all netscreate_netclass - Define net class with rulesadd_copper_pour - Create copper zones/poursroute_differential_pair - Route differential signalslist_libraries - List available footprint librariessearch_footprints - Search for footprintslist_library_footprints - List footprints in libraryget_footprint_info - Get footprint detailsset_design_rules - Configure DRC parametersget_design_rules - Retrieve current rulesrun_drc - Execute design rule checkget_drc_violations - Get DRC error reportexport_gerber - Generate Gerber fabrication filesexport_pdf - Export PDF documentationexport_svg - Create SVG vector graphicsexport_3d - Generate 3D models (STEP/VRML)export_bom - Produce bill of materialscreate_schematic - Initialize new schematicload_schematic - Open existing schematicadd_schematic_component - Place symbolsadd_schematic_wire - Connect component pinslist_schematic_libraries - List symbol librariesexport_schematic_pdf - Export schematic PDFcheck_kicad_ui - Check if KiCAD is runninglaunch_kicad_ui - Launch KiCAD applicationKiCAD 9.0 or Higher
python3 -c "import pcbnew; print(pcbnew.GetBuildVersion())"
Node.js 18 or Higher
node --version and npm --versionPython 3.10 or Higher
MCP Client Choose one:
# Install KiCAD 9.0 sudo add-apt-repository --yes ppa:kicad/kicad-9.0-releases sudo apt-get update sudo apt-get install -y kicad kicad-libraries # Install Node.js curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs # Clone and build git clone https://github.com/mixelpixx/KiCAD-MCP-Server.git cd KiCAD-MCP-Server npm install pip3 install -r requirements.txt npm run build # Verify python3 -c "import pcbnew; print(pcbnew.GetBuildVersion())"
Automated Setup (Recommended):
git clone https://github.com/mixelpixx/KiCAD-MCP-Server.git cd KiCAD-MCP-Server .\setup-windows.ps1
The script will:
Manual Setup: See Windows Installation Guide for detailed instructions.
# Install KiCAD 9.0 from kicad.org/download/macos # Install Node.js brew install node@20 # Clone and build git clone https://github.com/mixelpixx/KiCAD-MCP-Server.git cd KiCAD-MCP-Server npm install pip3 install -r requirements.txt npm run build
Edit configuration file:
~/.config/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonConfiguration:
{ "mcpServers": { "kicad": { "command": "node", "args": ["/path/to/KiCAD-MCP-Server/dist/index.js"], "env": { "PYTHONPATH": "/path/to/kicad/python", "LOG_LEVEL": "info" } } } }
Platform-specific PYTHONPATH:
/usr/lib/kicad/lib/python3/dist-packagesC:\Program Files\KiCad\9.0\lib\python3\dist-packages/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packagesEdit: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Use the same configuration format as Claude Desktop above.
Claude Code automatically detects MCP servers in the current directory. No additional configuration needed.
Create a new KiCAD project named 'LEDBoard' in my Documents folder. Set the board size to 50mm x 50mm and add a rectangular outline. Place a mounting hole at each corner, 3mm from the edges, with 3mm diameter. Add text 'LED Controller v1.0' on the front silkscreen at position x=25mm, y=45mm.
Place an LED at x=10mm, y=10mm using footprint LED_SMD:LED_0805_2012Metric. Create a grid of 4 resistors (R1-R4) starting at x=20mm, y=20mm with 5mm spacing. Align all resistors horizontally and distribute them evenly.
Create a net named 'LED1' and route a 0.3mm trace from R1 pad 2 to LED1 anode. Add a copper pour for GND on the bottom layer covering the entire board. Create a differential pair for USB_P and USB_N with 0.2mm width and 0.15mm gap.
Set design rules with 0.15mm clearance and 0.2mm minimum track width. Run a design rule check and show me any violations. Export Gerber files to the 'fabrication' folder.
Resources provide read-only access to project state:
Show me the current component list. What are the current design rules? Display the board preview. List all electrical nets.
src/)python/)project.py - Project operationsboard.py - Board manipulationcomponent.py - Component placementrouting.py - Trace routing and netsdesign_rules.py - DRC operationsexport.py - File generationschematic.py - Schematic designlibrary.py - Footprint libraries# Install dependencies npm install pip3 install -r requirements.txt # Build TypeScript npm run build # Watch mode for development npm run dev
# TypeScript tests npm run test:ts # Python tests npm run test:py # All tests with coverage npm run test:coverage
# Lint TypeScript and Python npm run lint # Format code npm run format
Symptoms: MCP server doesn't show up in Claude Desktop or Cline
Solutions:
ls dist/index.jsSymptoms: ModuleNotFoundError: No module named 'pcbnew'
Solutions:
python3 -c "import pcbnew"Symptoms: Tools fail with unclear errors
Solutions:
~/.kicad-mcp/logs/kicad_interface.logSymptoms: Server fails to start on Windows
Solutions:
.\setup-windows.ps1C:\\Program Files\\KiCad\\9.0~/.kicad-mcp/logs/kicad_interface.logpython3 -c "import pcbnew; print(pcbnew.GetBuildVersion())")node --version)Current Version: 2.1.0-alpha
Production-Ready Features:
In Development:
Roadmap:
See ROADMAP.md for detailed development timeline.
Contributions are welcome! Please follow these guidelines:
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License. See LICENSE for details.
If you use this project in your research or publication, please cite:
@software{kicad_mcp_server, title = {KiCAD MCP Server: AI-Assisted PCB Design}, author = {mixelpixx}, year = {2025}, url = {https://github.com/mixelpixx/KiCAD-MCP-Server}, version = {2.1.0-alpha} }