home / mcp / kicad mcp server

KiCad MCP Server

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

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "lamaalrajih-kicad-mcp": {
      "command": "/ABSOLUTE/PATH/TO/YOUR/PROJECT/kicad-mcp/.venv/bin/python",
      "args": [
        "/ABSOLUTE/PATH/TO/YOUR/PROJECT/kicad-mcp/main.py"
      ],
      "env": {
        "KICAD_APP_PATH": "/Applications/KiCad7/KiCad.app",
        "KICAD_USER_DIR": "~/Documents/KiCadProjects",
        "KICAD_SEARCH_PATHS": "~/pcb,~/Electronics,~/Projects"
      }
    }
  }
}

You can run a KiCad MCP Server to expose KiCad data and actions to any MCP-compatible client. It lets you access KiCad projects, analyze designs, extract netlists, generate BOMs, and run checks or visualizations through natural language requests, enabling smoother integration with your CAD workflow.

How to use

Use an MCP client to talk to the KiCad MCP Server. You can ask it to list projects, open a project, analyze design rules, extract netlists, or generate a BOM. The server exposes Resources for reading data (like a list of KiCad projects), Tools for performing actions (like opening a project or running analyses), and Prompts for common tasks. You interact by asking natural language questions or selecting prompts from your MCP client, and the client forwards requests to the server for execution.

How to install

Prerequisites: you need a Unix-like shell, Python 3.10 or higher, KiCad 9.0 or higher, uv 0.8.0 or higher.

Step 1: Set up your Python environment and install dependencies.

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

# Install dependencies – `uv` will create a `.venv/` folder automatically
# (Install `uv` first: `brew install uv` on macOS or `pipx install uv`)
make install

# Optional: activate the environment for manual commands
source .venv/bin/activate

Step 2: Configure your environment with your KiCad project search paths.

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

# Edit the .env file
vim .env
```
In the `.env` file, add your custom project directories as comma-separated paths, for example:
```
KICAD_SEARCH_PATHS=~/pcb,~/Electronics,~/Projects/KiCad

Step 3: Run the server.

python main.py

Step 4: Configure an MCP client to connect to the server. Create or edit the client configuration to include the KiCad MCP server, using the Python interpreter inside your virtual environment to run the server script.

# Example configuration snippet for the MCP client
{
  "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.

Step 5: Restart your MCP client to load the new configuration.

Configuration

You can tailor how the server looks for KiCad projects and how the client connects. A typical setup involves pointing the server to your KiCad project directories via environment variables and then wiring up your MCP client to the local server endpoint.

Tools and endpoints

The server provides actions you can invoke from an MCP client. Examples include launching a KiCad project, analyzing design rules, and extracting BOMs. These tools are designed to be used from the client after you authorize the action.

Troubleshooting

If you encounter issues, check that your client configuration points to the correct Python interpreter and script path, and that KiCad is detectable by the server. Review logs in your user directory for MCP-related messages and ensure absolute paths are used in configurations.

Contributing

If you want to contribute, fork the project, create a feature branch, implement your changes, and submit a pull request. Focus areas include expanding circuit pattern recognition, improving documentation, and enhancing error handling.

Future development ideas

Explore 3D model visualization, enhanced PCB review tools, manufacturing file generation, component search across KiCad libraries, BOM sourcing integrations, and a lightweight web UI for configuration and monitoring.

Available tools

open_project

Launches KiCad with a specified project to inspect, edit, or simulate the design.