Metadata-Version: 2.4
Name: mcp-kicad
Version: 0.1.0
Summary: MCP server exposing KiCad PCB Editor functionality via IPC API
Project-URL: Homepage, https://github.com/daedalus/mcp-kicad
Project-URL: Repository, https://github.com/daedalus/mcp-kicad
Project-URL: Issues, https://github.com/daedalus/mcp-kicad/issues
Author-email: Daniel Clavijo <dclavijo@atopile.io>
License: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: fastmcp>=2.0
Requires-Dist: kicad-python>=0.6.0
Provides-Extra: all
Requires-Dist: hatch; extra == 'all'
Requires-Dist: mypy; extra == 'all'
Requires-Dist: pytest; extra == 'all'
Requires-Dist: pytest-cov; extra == 'all'
Requires-Dist: pytest-mock; extra == 'all'
Requires-Dist: ruff; extra == 'all'
Provides-Extra: dev
Requires-Dist: hatch; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: lint
Requires-Dist: mypy; extra == 'lint'
Requires-Dist: ruff; extra == 'lint'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-mock; extra == 'test'
Description-Content-Type: text/markdown

mcp-kicad — MCP server exposing KiCad PCB Editor functionality via IPC API.

[![PyPI](https://img.shields.io/pypi/v/mcp-kicad.svg)](https://pypi.org/project/mcp-kicad/)
[![Python](https://img.shields.io/pypi/pyversions/mcp-kicad.svg)](https://pypi.org/project/mcp-kicad/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

## Install

```bash
pip install mcp-kicad
```

## Requirements

- KiCad 9.0 or higher with the IPC API server enabled
- Go to **Preferences > Plugins** in KiCad and enable the API server

## Usage

The MCP server communicates with a running KiCad instance via the IPC API. Start KiCad first, then run the server:

```bash
mcp-kicad
```

Or configure it in your MCP client:

```json
{
  "mcpServers": {
    "mcp-kicad": {
      "command": "mcp-kicad",
      "env": {}
    }
  }
}
```

## Tools

The server exposes the following tools:

- **Connection**: `connect_kicad`, `check_connection`
- **Board**: `get_board_info`, `get_layers`, `get_board_design_settings`
- **Footprints**: `list_footprints`, `get_footprint`, `search_footprints`
- **Nets**: `list_nets`, `get_net`, `list_netclasses`
- **Zones**: `list_zones`
- **Tracks/Vias**: `list_tracks`, `list_vias`
- **Pads**: `list_pads`
- **Text**: `list_texts`, `get_text_extents`
- **Project**: `get_project`, `get_version`

## Example

```python
from mcp_kicad import mcp_server

# Connect to running KiCad
result = mcp_server.connect_kicad()

# Get board info
board_info = mcp_server.get_board_info()
print(board_info)

# List all footprints
footprints = mcp_server.list_footprints()
for fp in footprints:
    print(f"{fp['reference']}: {fp['value']}")
```

## Development

```bash
git clone https://github.com/daedalus/mcp-kicad.git
cd mcp-kicad
pip install -e ".[test]"

# run tests
pytest

# format
ruff format src/ tests/

# lint
ruff check src/ tests/

# type check
mypy src/
```

mcp-name: io.github.daedalus/mcp-kicad