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.
KiCAD MCP: AI-Assisted PCB Design
KiCAD MCP is a Model Context Protocol (MCP) implementation that enables Large Language Models (LLMs) like Claude to directly interact with KiCAD for printed circuit board design. It creates a standardized communication bridge between AI assistants and the KiCAD PCB design software, allowing for natural language control of advanced PCB design operations.
🎉 NEW FEATURE! Schematic Generation
We're excited to announce the addition of schematic generation capabilities! Now, in addition to PCB design, KiCAD MCP enables AI assistants to:
Create and manage KiCAD schematics through natural language
Add components like resistors, capacitors, and ICs to schematics
Connect components with wires to create complete circuits
Save and load schematic files in KiCAD format
Export schematics to PDF
This powerful addition completes the PCB design workflow, allowing AI assistants to help with both schematic capture and PCB layout in a single integrated environment.
Project Status
This project is complete and ready for production use:
Implemented full Python interface compatibility with KiCAD 9.0
Created a modular and maintainable component architecture
Implemented comprehensive tools for board manipulation, component placement, and routing
Successfully tested operations from project creation to component placement and routing
Created a streamlined MCP server implementation that reliably passes commands to KiCAD
The server works seamlessly with Cline/Claude, enabling AI-assisted PCB design through natural language.
What It Does
KiCAD MCP transforms how engineers and designers work with KiCAD by enabling AI assistants to:
Create and manage KiCAD PCB projects through natural language requests
Create schematics with components and connections
Manipulate board geometry, outlines, layers, and properties
Place and organize components in various patterns (grid, circular, aligned)
Route traces, differential pairs, and create copper pours
Implement design rules and perform design rule checks
Generate exports in various formats (Gerber, PDF, SVG, 3D models)
Provide comprehensive context about the circuit board to the AI assistant
This enables a natural language-driven PCB design workflow where complex operations can be requested in plain English, while still maintaining full engineer oversight and control.
Core Architecture
TypeScript MCP Server: Implements the Anthropic Model Context Protocol specification to communicate with Claude and other compatible AI assistants
Python KiCAD Interface: Handles actual KiCAD operations via pcbnew Python API and kicad-skip library with comprehensive error handling
Modular Design: Organizes functionality by domains (project, schematic, board, component, routing) for maintainability and extensibility
System Requirements
KiCAD 9.0 or higher (must be fully installed)
Node.js v18 or higher and npm
Python 3.8 or higher with pip (the version that comes with KiCAD 9.0 is sufficient)
Cline (VSCode Claude extension) or another MCP-compatible client
Windows 10/11 (current version is optimized for Windows; Linux/Mac support planned)
Installation
Step 1: Install KiCAD 9.0
Download KiCAD 9.0 from the official KiCAD website
Run the installer and select the default installation options
Ensure that the Python module is installed (this is included in the default installation)
Step 2: Clone and Set Up the KiCAD MCP Repository
Step 3: Configure Cline (VSCode Claude Extension)
Install VSCode from the official website if not already installed
Install the Cline extension (Claude for VSCode) from the VSCode marketplace
Edit the Cline MCP settings file:
Windows:
%USERPROFILE%\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Linux:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Add this configuration to the file (update paths as needed for your system):
Restart VSCode or reload the window for changes to take effect.
Step 4: Verify Installation
Open VSCode with the Cline extension
Start a new conversation with Claude
Ask Claude to create a new KiCAD project:
Create a new KiCAD project named 'TestProject' in the 'test' directory.Claude should use the KiCAD MCP to create the project and report success
Usage Examples
Here are some examples of what you can ask Claude to do with KiCAD MCP:
Project Management
Schematic Design
Board Design
Component Placement
Routing
Design Rules and Export
Features by Category
Project Management
Create new KiCAD projects with customizable settings
Open existing KiCAD projects from file paths
Save projects with optional new locations
Retrieve project metadata and properties
Schematic Design
Create new schematics with customizable settings
Add components from symbol libraries (resistors, capacitors, ICs, etc.)
Connect components with wires to create circuits
Add labels, annotations, and documentation to schematics
Save and load schematics in KiCAD format
Export schematics to PDF for documentation
Board Design
Set precise board dimensions with support for metric and imperial units
Add custom board outlines (rectangle, rounded rectangle, circle, polygon)
Create and manage board layers with various configurations
Add mounting holes, text annotations, and other board features
Visualize the current board state
Components
Place components with specified footprints at precise locations
Create component arrays in grid or circular patterns
Move, rotate, and modify existing components
Align and distribute components evenly
Duplicate components with customizable properties
Get detailed component properties and listings
Routing
Create and manage nets with specific properties
Route traces between component pads or arbitrary points
Add vias, including blind and buried vias
Create differential pair routes for high-speed signals
Generate copper pours (ground planes, power planes)
Define net classes with specific design rules
Design Rules
Set global design rules for clearance, track width, etc.
Define specific rules for different net classes
Run Design Rule Check (DRC) to validate the design
View and manage DRC violations
Export
Generate industry-standard Gerber files for fabrication
Export PDF documentation of the PCB
Create SVG vector graphics of the board
Generate 3D models in STEP or VRML format
Produce bill of materials (BOM) in various formats
Implementation Details
The KiCAD MCP implementation uses a modular, maintainable architecture:
TypeScript MCP Server (Node.js)
kicad-server.ts: The main server that implements the MCP protocol
Uses STDIO transport for reliable communication with Cline
Manages the Python process for KiCAD operations
Handles command queuing, error recovery, and response formatting
Python Interface
kicad_interface.py: The main Python interface that:
Parses commands received as JSON via stdin
Routes commands to the appropriate specialized handlers
Returns results as JSON via stdout
Handles errors gracefully with detailed information
Modular Command Structure:
commands/project.py
: Project creation, opening, savingcommands/schematic.py
: Schematic creation and managementcommands/component_schematic.py
: Schematic component operationscommands/connection_schematic.py
: Wire and connection managementcommands/library_schematic.py
: Symbol library integrationcommands/board/
: Modular board manipulation functionssize.py
: Board size operationslayers.py
: Layer managementoutline.py
: Board outline creationview.py
: Visualization functions
commands/component.py
: PCB component placement and manipulationcommands/routing.py
: Trace routing and net managementcommands/design_rules.py
: DRC and rule configurationcommands/export.py
: Output generation in various formats
This architecture ensures that each aspect of PCB design is handled by specialized modules while maintaining a clean, consistent interface layer.
Troubleshooting
Common Issues and Solutions
Problem: KiCAD MCP isn't showing up in Claude's tools
Make sure VSCode is completely restarted after updating the Cline MCP settings
Verify the paths in the config are correct for your system
Check that the
npm run build
completed successfully
Problem: Node.js errors when launching the server
Ensure you're using Node.js v18 or higher
Try running
npm install
again to ensure all dependencies are properly installedCheck the console output for specific error messages
Problem: Python errors or KiCAD commands failing
Verify that KiCAD 9.0 is properly installed
Check that the PYTHONPATH in the configuration points to the correct location
Try running a simple KiCAD Python script directly to ensure the pcbnew module is accessible
Problem: Claude can't find or load your KiCAD project
Use absolute paths when referring to project locations
Ensure the user running VSCode has access permissions to the directories
Getting Help
If you encounter issues not covered in this troubleshooting section:
Check the console output for error messages
Look for similar issues in the GitHub repository's Issues section
Open a new issue with detailed information about the problem
Contributing
Contributions to this project are welcome! Here's how you can help:
Report Bugs: Open an issue describing what went wrong and how to reproduce it
Suggest Features: Have an idea? Share it via an issue
Submit Pull Requests: Fixed a bug or added a feature? Submit a PR!
Improve Documentation: Help clarify or expand the documentation
Please follow the existing code style and include tests for new features.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
KiCAD-MCP-Server
Related MCP Servers
- Apache 2.0
- MIT License
- MIT License