kicad-mcp

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

GitHub Stars

277

User Rating

Not Rated

Favorites

0

Views

24

Forks

43

Issues

10

Installation
Difficulty
Beginner
Estimated Time
5-10 minutes

Installation

Installation

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

bash

Clone the repository

git clone https://github.com/lamaalrajih/kicad-mcp.git .

Create a virtual environment and activate it

python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

Install the MCP SDK and other dependencies

pip install -r requirements.txt

2. Configure Your Environment

Create a .env file to customize where the server looks for your KiCad projects:
bash

Copy the example environment file

cp .env.example .env

Edit the .env file

vim .env
Add your custom project directories in the .env file:

KICAD_SEARCH_PATHS=~/pcb,~/Electronics,~/Projects/KiCad

3. Run the Server

Once the environment is set up, you can run the server:
bash
python main.py

4. Configure an MCP Client

Create or edit the Claude Desktop configuration file:
bash

Create the directory if it doesn't exist

mkdir -p ~/Library/Application\ Support/Claude

Edit the configuration file

vim ~/Library/Application\ Support/Claude/claude_desktop_config.json
Add the KiCad MCP server to the configuration:
json
{
    "mcpServers": {
        "kicad": {
            "command": "/ABSOLUTE/PATH/TO/YOUR/PROJECT/kicad-mcp/venv/bin/python",
            "args": [
                "/ABSOLUTE/PATH/TO/YOUR/PROJECT/kicad-mcp/main.py"
            ]
        }
    }
}
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.

Additional Resources