Skip to content

Installation

  • Python 3.10 or newer
  • uv package manager
  • KiCad 9.0+ (for kicad-cli features)
  • Git
Terminal window
git clone https://git.supported.systems/MCP/kicad-mcp.git
cd kicad-mcp
make install

make install uses uv to create a virtual environment and install all dependencies.

Copy the example environment file and edit it with your paths:

Terminal window
cp .env.example .env

At minimum, set KICAD_SEARCH_PATHS to the directories where your KiCad projects live:

KICAD_SEARCH_PATHS=~/Documents/KiCad,~/Electronics

See Configuration for the full list of environment variables.

Add mckicad to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Linux: ~/.config/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
"mcpServers": {
"kicad": {
"command": "/ABSOLUTE/PATH/TO/kicad-mcp/.venv/bin/python",
"args": ["/ABSOLUTE/PATH/TO/kicad-mcp/main.py"]
}
}
}

Replace the paths with absolute paths to your clone. Use the Python binary inside the .venv directory that make install created.

You can also pass environment variables directly in the client config:

{
"mcpServers": {
"kicad": {
"command": "/ABSOLUTE/PATH/TO/kicad-mcp/.venv/bin/python",
"args": ["/ABSOLUTE/PATH/TO/kicad-mcp/main.py"],
"env": {
"KICAD_SEARCH_PATHS": "/home/user/Electronics,/home/user/PCB"
}
}
}
}

Restart Claude Desktop after editing the configuration.

mckicad declares a console script entry point, so you can also run it with:

Terminal window
uv run mckicad

Or from the project directory:

Terminal window
uv run python main.py

After connecting, ask your AI client something like:

List all my KiCad projects

If the server is running and configured correctly, it will scan your search paths and return a list of .kicad_pro files.

For automated PCB routing, install freeroute, a native-Python, Java-free autorouter:

Terminal window
uv tool install freeroute
# or: pip install freeroute

That is the whole setup. freeroute is pure standard library with no dependencies and no Java runtime. mckicad auto-discovers the freeroute command on your PATH; if it lives somewhere unusual, set FREEROUTE_CLI in your .env to the executable path. Verify with the check_routing_capability tool.

See the Autorouting guide for the full pipeline, engine choices, and honest scope.

freeroute completes fewer nets than the original FreeRouting engine on dense commercial boards (it drops a net rather than emit a DRC violation). If you need maximum completion on a hard board and have Java available, keep the FreeRouting JAR as a fallback:

  1. Download the JAR from freerouting.app
  2. Place it at one of the auto-detected paths: ~/freerouting.jar, /usr/local/bin/freerouting.jar, or /opt/freerouting/freerouting.jar
  3. Install a Java runtime (java must be on your PATH)
  4. Or set FREEROUTING_JAR_PATH in your .env file to an explicit path

mckicad prefers freeroute when it is installed and falls back to the JAR only when freeroute is missing or cannot route the board.

CommandDescription
make installInstall dependencies with uv
make runStart the MCP server
make testRun all tests
make lintLint with ruff + mypy
make formatAuto-format with ruff
make buildBuild package
make cleanRemove build artifacts