
KiCad Schematics
io.github.unmateria由 GitHub 帳號 unmateria 發布v0.2.7更新於 Oct 24, 2026
Design KiCad schematics by talking to Claude. Places parts, wires nets, runs ERC. Needs KiCad 10.
概覽
本機 MCP 伺服器,讓助理依自然語言電路描述設計真實的 KiCad 電路圖,並輸出可編輯的 .kicad_sch 檔案。
- 可以做什麼
- 把文字電路描述編譯成完整的 KiCad 電路圖,附設計指南與範本,來源是文字,修改後可低成本重新編譯。尋找、驗證並從外部 KiCad 函式庫匯入缺少的元件,查看符號腳位與函式庫清單。讀取現有電路圖,彙整連線關係、元件分群與佈局指標。手動編輯:加入符號、導線、標籤、電源軌、接點與免接標記,或批次修改。執行 ERC/DRC 檢查,產生預覽圖或匯出 PDF,查看或變更輸出目錄與 KiCad 設定。
- 適用情境
- 適合讓助理依描述起草或修改 KiCad 電子電路圖,或檢查、修復既有的 .kicad_sch 檔案,省去手繪。它只做電路圖,不涉及 PCB 佈局、佈線或 Gerber。
- 執行需求
- 以本機程序(stdio)在桌面執行;可透過 .mcpb 安裝包或對應平台二進位檔安裝,也可用 Go 1.24+ 從原始碼建置。需要 KiCad 10 提供 kicad-cli(用於 ERC 與算圖),更早版本未測試。需要 Claude Desktop、Claude Code 等 MCP 用戶端。無需設定;可選 config.ini 設定路徑與經銷商 API 金鑰。PNG 預覽需要 Chromium 系列瀏覽器。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 KiCad Schematics,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP-KiCad
Design electronic schematics by talking to Claude. This is an MCP server that lets a language model draw real KiCad schematics — placing parts, wiring nets, adding power symbols and running KiCad's own electrical rules check — and hand you a .kicad_sch file you can open, edit and manufacture from.
[LM2596 buck converter schematic generated by MCP-KiCad]
An LM2596 step-down converter. Nobody drew this by hand: it was compiled from a text description, and it passes ERC.
What it actually does
You ask for a circuit in plain language. Claude writes a short declarative description of it and calls one tool, compile_schematic, which turns that description into a finished schematic file.
You: Build me a 555 astable running at about 1 Hz, 5 V supply.
Claude: [looks up the real pin names of the NE555, writes the design, compiles it] Done — 7 components, ERC clean. Here's the preview.
The result opens in KiCad like any other schematic. It is not a picture: it is a real file with a real netlist, ready for PCB layout.
What makes the output usable
Generating something is easy; generating a schematic a human would accept is not. Every compiled schematic is checked before you see it, and the compiler refuses to emit anything that fails:
If a connection cannot be drawn cleanly, it degrades to a net label rather than producing a wire that lies. The schematic is never silently wrong.
A net crossing itself is not one of those cases: it is one net either way, so the wire is cut at the crossing and given a junction rather than being thrown away. Only a genuine conflict with another net costs you a wire.
What it does not do
- No PCB work. No board layout, no copper routing, no Gerbers. Schematics only, on purpose — a PCB from a bad schematic is worthless.
- No component invention. It uses KiCad's installed symbol libraries, and
find_part/import_partbring in what is missing from external KiCad libraries — verified before installation. If a part exists nowhere, it says so instead of drawing one. - Not a simulator. It draws what you describe; it does not tell you whether your circuit is a good idea.
Requirements
Installation
Option A — one click (recommended)
Download mcp-kicad.mcpb from Releases and double-click it. Claude Desktop installs it as an extension: no JSON to edit, no paths to type. The bundle carries the Windows, macOS and Linux builds, so the same file works everywhere.
Then skip straight to Checking that it works.
On Apple Silicon the bundled macOS build runs through Rosetta. If you want the native one, take
mcp-kicad-darwin-arm64from Option B instead.
Option B — download a binary
-
Go to Releases and download the file for your system:
-
Put it wherever you like — say
C:\Tools\mcp-kicad.exeor~/bin/mcp-kicad. -
On Linux and macOS, make it executable:
On macOS the first run is blocked because the binary is unsigned. Allow it with:
There is nothing else to install. The binary is self-contained and needs no configuration file: it finds KiCad on its own.
Option C — build from source
Connecting it to Claude
Not needed if you installed the .mcpb bundle — it registers itself.
Claude Desktop
Edit the configuration file — create it if it isn't there:
Add the server:
On Linux or macOS the command is a normal path, "/home/you/bin/mcp-kicad".
Windows note: backslashes must be doubled in JSON (
C:\\Tools\\...). A single backslash is the single most common reason the server fails to start.
Then quit Claude Desktop completely and reopen it. Reloading the window is not enough — the server runs as a child process and only starts on a full restart.
Claude Code
Checking that it works
Ask Claude:
Use get_project_info to check the KiCad setup.
You should get back the detected kicad-cli path, the library directories, and the output directory. If it reports that kicad-cli was not found, see Configuration below.
Using it
Just describe the circuit. Be specific about what matters to you — supply voltage, part numbers you want, values you've already chosen — and leave the rest to Claude.
Prompts that work well:
Design a 5 V regulated supply from a 12 V input using an LM7805, with input and output decoupling and a power LED.
Make me an ATmega328P minimal board: 16 MHz crystal with load caps, reset pull-up, ICSP header, and decoupling on both supply pins.
Build a two-transistor astable multivibrator that blinks two LEDs at roughly 2 Hz.
Useful things to ask for afterwards:
- "Show me the schematic" — renders a preview image.
- "Export it as PDF" — through
kicad-cli. - "Run ERC" — KiCad's electrical rules check, with the violations explained.
- "Move the decoupling caps closer to U1 and recompile" — the design source is text, so revisions are cheap.
The generated files land in the output directory (get_output_dir tells you where; set_output_dir changes it).
The design source
Behind the scenes, Claude writes a small JSON document and compiles it. You will rarely need to touch this, but it is worth seeing, because it explains why the results are stable — positions are never given in millimetres, they are anchored pin-to-pin:
[The schematic compiled from the source above]
The first symbol in a block anchors it; every other symbol hangs off a pin of one already placed, a whole number of 2.54 mm grid cells away. That is how a schematic stays on-grid and readable no matter how the model reorders things.
The complete format is specified in internal/tools/design_format.md (the same text the design_guide tool serves to the model), and there are thirteen worked examples in docs/compiler/ — from a two-part LED circuit to a greenhouse controller with 27 components.
Configuration
None is required. The server looks for KiCad in the usual places:
- Windows —
C:\Program Files\KiCad\<version>\bin\kicad-cli.exe, thenPATH - Linux —
/usr/bin/kicad-cli,/usr/local/bin/kicad-cli, thenPATH - macOS —
/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli, thenPATH
If your install is somewhere unusual, or you want to change where files are written, copy config.ini.example to config.ini next to the executable and fill in what you need:
The API keys are optional and buy metadata only — no distributor serves CAD files. Every source that actually carries symbols and footprints needs no key.
Generated files default to <your home>/mcp-kicad/output.
Tools
Thirty-three tools are exposed. In practice Claude drives almost everything through compile_schematic; the rest exist for inspection and for repairing an existing file.
Designing
compile_schematic · design_guide · get_design_context · kicad_workflow_help · apply_template · list_templates
Finding parts
find_part · import_part · check_component_existence · symbol_pins · list_symbol_libraries · register_library
Reading a schematic
read_schematic · get_connectivity_summary · cluster_components · layout_metrics
Editing by hand
create_schematic · add_symbol · connect_pins · disconnect_pin · add_wire · add_label · add_power_rail · junction · no_connect · connect_netlist · batch_schematic
Checking and exporting
validate_design (ERC/DRC) · export_schematic_image (SVG/PDF) · modify_pcb_layout
Setup
get_project_info · get_output_dir · set_output_dir
Parts KiCad doesn't have
KiCad ships around 22 700 symbols. The one you need is often not among them.
find_part searches every source at once and import_part installs a
candidate:
Each source is indexed once into libs/cache/ and searched offline from then
on. Nothing is installed until it has been verified:
- it parses,
kicad-clireads it back and rewrites it,- it places in a scratch schematic with its pins resolved,
- its pins are compared against the footprint's pads,
- KiCad draws it, and you get the picture.
A part that fails is not installed at all. A half-imported symbol is worse than no symbol, because it looks like it works. And if a part exists in no source, the answer is that it does not exist — never a substitute chosen quietly, never geometry drawn from imagination.
Everything lands in one library, MCP_Imported, registered with KiCad so the
GUI's symbol chooser sees it too. Each imported symbol carries an MCP_Source
property recording where it came from, under what licence and when — which is
why libs/ is not versioned: it is reproducible from the sources.
How it works
.design.json → compile → .kicad_sch
- Place. Every symbol's position is derived from a pin anchor, resolved to absolute coordinates on the 2.54 mm grid.
- Wire. Short, obviously-correct connections are drawn with closed-form geometry; longer ones go to an A* router that avoids component bodies.
- Power. One power symbol per pin, offset in the direction the pin points, then aligned into rails.
- Gate. Every wire is re-examined. Anything that crosses another net, cuts through a symbol or overlaps collinearly is deleted and replaced by net labels — connectivity is preserved, the lie is not.
- Tidy. Reference and value text is moved off bodies and wires; the sheet is centred and the paper size upgraded if the circuit doesn't fit.
- Verify. The file is re-read from scratch, its netlist traced and compared against the source, and
kicad-cliruns ERC.
KiCad files are read and written through a real S-expression parser (internal/sexp) — never by pattern-matching on text.
Known limitations
- Text can still overlap on dense sheets. Reference designators and net labels are moved to the lowest-overlap position available, but on a crowded schematic the best available spot sometimes still touches something. The compiler reports exactly what is left over and how much extra spacing would clear each one.
- Some connections become labels instead of wires. This is the gate doing its job. Electrically identical, less pretty.
- PNG previews need a Chromium-family browser (Edge, Chrome, Chromium or Brave). Without one, a lower-quality pure-Go renderer is used instead. Only the Windows path is verified in practice.
- Tested with Claude Desktop and Claude Code. Other MCP clients should work but haven't been tried.
Development
The thirteen sources in docs/compiler/ are the reference corpus — every change to the pipeline is checked against all of them.
Architecture notes live in CLAUDE.md.
License
PolyForm Noncommercial License 1.0.0 — free to use, modify and share for any noncommercial purpose, including personal projects, hobby electronics, education, research and nonprofit organisations. Commercial use is not granted by this license.
來源:README.md,提交 d43813d
工具
0版本歷史
1- v0.2.7最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。