KI

KiCad MCP Server for macOS, Windows, Linux

Install MCP server for KiCad on macOS, Windows, and Linux to manage libraries, footprints, and versioned projects across platforms.

Quick Install
npx -y @lamaalrajih/kicad-mcp

Overview

The KiCad MCP Server implements a Model Context Protocol (MCP) backend tailored for KiCad users and teams. It provides a lightweight HTTP service for hosting and serving schematic libraries, footprint libraries, 3D models, and versioned project blobs so KiCad installations across macOS, Windows, and Linux can access a shared, consistent set of resources. The server makes it easier to centralize library management, distribute updates, and keep project assets synchronized across machines.

Designed for developers and small-to-medium engineering teams, the server supports platform-agnostic workflows: designers can point their KiCad installation at the MCP server to fetch footprints and models on demand, CI systems can pull libraries automatically, and teams can use the server as a simple Git-backed project store for versioned project snapshots.

Features

  • Host schematic libraries, footprint libraries, and 3D model assets for KiCad
  • Serve versioned project files (project blobs) for reproducible designs
  • Simple REST API compatible with MCP client expectations
  • Cross-platform: runs on macOS, Windows, and Linux
  • Lightweight: runs from source or as a small service/container
  • Optional authentication and TLS (configurable)
  • CLI and minimal web UI for management (listing, upload, download)
  • Can be backed by a filesystem or Git for versioning and collaboration

Installation / Configuration

Below are basic steps to get the server running from source. Adjust to your environment (virtualenv, containers, or system services).

  1. Clone the repository:
git clone https://github.com/lamaalrajih/kicad-mcp.git
cd kicad-mcp
  1. Create a Python virtual environment and install dependencies (example):
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Configure the server (example YAML). Create a file named config.yml:
server:
  host: 0.0.0.0
  port: 8080
  tls:
    enabled: false
    certfile: /path/to/cert.pem
    keyfile: /path/to/key.pem

storage:
  backend: filesystem
  path: /var/lib/kicad-mcp
auth:
  enabled: false
  1. Run the server:
python -m kicad_mcp.server --config config.yml
  1. (Optional) Run as a background service
  • Linux: systemd unit (point to python venv and config.yml)
  • macOS: launchd plist
  • Windows: run as a scheduled task or use a service wrapper

Example systemd snippet (adjust paths):

[Unit]
Description=KiCad MCP Server

[Service]
User=kicad
WorkingDirectory=/opt/kicad-mcp
ExecStart=/opt/kicad-mcp/.venv/bin/python -m kicad_mcp.server --config /etc/kicad-mcp/config.yml
Restart=on-failure

[Install]
WantedBy=multi-user.target

Available Resources

The server exposes a small set of endpoints and management tools to integrate with KiCad and automation.

Common API endpoints (examples):

ResourceMethodPurpose
/librariesGETList available libraries
/libraries/{name}GETDownload a library file
/footprintsGETList footprints
/footprints/{name}GETDownload footprint archive
/models/{path}GETFetch 3D model files
/projectsGET/POSTList and upload project blobs
/projects/{id}GETFetch a versioned project snapshot

Management tools:

  • CLI: upload/download libraries and projects from the command line
  • Minimal web UI: browse libraries, footprints, and project versions
  • API docs: simple JSON or OpenAPI description served by the server (if enabled)

Storage backends:

  • Filesystem (default): simple directory layout
  • Git-backed: use a Git repository for project/version history

Authentication & TLS:

  • Turn on basic auth or token-based authentication in config
  • Enable TLS for secure connections in production

Use Cases

  1. Team-wide shared libraries
  • Host a canonical set of schematics and footprints on the MCP server.
  • Each designer configures KiCad symbol/footprint library paths to fetch from the server, ensuring everyone uses approved parts.
  1. Cross-platform development
  • Developers on macOS, Windows, and Linux can access the same footprints and 3D models without copying files between machines.
  • When a footprint is updated on the server, clients pick up the new version immediately (or on next download), avoiding library drift.
  1. CI/CD and automation
  • CI pipelines download footprints and project blobs from the MCP server to run automated DRC/ER tests.
  • Use the Git-backed storage to fetch a specific project snapshot for reproducible builds or BOM generation.
  1. Versioned project snapshots
  • Use the project upload API to store snapshots of a design at major milestones (v1.0, v1.1, release).
  • Fetch older snapshots for audit, review, or rollback.
  1. Offline caching and resilience
  • Run a local MCP server in a lab or on a developer laptop that syncs with a central server to reduce bandwidth and provide local availability.

Next steps

  • Configure KiCad to use the server by adding remote library entries or by using a plugin that supports MCP endpoints.
  • Secure the server for production (enable TLS and authentication).
  • Consider containerizing the server (Docker) for easier deployment in CI or on cloud instances.

For full implementation details, commands, and API specifics, see the repository on GitHub: https://github.com/lamaalrajih/kicad-mcp.