kicad-mcp

kicad-mcp

MCP server that analyzes, reviews, and exports KiCad 9 designs, with live board editing via IPC and a built-in design-review engine.

Category
访问服务器

README

kicad-mcp

CI License: MIT Python 3.10+

An MCP server that lets Claude analyze, review, and export KiCad 9 designs — and (with a running KiCad) edit boards live. Its differentiator is a built-in design-review engine encoding the teachings of Rick Hartley and Phil Salmony (Phil's Lab): stackup, return paths, grounding, decoupling, crosstalk, SMPS layout, mixed-signal partitioning, and DFM — with anti-myth guards so it never nags about 90° corners or "shield" moats.

Status: All phases (0–6) implemented. Headless analysis/verify/export, a 23-rule review engine across 10 families (with anti-myth guards), live board editing via IPC (verified against KiCad 9.0.8), experimental schematic writes, symbol/footprint/JLCPCB search, an async task queue, a tool router, and review history. 45 tools + 4 router tools, 4 prompts, 173 tests. See docs/architecture.md, PLAN.md §8, and CLAUDE.md.

The review engine (the differentiator)

review_design audits a board against a cited rule catalog and returns findings grouped by severity — each with a rule ID, a one-line physics rationale, a citation, and the exact location. v1 covers five families:

Family Rules Checks
stackup K1, K2, K5, K6 signal-adjacent-to-plane, bad 4-layer order, tight pwr–gnd cavity, 2-layer ground
grounding G1, G2 split ground plane, separate analog/digital grounds
return_path R5 trace crossing a gap in its reference plane (geometric)
decoupling DEC-1 100 nF near every IC
dfm RTE-2, RTE-3, DFM-4 power track width, via annular ring, board outline / mounting holes

Anti-myth by construction: no rule fires on 90° corners, guard traces, via fill, or length-in-mm. A golden test asserts a board full of 90° corners produces zero findings. Use set_design_context to supply rise times / clocks / target impedances the files can't contain.

Tools

Foundation: get_server_status · list_projects · get_project_info · create_project · get_board_info · get_board_stackup · list_schematic_components · list_schematic_nets · trace_net · run_erc · run_drc · export_gerbers · export_bom · export_netlist · export_step · render_board · export_fab_package

Review engine: review_design · review_topic · set_design_context (+ the review_board prompt)

Live editing (needs a running KiCad with the IPC API enabled): get_live_board_status · list_live_footprints · move_footprint · rotate_footprint · route_trace · add_via · route_differential_pair · add_zone · refill_zones · save_board

The visual loop: edit live → save_board → render_board → inspect the PNG → edit again. Every mutation is one undo step (Cmd/Ctrl-Z reverts it in the GUI).

Architecture

One Python process (FastMCP, stdio). Three backends behind one capability interface, selected at runtime with graceful degradation:

Backend Library Role Needs
kicad-cli subprocess ERC/DRC, netlist, BOM, gerbers, renders, fab package KiCad 9 installed
S-expr kicad-skip + sexpdata schematic/board read (writes gated, experimental) file closed in GUI
IPC kicad-python (kipy) live PCB editing (Phase 3) running KiCad + IPC API

If the GUI is down, editing tools return actionable errors while analysis/review/export keep working headless.

Install (dev)

uv venv
uv pip install -e ".[dev]"
uv run pytest
uv run ruff check .

Or with stock tooling:

python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest && ruff check .

Run

python -m kicad_mcp        # stdio MCP server
# or the installed console script:
kicad-mcp

The first tool to call is get_server_status, which reports which backends are live, what capabilities are available, and the detected KiCad version.

Configuration (KICAD_MCP_*)

Variable Meaning Default
KICAD_MCP_SEARCH_PATHS os.pathsep-separated project roots (also the file-access confinement boundary) ~/Documents/KiCad, ~/KiCad
KICAD_MCP_CLI_PATH override for the kicad-cli executable auto-discovered per platform
KICAD_MCP_FREEROUTING_JAR Freerouting jar for autoroute (Phase 6) unset
KICAD_MCP_ALLOW_SCHEMATIC_WRITE 1 to enable experimental schematic writes 0
KICAD_MCP_CLI_TIMEOUT seconds for kicad-cli subprocess calls 120
KICAD_MCP_IPC_TIMEOUT seconds for IPC calls 10

kicad-cli is discovered at the platform default (/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli on macOS, C:\Program Files\KiCad\9.0\bin\kicad-cli.exe on Windows, kicad-cli on PATH on Linux), overridable via KICAD_MCP_CLI_PATH.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选