Integrations
Integrates with .env files for configuration, allowing users to customize KiCad project search paths and other server settings through environment variables.
Provides tools for KiCad PCB design projects including listing projects, viewing project details, running Design Rule Checks (DRC), generating PCB thumbnails, and launching KiCad applications with specific projects.
KiCad MCP Server
This guide will help you set up a Model Context Protocol (MCP) server for KiCad. While the examples in this guide often reference Claude Desktop, the server is compatible with any MCP-compliant client. You can use it with Claude Desktop, your own custom MCP clients, or any other application that implements the Model Context Protocol.
Table of Contents
- Prerequisites
- Installation Steps
- Understanding MCP Components
- Feature Highlights
- Natural Language Interaction
- Documentation
- Configuration
- Development Guide
- Troubleshooting
- Contributing
- Future Development Ideas
- License
Prerequisites
- macOS, Windows, or Linux
- Python 3.10 or higher
- KiCad 9.0 or higher
- Claude Desktop (or another MCP client)
Installation Steps
1. Set Up Your Python Environment
First, let's install dependencies and set up our environment:
2. Configure Your Environment
Create a .env
file to customize where the server looks for your KiCad projects:
In the .env
file, add your custom project directories:
3. Run the Server
Once the environment is set up, you can run the server:
4. Configure an MCP Client
Now, let's configure Claude Desktop to use our MCP server:
- Create or edit the Claude Desktop configuration file:
- Add the KiCad MCP server to the configuration:
Replace /ABSOLUTE/PATH/TO/YOUR/PROJECT/kicad-mcp
with the actual path to your project directory.
5. Restart Your MCP Client
Close and reopen your MCP client to load the new configuration.
Understanding MCP Components
The Model Context Protocol (MCP) defines three primary ways to provide capabilities:
Resources vs Tools vs Prompts
Resources are read-only data sources that LLMs can reference:
- Similar to GET endpoints in REST APIs
- Provide data without performing significant computation
- Used when the LLM needs to read information
- Typically accessed programmatically by the client application
- Example:
kicad://projects
returns a list of all KiCad projects
Tools are functions that perform actions or computations:
- Similar to POST/PUT endpoints in REST APIs
- Can have side effects (like opening applications or generating files)
- Used when the LLM needs to perform actions in the world
- Typically invoked directly by the LLM (with user approval)
- Example:
open_project()
launches KiCad with a specific project
Prompts are reusable templates for common interactions:
- Pre-defined conversation starters or instructions
- Help users articulate common questions or tasks
- Invoked by user choice (typically from a menu)
- Example: The
debug_pcb_issues
prompt helps users troubleshoot PCB problems
For more information on resources vs tools vs prompts, read the MCP docs.
Feature Highlights
The KiCad MCP Server provides several key features, each with detailed documentation:
- Project Management: List, examine, and open KiCad projects
- Example: "Show me all my recent KiCad projects" → Lists all projects sorted by modification date
- PCB Design Analysis: Get insights about your PCB designs and schematics
- Example: "Analyze the component density of my temperature sensor board" → Provides component spacing analysis
- Netlist Extraction: Extract and analyze component connections from schematics
- Example: "What components are connected to the MCU in my Arduino shield?" → Shows all connections to the microcontroller
- BOM Management: Analyze and export Bills of Materials
- Example: "Generate a BOM for my smart watch project" → Creates a detailed bill of materials
- Design Rule Checking: Run DRC checks using the KiCad CLI and track your progress over time
- Example: "Run DRC on my power supply board and compare to last week" → Shows progress in fixing violations
- PCB Visualization: Generate visual representations of your PCB layouts
- Example: "Show me a thumbnail of my audio amplifier PCB" → Displays a visual render of the board
- Circuit Pattern Recognition: Automatically identify common circuit patterns in your schematics
- Example: "What power supply topologies am I using in my IoT device?" → Identifies buck, boost, or linear regulators
For more examples and details on each feature, see the dedicated guides in the documentation. You can also ask the LLM what tools it has access to!
Natural Language Interaction
While our documentation often shows examples like:
You don't need to type the full path to your files! The LLM can understand more natural language requests.
For example, instead of the formal command above, you can simply ask:
Or:
The LLM will understand your intent and request the relevant information from the KiCad MCP Server. If it needs clarification about which project you're referring to, it will ask.
Documentation
Detailed documentation for each feature is available in the docs/
directory:
- Project Management
- PCB Design Analysis
- Netlist Extraction
- Bill of Materials (BOM)
- Design Rule Checking (DRC)
- PCB Visualization
- Circuit Pattern Recognition
- Prompt Templates
Configuration
The KiCad MCP Server can be configured using environment variables or a .env
file:
Key Configuration Options
Environment Variable | Description | Example |
---|---|---|
KICAD_SEARCH_PATHS | Comma-separated list of directories to search for KiCad projects | ~/pcb,~/Electronics,~/Projects |
KICAD_USER_DIR | Override the default KiCad user directory | ~/Documents/KiCadProjects |
KICAD_APP_PATH | Override the default KiCad application path | /Applications/KiCad7/KiCad.app |
See Configuration Guide for more details.
Development Guide
Project Structure
The KiCad MCP Server is organized into a modular structure:
Adding New Features
To add new features to the KiCad MCP Server, follow these steps:
- Identify the category for your feature (resource, tool, or prompt)
- Add your implementation to the appropriate module
- Register your feature in the corresponding register function
- Test your changes with the development tools
See Development Guide for more details.
Troubleshooting
If you encounter issues:
- Server Not Appearing in MCP Client:
- Check your client's configuration file for errors
- Make sure the path to your project and Python interpreter is correct
- Ensure Python can access the
mcp
package - Check if your KiCad installation is detected
- Server Errors:
- Check the terminal output when running the server in development mode
- Check Claude logs at:
~/Library/Logs/Claude/mcp-server-kicad.log
(server-specific logs)~/Library/Logs/Claude/mcp.log
(general MCP logs)
- Working Directory Issues:
- The working directory for servers launched via client configs may be undefined
- Always use absolute paths in your configuration and .env files
- For testing servers via command line, the working directory will be where you run the command
See Troubleshooting Guide for more details.
If you're still not able to troubleshoot, please open a Github issue.
Contributing
Want to contribute to the KiCad MCP Server? Here's how you can help improve this project:
- Fork the repository
- Create a feature branch
- Add your changes
- Submit a pull request
Key areas for contribution:
- Adding support for more component patterns in the Circuit Pattern Recognition system
- Improving documentation and examples
- Adding new features or enhancing existing ones
- Fixing bugs and improving error handling
See CONTRIBUTING.md for detailed contribution guidelines.
Future Development Ideas
Interested in contributing? Here are some ideas for future development:
- 3D Model Visualization - Implement tools to visualize 3D models of PCBs
- PCB Review Tools - Create annotation features for design reviews
- Manufacturing File Generation - Add support for generating Gerber files and other manufacturing outputs
- Component Search - Implement search functionality for components across KiCad libraries
- BOM Enhancement - Add supplier integration for component sourcing and pricing
- Interactive Design Checks - Develop interactive tools for checking design quality
- Web UI - Create a simple web interface for configuration and monitoring
- Circuit Analysis - Add automated circuit analysis features
- Test Coverage - Improve test coverage across the codebase
- Circuit Pattern Recognition - Expand the pattern database with more component types and circuit topologies
License
This project is open source under the MIT license.
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.
A Model Context Protocol server that enables interaction with KiCad electronic design projects, allowing users to list projects, analyze PCB designs, run design rule checks, and visualize PCB layouts through natural language.
- Table of Contents
- Prerequisites
- Installation Steps
- Understanding MCP Components
- Feature Highlights
- Natural Language Interaction
- Documentation
- Configuration
- Development Guide
- Troubleshooting
- Contributing
- Future Development Ideas
- License
Related Resources
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that enables interaction with Shortcut (formerly Clubhouse) project management tool, allowing users to view and search projects, stories, epics, and objectives, as well as create new items through natural language.Last updated -3Python
- -security-license-qualityA specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.Last updated -1TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables users to create, check status, and get details of projects on Loveable.dev, a platform for quickly creating applications.Last updated -JavaScriptISC License
- -securityAlicense-qualityA Model Context Protocol server that integrates Claude with Blender, enabling users to analyze and interact with IFC (Industry Foundation Classes) building models through natural language commands.Last updated -5PythonMIT License