Get the FREE Ultimate OpenClaw Setup Guide →

kicad

Model Context Protocol server for KiCad on Mac, Windows, and Linux

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio lamaalrajih-kicad-mcp python main.py

How to use

The KiCad MCP Server exposes a Python-based MCP interface that integrates with any MCP-compliant client. It enables resources (read-only data about KiCad projects), tools (actions such as opening or analyzing a project), and prompts (reusable templates to guide user interactions). With this server running, you can query the server for available KiCad projects, analyze PCB designs, extract netlists, generate BOMs, run design rule checks, render visual thumbnails, and recognize common circuit patterns. Clients like Claude Desktop or other MCP clients can issue natural language requests which the server will interpret and route to the appropriate KiCad functionality. The documentation in the repo provides dedicated guides (e.g., project management, PCB design analysis, netlist extraction, BOM, DRC, visualization, and pattern recognition) that describe exact commands and expected outcomes.

How to install

Prerequisites:

  • macOS, Windows, or Linux
  • Python 3.10 or higher
  • KiCad 9.0 or higher
  • uv 0.8.0 or higher
  • A client supporting MCP (e.g., Claude Desktop)

Step-by-step installation:

# 1) Clone the repository
git clone https://github.com/lamaalrajih/kicad-mcp.git
cd kicad-mcp

# 2) Install dependencies and set up the Python environment (uv will create a virtual environment)
# (Install uv first if needed: e.g., `pipx install uv` or your platform's method)
make install

# 3) (Optional) Activate the environment for manual commands
source .venv/bin/activate

Configure environment (optional):

# Copy example environment file
cp .env.example .env

# Edit the .env file as needed
vim .env

Run the server:

python main.py

Configure an MCP client (example for Claude Desktop):

# Create the Claude config directory if needed
mkdir -p ~/Library/Application\ Support/Claude

# Edit claude_desktop_config.json and add the KiCad MCP server (example)

Notes:

  • If you plan to run via a virtual environment, ensure the Python path in your MCP client points to the venv Python and the main.py path inside your project.
  • The repository uses a .env file to customize KiCad search paths (see environment variables below).

Additional notes

Environment variables to customize server behavior:

  • KICAD_SEARCH_PATHS: Comma-separated directories to search for KiCad projects (e.g., /pcb,/Electronics,~/Projects)
  • KICAD_USER_DIR: Override default KiCad user directory
  • KICAD_APP_PATH: Override KiCad application path

Common issues:

  • Ensure KiCad 9.0+ is installed and accessible from PATH or configured via KICAD_APP_PATH.
  • If the virtual environment is not activated, the server may fail to import KiCad modules; activate .venv if you’re running commands manually.
  • When configuring clients, use absolute paths for main.py and the Python interpreter to avoid working directory issues.

For updates, refer to the docs/ directory in the repository for detailed guides on each feature (Project Management, PCB Design Analysis, Netlist Extraction, BOM, DRC, Visualization, Pattern Recognition, and Prompt Templates).

Related MCP Servers

Sponsor this space

Reach thousands of developers