EasyEDA MCP
Provides tools to control EasyEDA Pro PCB editor: inspect board, components, nets, and primitives; draw board outlines, route tracks, add vias/copper pours/keepouts/fills/text; place or move components; modify/delete primitives; import schematic changes, run DRC, autoroute, set copper layers, zoom, and save.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@EasyEDA MCP draw a 50x30 mm board outline with 2 mm rounded corners"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
easyeda-mcp
讓 Claude(或任何 MCP client)直接操作 EasyEDA Pro(嘉立創EDA專業版)PCB 編輯器 的 MCP server。
架構
Claude Code ──stdio──▶ MCP server (server/index.js)
│ ws://127.0.0.1:18625(server 端監聽)
▼
EasyEDA Pro 內的 bridge 擴充 (extension/)
│ eda.pcb_PrimitiveLine.create(...) 等 pro-api
▼
目前開啟的 PCBEasyEDA 擴充不能開 server,只能當 WebSocket client(
eda.sys_WebSocket.register),所以由 MCP server 監聽、擴充連進來。擴充刻意做得很薄:只做「呼叫
eda.<模組>.<方法>(...)+ 把回傳的圖元物件序列化」。單位換算、走線拆段、板框、鋪銅等邏輯都在 server 端,新增 / 修改工具不必重裝擴充。擴充每 3 秒嘗試重連,所以 EasyEDA 和 Claude 誰先開都可以。
Related MCP server: jlceda-mcp
安裝
需要 Node.js 20 以上與 EasyEDA Pro 3.2 以上(桌面版)。
取得原始碼並安裝相依套件:
git clone https://github.com/junior941230/easyeda-mcp.git; cd easyeda-mcp; npm install取得擴充檔:從 Releases 下載
easyeda-mcp-bridge_v*.eext,或自己打包(產生在extension/build/):npm run build:extEasyEDA Pro → 上方選單「設定 → 擴展 → 擴展管理器」→「導入」,選上面那個
.eext。在擴展管理器裡點開 EasyEDA MCP Bridge,勾選 「外部交互」權限(沒開的話 WebSocket 會一直失敗)。
開啟一個 PCB,上方選單會多一個 MCP,點「連線 MCP server」。右下角出現「EasyEDA MCP 已連線」即成功。
在 MCP client 登記 server。Claude Code(在 easyeda-mcp 資料夾內執行):
claude mcp add easyeda -- node "$PWD/server/index.js"或在專案的
.mcp.json加入:{ "mcpServers": { "easyeda": { "command": "node", "args": ["<easyeda-mcp 的完整路徑>/server/index.js"] } } }重開 Claude Code 工作階段並允許此 MCP server。
工具(單位一律 mm,座標為 PCB 資料座標,Y 向上)
類別 | 工具 |
狀態 / 查詢 |
|
繪製 |
|
擺放 |
|
修改 / 刪除 |
|
文件 |
|
萬用 |
|
API 完整定義在 EasyEDA 安裝目錄:C:\Program Files\easyeda-pro\resources\app\assets\pro-api\<版本>\api-types.d.ts。
測試
npm run test:mock會啟動真正的 MCP server,並在 Node vm 裡跑打包後的擴充 + 假 eda 物件,跑過整條 MCP → WebSocket → 擴充 → API 的路徑。
命令列直接呼叫工具(工作階段沒載入 MCP 時也能用;會自己起一個 server 等擴充連線):
node server/cli.js easyeda_status pcb_get_infonode server/cli.js pcb_route_track '{"net":"GND","layer":"top","points":[[0,0],[10,0]]}'實機驗證結果(EasyEDA Pro 3.2.209、pro-api 0.3.59,2026-11-19)
項目 | 結果 |
PCB API 單位 | mil(0603 焊盤中心距量到 1.51 mm、焊盤 0.81×0.86 mm) |
多邊形座標(板框、鋪銅、填充、禁止區) | 與圖元同一座標系、Y 向上。API 文件說要對 Y 取反是錯的( |
ARC 角度 | 正值 = 逆時針(Y 向上座標系),圓角板框正確外凸 |
已實測可用 | 狀態、概況、元件列表 / 詳細、網路、圖元列表、選取、板框、走線、過孔、鋪銅、禁止區、絲印線、文字、移動元件、放置元件、修改、刪除、DRC、縮放、存檔、從原理圖更新 PCB(需在對話框按確認) |
尚未實測 |
|
EasyEDA API 的已知怪癖(已在 server 端繞過)
pcb_Primitive.getPrimitiveTypeByPrimitiveId是空殼,永遠回傳 undefined → 改用各類別的get(ids)判斷類型。pcb_Net.getAllPrimitivesByNet回傳引擎原始物件(pcbItemPrimitiveType、center…,座標只到 0.1 mil)→normalizeRaw()轉換。pcb_Document.getPrimitivesInRegion/getPrimitiveAtPoint:範圍內只要有板框等多邊形就丟「单多边形验证不通过」(它把路徑字串包成[pathString]才驗證)。本 MCP 沒用到,用eda_call呼叫時要注意。DRC 結果的座標和
getPrimitivesBBox的內部值都是 10 mil 單位。元件
Name常是={Value}、={Manufacturer Part}範本 → 從OtherProperty/ManufacturerId展開。pcb_Document.importChanges/sch_Document.importChanges的force參數無效:一律跳出「導入變更」確認對話框,並立刻回傳true,實際匯入要等使用者按確認。pcb_import_changes因此改成觸發對話框,再輪詢元件 / 網路差異並回報。匯入是全量同步,PCB 上原理圖沒有的元件會被刪掉,新元件會放在板框外。用
sch_PrimitiveComponent.create放的元件UniqueId是空字串,多顆會被判為重複,生成網表時 EasyEDA 自動改成gge1、gge2…(日誌會出現「唯一 ID 與其他元件重複」)。不影響匯入,但之後做原理圖工具時應該在建立後用modify({uniqueId})給不重複的值。原理圖 API(
sch_*)只對目前使用中的分頁有效;要先dmt_EditorControl.openDocument(<頁面 uuid>)切過去。sch_Netlist.getNetlist會卡住沒回應。
埠號衝突
同時開兩個 Claude 工作階段時,只有先啟動的 MCP server 能綁到 18625,後啟動的工具會回報 EADDRINUSE。後啟動的 server 會每 5 秒重試,先前那個關掉後就自動接手(0.1.1 起)。要兩邊同時用,把其中一個的 EASYEDA_MCP_PORT 改掉,並在 EasyEDA「MCP → 設定 server 位址…」改成同一個埠。
預設埠
預設埠是 18625(0.1.2 起;之前是 49625)。49152 以上是 Windows 的動態埠範圍,系統隨時可能把它分配給別的程式的連線,固定埠放在這個範圍外比較不會撞到。改埠:server 用環境變數 EASYEDA_MCP_PORT,擴充用選單「MCP → 設定 server 位址…」。
心跳與提示
EasyEDA 在連線仍活著時再呼叫
register(),也會再觸發「已連線」回呼。擴充(0.1.1 起)只在「未連線 → 已連線」時跳提示。server 每 10 秒送應用層
ping,並在 hello 後回welcome。擴充超過 30 秒沒收到任何訊息就判定斷線並重連;舊版 server 不送welcome,擴充就不做逾時判斷。
Available Tools
28 toolseasyeda_statusARead-only
檢查 MCP 與 EasyEDA Pro 的連線狀態,以及目前開啟的工程 / 文件。開始操作前先呼叫一次。
Inputs: no named parameters.
eda_callC
直接呼叫任意 EasyEDA Pro API:eda.(...args)。注意單位是 EasyEDA 原生(PCB 為 mil,1 mm = 39.3701 mil),座標笛卡爾 Y 向上;多邊形參數傳 {"$polygon": [...]}(SVG 座標,Y 向下);要省略某參數傳 {"$undefined": true}。API 參考在 EasyEDA 安裝目錄 resources/app/assets/pro-api/*/api-types.d.ts。
Inputs: path (required), args, fields, timeout_ms.
pcb_add_copper_pourC
新增鋪銅區(例如 GND 鋪銅)。shape 省略時沿用目前板框。
Inputs: net (required), fill, name, layer, +3 more.
pcb_add_fillC
新增實心銅箔 / 絲印填充(Fill),例如散熱銅面。
Inputs: shape (required), net, layer.
pcb_add_keepoutB
新增禁止區(Region),例如天線下方禁止走線 / 鋪銅。
Inputs: shape (required), name, layer, rules.
pcb_add_textC
新增文字(預設頂層絲印)。
Inputs: x (required), y (required), text (required), size, +5 more.
pcb_add_viasC
新增一或多個過孔。
Inputs: vias (required).
pcb_autorouteC
執行 EasyEDA 內建自動佈線(可能需要數分鐘)。
Inputs: nets, layers.
pcb_clear_net_routingADestructive
刪除某網路(或全部)的走線、圓弧走線與過孔。
Inputs: net, include_vias.
pcb_delete_primitivesBDestructive
依 primitive ID 刪除圖元(自動判斷類型)。
Inputs: ids (required).
pcb_draw_polylineA
在任意層畫折線(絲印線條、機構層標記、文件層註記等;不含板框,板框請用 pcb_set_board_outline)。
Inputs: layer (required), points (required), net, width, +1 more.
pcb_get_componentARead-only
取得單一元件的詳細資料與所有焊盤(腳號、網路、絕對座標 mm),佈線前用來找接點。
Inputs: ref (required).
pcb_get_infoARead-only
取得目前 PCB 的概況:銅層數、板框外框、元件 / 走線 / 過孔 / 鋪銅數量、網路數。
Inputs: no named parameters.
pcb_get_netBRead-only
取得某網路的所有焊盤(含所屬元件位號)、已畫的走線與過孔、目前走線長度。用來規劃佈線。
Inputs: net (required).
pcb_get_selectionARead-only
取得使用者目前在 EasyEDA 中選取的圖元。
Inputs: no named parameters.
pcb_import_changesA
從原理圖更新 PCB(等同「設計 → 從原理圖更新 PCB」)。會在 EasyEDA 跳出「導入變更」對話框,需要使用者按確認;工具會等待並回報新增 / 刪除的元件與網路。新元件通常落在板框外,之後用 pcb_move_components 擺放。
Inputs: wait_seconds.
pcb_list_componentsARead-only
列出 PCB 上所有元件(位號、封裝、位置 mm、角度、層)。
Inputs: filter.
pcb_list_netsBRead-only
列出所有網路名稱。
Inputs: filter.
pcb_list_primitivesBRead-only
列出指定類型的圖元(可依網路 / 層過濾)。
Inputs: type (required), net, layer, limit.
pcb_modify_primitiveB
修改單一圖元的屬性。property 直接傳給 EasyEDA modify(),長度欄位請用 mm,會自動換算(x, y, startX, startY, endX, endY, lineWidth, holeDiameter, diameter, fontSize)。
Inputs: id (required), property (required).
pcb_move_componentsC
移動 / 旋轉 / 換面一或多個元件。
Inputs: moves (required).
pcb_place_componentA
從嘉立創系統庫放置元件到 PCB(依 LCSC 編號,例如 C25804)。注意:直接放在 PCB 的元件沒有原理圖網路,正規流程是在原理圖放好後用 pcb_import_changes。
Inputs: x (required), y (required), lcsc (required), layer, +1 more.
pcb_route_trackA
沿著一串點畫走線(每兩點一段直線)。換層請在換層點另外呼叫 pcb_add_vias。
Inputs: net (required), points (required), layer, width.
pcb_run_drcCRead-only
執行 DRC 設計規則檢查並回傳違規清單。
Inputs: limit, strict.
pcb_saveB
儲存目前 PCB 文件。
Inputs: no named parameters.
pcb_set_board_outlineA
畫板框(Board Outline 層的封閉折線)。可選擇先刪除現有板框。
Inputs: shape (required), line_width, replace_existing.
pcb_set_copper_layersC
設定銅層數(2、4、6…)。
Inputs: layers (required).
pcb_zoomARead-only
調整 EasyEDA 視圖:縮放到板框,或導航到指定區域 / 座標。
Inputs: point, region.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
大多數工具是清楚的資源+動作組合(pcb_get_net / pcb_list_nets / pcb_route_track / pcb_add_vias 各不相同),描述也點明了彼此差異(例如 pcb_place_component 與 pcb_import_changes、pcb_draw_polyline 與 pcb_set_board_outline)。少數邊界模糊:pcb_get_component / pcb_list_components / pcb_list_primitives / pcb_get_net 都是讀取查詢;pcb_modify_primitive(可改 x/y)與 pcb_move_components(搬移/旋轉元件)職責重疊。eda_call 是萬用逃生口,本質上與所有工具重疊,但描述已警告應優先使用專用工具。
絕大多數工具採 pcb_ + 動詞 + 名詞 的統一慣例(get/list/set/add/modify/move/delete/clear/place/route/import/run/save/zoom),可預測性高。例外是 easyeda_status 與 eda_call 沒有 pcb_ 前綴(可理解為非 PCB 專屬),以及 pcb_autoroute、pcb_zoom 缺少名詞受詞,屬輕微不一致。
28 個工具略偏多,超過舒適區間;不過 PCB 編輯領域本身寬廣(板框、走線、過孔、鋪銅、禁置區、文字、元件擺放、DRC、自動佈線),每個工具大致都有明確用途。仍可精簡:eda_call 理論上可涵蓋部分一次性操作(如 pcb_zoom、pcb_save),且讀取類工具有幾個可合併。
PCB 編輯生命週期覆蓋完整:板框設定、元件擺放/移動/匯入變更、走線、過孔、鋪銅、填充、禁置區、絲印線與文字、層數設定、刪除與清除走線、DRC、自動佈線、存檔與視圖導航,並有 eda_call 作為缺口逃生口。缺口在製造輸出(Gerber/BOM/座標檔匯出)、設計規則編輯與復原/重做等操作,代理只能靠 eda_call 自行摸索。
Maintenance
Related MCP Connectors
EasyGerber brings AI printed circuit board (PCB) design, layout, and routing to MCP-compatible assistants. Describe a circuit or start from firmware pin assignments, search published electronic components, and build schematics using catalog parts with their footprints and available 3D models. Create and revise boards, generate layouts with automatic component placement and routing, inspect previews, and check saved layouts for blocking design issues. Export manufacturing ZIPs containing Gerber and drill files, a bill of materials, and component placement data, or download an editable EasyGerber (.egb) file. Start without signing up. Your agent uses one private board reference to create and continue a board, including catalog access, edits, layout, checks, previews, and exports, without a separate guest setup step or token to manage. To keep the board in your account or work with permitted saved personal or organization boards, complete EasyGerber sign-in and OAuth consent, then resume the same task. Account permissions, plan limits, and generation billing apply; support depends on your MCP client and installed integration.
Design, route, check, review and export manufacturable PCBs from plain language; KiCad import.
Design and revise PCBs from plain language, track jobs, and retrieve design artifacts.
Autonomous 0-DRC PCB Routing, RF/DFM Pre-Flight & KiCad MCP Server (calligraphyeda.com).
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables MCP clients to control EasyEDA Pro for schematic and PCB design through natural language, bridging the EasyEDA API without external AI or API keys.49MIT
- AlicenseCqualityBmaintenanceEnables Claude Code to directly operate 嘉立创EDA Professional for reading PCB/schematic designs, moving components, routing tracks, placing vias, pouring copper, running DRC, and managing silkscreens via natural language.391MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-capable AI agents to generate and reorganize schematics, resolve LCSC components, place and route PCBs with custom DRC constraints, inspect design data, and safely apply, repair, or restore changes in native EasyEDA Pro and JLCEDA documents.228MIT
- AlicenseBqualityCmaintenanceEnables an AI assistant to drive a live EasyEDA Pro editor for end-to-end PCB design: searching the LCSC library for parts, placing and wiring schematic symbols, transferring the design to the board, placing footprints, routing tracks and vias, drawing outlines and silkscreen, pouring copper, running DRC, and exporting BOM, pick-and-place, netlist, DXF and Gerber fabrication files.480Apache 2.0