Enables direct interaction with KiCAD PCB design software, allowing for natural language control of operations including project management, board design, component placement and manipulation, routing, design rule implementation, and exporting designs in various formats.
Click on "Install 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-Serveradd mounting holes to the corners of my 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.
KiCAD MCP Server
A 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.
Overview
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 PCB design operations.
Key Capabilities:
64 fully-documented tools with JSON Schema validation
Smart tool discovery with router pattern (reduces AI context by 70%)
8 dynamic resources exposing project state
JLCPCB parts integration with 100k+ component catalog and local library search
Full MCP 2025-06-18 protocol compliance
Cross-platform support (Linux, Windows, macOS)
Real-time KiCAD UI integration via IPC API (experimental)
Comprehensive error handling and logging
Related MCP server: Kibana MCP Server
What's New in v2.1.0
Critical Schematic Workflow Fix + Complete Wiring System (Issue #26)
The schematic workflow was completely broken in previous versions - this is now fixed AND dramatically enhanced!
What was broken:
create_projectonly created PCB files, no schematicsadd_schematic_componentcalled non-existent API methodsSchematics couldn't be created or edited at all
Only 13 component types available (severe limitation)
No working wire/connection functionality
Complete Implementation (3 Phases):
Phase 1: Component Placement Foundation
create_projectnow creates both .kicad_pcb and .kicad_sch filesAdded pre-configured template schematics with 13 common component types
Rewrote component placement to use proper
clone()API
Phase 2: Dynamic Symbol Loading (BREAKTHROUGH!)
Access to ALL ~10,000 KiCad symbols from standard libraries
Automatic detection and dynamic loading from
.kicad_symlibrary filesZero configuration required - just specify library and symbol name
Seamless integration with existing MCP tools
Full S-expression parsing and injection system
Phase 3: Intelligent Wiring System (NEW in v2.1.0)
Automatic pin location discovery with rotation support (0°, 90°, 180°, 270°)
Smart wire routing (direct, orthogonal horizontal-first, orthogonal vertical-first)
Power symbol support (VCC, GND, +3V3, +5V, etc.)
Wire graph analysis - geometric tracing for net connectivity
Net label management (local, global, hierarchical labels)
Netlist generation with accurate component/pin connections
Technical Architecture: The kicad-skip library cannot create symbols or wires from scratch. We implemented a comprehensive solution:
Static Templates: 13 pre-configured symbols (R, C, L, LED, etc.) for instant use
Dynamic Loading: On-demand injection of ANY symbol from KiCad libraries:
Parse
.kicad_symlibrary files using S-expression parserInject symbol definition into schematic's
lib_symbolssectionCreate offscreen template instance
Reload schematic so kicad-skip sees new template
Clone template to create actual component
Wire Creation: S-expression-based wire injection (bypasses kicad-skip API limitations)
Pin Discovery: Parse symbol definitions, apply rotation transformations, calculate absolute positions
Connectivity Analysis: Geometric wire tracing to build net connection graphs
Example - Complete Circuit Creation:
Test Results:
Component placement: 100% passing
Dynamic symbol loading: 10,000+ symbols accessible
Wire creation: 100% passing (8/8 connections in test circuit)
Pin discovery: Rotation-aware, sub-millimeter accuracy
Net connectivity: 100% accurate (VCC: 2 connections, GND: 4 connections)
Netlist generation: Working with accurate pin-level connections
See Dynamic Loading Status and Wiring Implementation Plan for technical details.
IPC Backend (Experimental)
We are currently implementing and testing the KiCAD 9.0 IPC API for real-time UI synchronization:
Changes made via MCP tools appear immediately in the KiCAD UI
No manual reload required when IPC is active
Hybrid backend: uses IPC when available, falls back to SWIG API
20+ commands now support IPC including routing, component placement, and zone operations
Note: IPC features are under active development and testing. Enable IPC in KiCAD via Preferences > Plugins > Enable IPC API Server.
Tool Discovery & Router Pattern
We've implemented an intelligent tool router to keep AI context efficient while maintaining full functionality:
12 direct tools always visible for high-frequency operations
47 routed tools organized into 7 categories (board, component, export, drc, schematic, library, routing)
4 router tools for discovery and execution:
list_tool_categories- Browse all available categoriesget_category_tools- View tools in a specific categorysearch_tools- Find tools by keywordexecute_tool- Run any tool with parameters
Why this matters: By organizing tools into discoverable categories, Claude can intelligently find and use the right tool for your task without loading all 64 tool schemas into every conversation. This reduces context consumption by up to 70% while maintaining full access to all functionality.
Usage is seamless: Just ask naturally - "export gerber files" or "add mounting holes" - and Claude will discover and execute the appropriate tools automatically.
NEEDS TESTING - REPORT ISSUES
JLCPCB Parts Integration (New!)
Complete integration with JLCPCB's parts catalog, providing two complementary approaches for component selection:
Dual-Mode Architecture:
Local Symbol Libraries - Search JLCPCB libraries installed via KiCAD Plugin and Content Manager (contributed by @l3wi)
JLCPCB API Integration - Access the complete 100k+ parts catalog with real-time pricing and stock data
Key Features:
Real-time pricing with quantity breaks (1+, 10+, 100+, 1000+)
Stock availability checking
Basic vs Extended library type identification (Basic = free assembly)
Intelligent cost optimization with alternative part suggestions
Package-to-footprint mapping for KiCAD compatibility
Parametric search by category, package, manufacturer
Local SQLite database for fast offline searching
No API credentials required for local library search
Why this matters: JLCPCB offers PCB assembly services where Basic parts have no assembly fee, while Extended parts charge $3 per unique component. This integration helps you find the cheapest components with the best availability, potentially saving hundreds of dollars on assembly costs for production runs.
See JLCPCB Usage Guide for detailed setup and usage instructions.
Comprehensive Tool Schemas
Every tool now includes complete JSON Schema definitions with:
Detailed parameter descriptions and constraints
Input validation with type checking
Required vs. optional parameter specifications
Enumerated values for categorical inputs
Clear documentation of what each tool does
Resources Capability
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)
Protocol Compliance
Updated to MCP SDK 1.21.0 (latest)
Full JSON-RPC 2.0 support
Proper capability negotiation
Standards-compliant error codes
Available Tools
The server provides 64 tools organized into functional categories. With the new router pattern, tools are automatically discovered as needed - just ask Claude what you want to accomplish!
Project Management (4 tools)
create_project- Initialize new KiCAD projectsopen_project- Load existing project filessave_project- Save current project stateget_project_info- Retrieve project metadata
Board Operations (9 tools)
set_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 annotations
Component Placement (10 tools)
place_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 component
Routing & Nets (8 tools)
add_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 signals
Library Management (4 tools)
list_libraries- List available footprint librariessearch_footprints- Search for footprintslist_library_footprints- List footprints in libraryget_footprint_info- Get footprint details
JLCPCB Integration (5 tools)
download_jlcpcb_database- Download complete JLCPCB parts catalog (one-time setup)search_jlcpcb_parts- Search 100k+ parts with parametric filtersget_jlcpcb_part- Get detailed part info with pricing and footprintsget_jlcpcb_database_stats- View database statistics and coveragesuggest_jlcpcb_alternatives- Find cheaper or more available alternatives
Design Rules (4 tools)
set_design_rules- Configure DRC parametersget_design_rules- Retrieve current rulesrun_drc- Execute design rule checkget_drc_violations- Get DRC error report
Export (5 tools)
export_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 materials
Schematic Design (9 tools)
Now fully functional with DYNAMIC SYMBOL LOADING + INTELLIGENT WIRING! (Fixed in v2.1.0 - see Issue #26)
Component Placement:
create_schematic- Initialize new schematic from templateload_schematic- Open existing schematicadd_schematic_component- Place symbols with automatic dynamic loading from KiCad librarieslist_schematic_libraries- List symbol librariesexport_schematic_pdf- Export schematic PDF
Wiring & Connections: NEW in v2.1.0
add_schematic_wire- Create wires between points with customizable strokeadd_schematic_connection- Auto-connect pins with intelligent routing (direct, orthogonal)add_schematic_net_label- Add net labels (VCC, GND, signals) with orientation controlconnect_to_net- Connect component pins to named nets
Major Enhancements:
Dynamic Symbol Loading - Access to ALL ~10,000 KiCad symbols! Specify any
libraryandtype(e.g.,"library": "MCU_ST_STM32F1", "type": "STM32F103C8Tx") and the system automatically:Searches KiCad symbol libraries
Injects symbol definition into your schematic
Creates cloneable template instance
Places component seamlessly
Fallback to 13 static templates (R, C, L, LED, etc.) when needed
Intelligent Wiring System - Professional schematic wiring with automation:
Automatic pin discovery - rotation-aware (0°, 90°, 180°, 270°)
Smart routing - direct lines or orthogonal (right-angle) paths
Power symbol support - VCC, GND, +3V3, +5V, etc.
Wire graph analysis - geometric tracing for accurate net connectivity
Net label management - local, global, and hierarchical labels
Netlist generation - accurate component/pin connection tracking
S-expression precision - guaranteed KiCad format compliance
UI Management (2 tools)
check_kicad_ui- Check if KiCAD is runninglaunch_kicad_ui- Launch KiCAD application
Prerequisites
Required Software
KiCAD 9.0 or Higher
Download from kicad.org/download
Must include Python module (pcbnew)
Verify installation:
python3 -c "import pcbnew; print(pcbnew.GetBuildVersion())"
Node.js 18 or Higher
Download from nodejs.org
Verify:
node --versionandnpm --version
Python 3.10 or Higher
Usually included with KiCAD
Required packages (auto-installed):
kicad-python (kipy) >= 0.5.0 (IPC API support, optional but recommended)
kicad-skip >= 0.1.0 (schematic support)
Pillow >= 9.0.0 (image processing)
cairosvg >= 2.7.0 (SVG rendering)
colorlog >= 6.7.0 (logging)
pydantic >= 2.5.0 (validation)
requests >= 2.32.5 (HTTP client)
python-dotenv >= 1.0.0 (environment)
MCP Client Choose one:
Claude Desktop - Official Anthropic desktop app
Claude Code - Official CLI tool
Cline - VSCode extension
Supported Platforms
Linux (Ubuntu 22.04+, Fedora, Arch) - Primary platform, fully tested
Windows 10/11 - Fully supported with automated setup
macOS - Experimental support
Installation
Linux (Ubuntu/Debian)
Windows 10/11
Automated Setup (Recommended):
The script will:
Detect KiCAD installation
Verify prerequisites
Install dependencies
Build project
Generate configuration
Run diagnostics
Manual Setup: See Windows Installation Guide for detailed instructions.
macOS
Configuration
Claude Desktop
Edit configuration file:
Linux/macOS:
~/.config/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
Platform-specific PYTHONPATH:
Linux:
/usr/lib/kicad/lib/python3/dist-packagesWindows:
C:\Program Files\KiCad\9.0\lib\python3\dist-packagesmacOS:
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
Linux Python Detection
The server automatically detects Python on Linux in this priority order:
Virtual environment -
venv/bin/pythonor.venv/bin/python(highest priority)KICAD_PYTHON env var - User override for non-standard installations
KiCad bundled Python -
/usr/lib/kicad/bin/python3,/usr/local/lib/kicad/bin/python3,/opt/kicad/bin/python3System Python via which - Resolves
which python3to absolute path (e.g.,/usr/bin/python3)Common system paths -
/usr/bin/python3,/bin/python3
For most standard Linux installations (Ubuntu, Debian, Fedora, Arch), no KICAD_PYTHON configuration is needed - the server will automatically find your Python installation.
Troubleshooting:
If you see "Python executable not found: python3", you can manually specify the Python path:
To find your Python path:
Cline (VSCode)
Edit: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Use the same configuration format as Claude Desktop above.
Claude Code
Claude Code automatically detects MCP servers in the current directory. No additional configuration needed.
JLCPCB Integration Setup (Optional)
The JLCPCB integration provides two modes that can be used independently or together:
Mode 1: Local Symbol Libraries (No Setup Required)
Install JLCPCB libraries via KiCAD's Plugin and Content Manager:
Open KiCAD
Go to Tools > Plugin and Content Manager
Search for "JLCPCB" or "JLC"
Install libraries like
JLCPCB-KiCAD-LibraryorEDA_MCPUse
search_symbolsto find components with pre-configured footprints and LCSC IDs
Mode 2: JLCPCB API (Complete Catalog Access)
For access to the full 100k+ parts catalog with pricing:
Get API Credentials
Log in to JLCPCB
Navigate to Account > API Management
Create API Key and save your
appKeyandappSecret
Configure Environment Variables
Add to your shell profile (
~/.bashrc,~/.zshrc, or~/.profile):export JLCPCB_API_KEY="your_app_key_here" export JLCPCB_API_SECRET="your_app_secret_here"Or create a
.envfile in the project root:JLCPCB_API_KEY=your_app_key_here JLCPCB_API_SECRET=your_app_secret_hereDownload Parts Database (One-time setup, takes 5-10 minutes)
Ask Claude: "Download the JLCPCB parts database"This creates a local SQLite database at
data/jlcpcb_parts.dbwith ~100k parts.
See JLCPCB Usage Guide for detailed documentation.
Usage Examples
Basic PCB Design Workflow
Component Placement
Routing
Design Verification
Using Resources
Resources provide read-only access to project state:
JLCPCB Component Selection
Finding Components with Local Libraries:
Optimizing Costs with JLCPCB API:
Complete Design Workflow:
Database Management:
Architecture
MCP Protocol Layer
JSON-RPC 2.0 Transport: Bi-directional communication via STDIO
Protocol Version: MCP 2025-06-18
Capabilities: Tools (59), Resources (8)
Tool Router: Intelligent discovery system with 7 categories
Error Handling: Standard JSON-RPC error codes
TypeScript Server (src/)
Implements MCP protocol specification
Manages Python subprocess lifecycle
Handles message routing and validation
Provides logging and error recovery
Router System:
src/tools/registry.ts- Tool categorization and lookupsrc/tools/router.ts- Discovery and execution toolsReduces AI context usage by 70% while maintaining full functionality
Python Interface (python/)
kicad_interface.py: Main entry point, MCP message handler, command routing
kicad_api/: Backend implementations
base.py- Abstract base classes for backendsipc_backend.py- KiCAD 9.0 IPC API backend (real-time UI sync)swig_backend.py- pcbnew SWIG API backend (file-based operations)factory.py- Backend auto-detection and instantiation
schemas/tool_schemas.py: JSON Schema definitions for all tools
resources/resource_definitions.py: Resource handlers and URIs
commands/: Modular command implementations
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 librarieslibrary_symbol.py- Symbol library search (local JLCPCB libraries)jlcpcb.py- JLCPCB API clientjlcpcb_parts.py- JLCPCB parts database manager
KiCAD Integration
pcbnew API (SWIG): Direct Python bindings to KiCAD for file operations
IPC API (kipy): Real-time communication with running KiCAD instance (experimental)
Hybrid Backend: Automatically uses IPC when available, falls back to SWIG
kicad-skip: Schematic file manipulation
Platform Detection: Cross-platform path handling
UI Management: Automatic KiCAD UI launch/detection
Development
Building from Source
Running Tests
Linting and Formatting
Troubleshooting
Server Not Appearing in Client
Symptoms: MCP server doesn't show up in Claude Desktop or Cline
Solutions:
Verify build completed:
ls dist/index.jsCheck configuration paths are absolute
Restart MCP client completely
Check client logs for error messages
Python Module Import Errors
Symptoms: ModuleNotFoundError: No module named 'pcbnew'
Solutions:
Verify KiCAD installation:
python3 -c "import pcbnew"Check PYTHONPATH in configuration matches your KiCAD installation
Ensure KiCAD was installed with Python support
Tool Execution Failures
Symptoms: Tools fail with unclear errors
Solutions:
Check server logs:
~/.kicad-mcp/logs/kicad_interface.logVerify a project is loaded before running board operations
Ensure file paths are absolute, not relative
Check tool parameter types match schema requirements
Windows-Specific Issues
Symptoms: Server fails to start on Windows
Solutions:
Run automated diagnostics:
.\setup-windows.ps1Verify Python path uses double backslashes:
C:\\Program Files\\KiCad\\9.0Check Windows Event Viewer for Node.js errors
Getting Help
Check the GitHub Issues
Review server logs:
~/.kicad-mcp/logs/kicad_interface.logOpen a new issue with:
Operating system and version
KiCAD version (
python3 -c "import pcbnew; print(pcbnew.GetBuildVersion())")Node.js version (
node --version)Full error message and stack trace
Relevant log excerpts
Project Status
Current Version: 2.1.0-alpha
Working Features:
Project creation and management (PCB + Schematic)
Board outline and sizing
Layer management
Component placement with footprint library loading
Mounting holes and text annotations
Design rule checking
Export to Gerber, PDF, SVG, 3D
Schematic creation and editing (Issue #26 RESOLVED - fully functional!)
DYNAMIC SYMBOL LOADING - Access to ALL ~10,000 KiCad symbols! 🚀
Template-based schematic workflow with automatic dynamic injection
Symbol cloning from static templates (13 types) and dynamic libraries
UI auto-launch
Full MCP protocol compliance
JLCPCB parts integration (local libraries + JLCSearch API)
Cost optimization and component selection with 100k+ parts catalog
Under Active Development (IPC Backend):
Real-time UI synchronization via KiCAD 9.0 IPC API
IPC-enabled commands: route_trace, add_via, place_component, move_component, delete_component, add_copper_pour, refill_zones, add_board_outline, add_mounting_hole, and more
Hybrid footprint loading (SWIG for library access, IPC for placement)
Zone/copper pour support via IPC
Note: IPC features are experimental and under testing. Some commands may not work as expected in all scenarios.
Planned:
Digikey API integration
Mouser API integration
Advanced routing algorithms
Smart BOM management with real-time pricing
AI-assisted component selection and optimization
Design pattern library (Arduino shields, RPi HATs)
Panelization support
See ROADMAP.md for detailed development timeline.
What Do You Want to See Next?
We're actively developing new features and tools for the KiCAD MCP Server. Your input matters!
We'd love to hear from you:
What PCB design workflows could be automated?
Which component suppliers should we integrate next (Digikey, Mouser, Arrow, etc.)?
What export formats or manufacturing outputs do you need?
Are there specific routing algorithms or design patterns you want?
What pain points in your KiCAD workflow could AI help solve?
How can we improve the JLCPCB integration?
Share your ideas:
⭐ Star the repo if you find it useful!
Your feedback directly shapes our development priorities. Whether it's a small quality-of-life improvement or a major new capability, we want to hear about it.
Contributing
Contributions are welcome! Please follow these guidelines:
Report Bugs: Open an issue with reproduction steps
Suggest Features: Describe use case and expected behavior
Submit Pull Requests:
Fork the repository
Create a feature branch
Follow existing code style
Add tests for new functionality
Update documentation
Submit PR with clear description
See CONTRIBUTING.md for detailed guidelines.
License
This project is licensed under the MIT License. See LICENSE for details.
Acknowledgments
Built on the Model Context Protocol by Anthropic
Powered by KiCAD open-source PCB design software
Uses kicad-skip for schematic manipulation
JLCSearch API by @tscircuit - Public JLCPCB parts API
JLCParts Database by @yaqwsx - JLCPCB parts data
Citation
If you use this project in your research or publication, please cite: