jlceda-mcp-server
Provides tools for automating PCB and schematic design in EasyEDA (JLCPCB) EDA Professional Edition, including component placement, routing, copper pour management, DRC checking, BOM export, netlist generation, differential pair routing, and design health reporting.
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., "@jlceda-mcp-server route a 10mil track from VCC to U1 pin 3 on top layer"
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.
jlceda-mcp-server (Official Stack Migration Version)
嘉立创 EDA MCP Server — Let AI programming assistants directly control the PCB/schematic automation toolset of 嘉立创 EDA 专业版.
v1.0 has been fully migrated to the official JLC AI stack: No longer relies on self-developed WebSocket protocol and self-developed plugins, replaced by Run API Gateway extension (EDA side)
easyeda-api-skill Bridge Server (protocol side). MCP Server compiles each tool action into eda.* official API code, and executes it inside EDA through the official Bridge Server.
Architecture
AI IDE ──stdio(MCP)──> mcp-server ──HTTP /execute──> 官方 Bridge Server(49620-49629)
│ WS /eda(握手 easyeda-bridge)
▼
Run API Gateway 扩展 ──> 嘉立创EDA专业版MCP server (this repository) communicates with AI IDE via stdio;
The official Bridge Server (scripts/bridge-server.mjs, from easyeda-api-skill) automatically discovers/launches, listens on ports 49620-49629, runs as a singleton;
The Run API Gateway extension automatically scans ports and connects within 嘉立创EDA专业版 (need to check Allow external interaction in the extension manager), receives execute messages and executes with new AsyncFunction('eda', code).
Related MCP server: JLCEDA MCP Server
Prerequisites
Node.js >= 18 (recommended 22 LTS)
嘉立创EDA专业版 V3.2+
Install the official Run API Gateway extension in 嘉立创EDA:
Extension plaza: https://jlcext.com/item/oshwhub-official/run-api-gateway
Source code: https://github.com/easyeda/eext-run-api-gateway
After installation, go to Advanced → Extension Manager → Run API Gateway → Configuration, check Allow external interaction
(Optional) Official easyeda-api skill: https://github.com/easyeda/easyeda-api-skill
Installation & Build
npm install
npm run build # tsc 编译
npm run port # (可选)从 legacy-jlc-bridge 重新生成代码模板
npm run start:bridge # (可选)手动启动官方 Bridge Server;MCP server 也会自动拉起
npm run test:bridge # 端到端协议冒烟测试(无需真实 EDA,内置 mock)Configuration
Create .mcp.json in the project directory:
{
"mcpServers": {
"jlceda": {
"command": "node",
"args": ["<path-to>/jlceda-mcp-server/dist/index.js"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}When using for the first time, start the Bridge Server first (or let MCP server automatically launch it), and confirm in 嘉立创EDA that the Run API Gateway extension is connected (the top menu shows API Gateway).
Environment Variables
Variable | Default Value | Description |
GATEWAY_BASE_URL | Auto scan | Explicitly specify the official Bridge Server address (e.g., http://127.0.0.1:49620) |
AUTO_SPAWN_BRIDGE | true | Automatically launch scripts/bridge-server.mjs when Bridge Server is not found |
BRIDGE_SERVER_PATH | scripts/bridge-server.mjs | Custom Bridge Server path |
KILL_BRIDGE_ON_EXIT | 0 | Whether to kill the self-launched Bridge Server on exit (official singleton shared, default not kill) |
ANTHROPIC_API_KEY | — | Anthropic API Key (enables pcb_agent tool when set) |
AGENT_MODEL | claude-sonnet-4-20250514 | Model used by Agent |
Tool List (59)
Status Query (9)
pcb_get_state / pcb_screenshot / pcb_run_drc / pcb_get_tracks / pcb_get_pads pcb_get_net_primitives / pcb_get_board_info / pcb_get_feature_support / pcb_ping
Component Operations (6)
pcb_move_component / pcb_relocate_component / pcb_batch_move / pcb_select_component pcb_delete_selected / pcb_create_component
Tracks / Vias (4)
pcb_route_track / pcb_create_via / pcb_delete_tracks / pcb_delete_via
Copper Pour / Keepout (4)
pcb_create_copper_pour / pcb_delete_pour / pcb_create_keepout / pcb_delete_keepout
Silkscreen (3)
pcb_get_silkscreens / pcb_move_silkscreen / pcb_auto_silkscreen
Advanced Constraints (6)
pcb_create_diff_pair / pcb_list_diff_pairs / pcb_delete_diff_pair pcb_create_equal_length / pcb_list_equal_lengths / pcb_delete_equal_length
Schematic / Document (4)
sch_get_state / sch_get_netlist / sch_run_drc / pcb_open_document
PCB Agent (1, requires ANTHROPIC_API_KEY)
pcb_agent — Intelligent Agent, autonomously orchestrates multi-step operations to complete complex tasks
Calculation Tools (2)
calc_impedance / calc_trace_width
Official Bridge Operations (4, new in v1.0)
pcb_bridge_status — Bridge Server health status (EDA connection count/active windows) pcb_list_eda_windows — List all connected EDA windows pcb_select_eda_window — Select active EDA window (specify target when multiple instances) pcb_execute_code — Execute arbitrary eda.* official API code directly in EDA (advanced/debug)
All coordinate units are in mil. pcb_execute_code usage is consistent with the official easyeda-api-skill: code returns results in the form of return await eda.dmt_Project.getCurrentProjectInfo();
Advanced Features (6, new in v1.1)
pcb_bom_export — Export PCB BOM (JSON + CSV, aggregate quantity/reference designator/net by component name) pcb_net_connectivity_check — Net connectivity check (mark unrouted/single-pad nets) pcb_current_density_report — Current carrying capacity estimation per net (IPC-2221), mark low-capacity nets pcb_fanout_component — Create fanout vias for all pads of a specified component pcb_auto_route_nets — Basic auto-routing (L-shaped two-layer: top horizontal + bottom vertical + vias, requires DRC review) pcb_drc_autofix — DRC auto-fix (currently supports silkscreen conflict auto-arrangement), returns before/after comparison
Advanced Features v2 (4, new in v1.2)
pcb_component_clearance_check — Check pairwise component spacing, mark violations below threshold pcb_route_differential_pairs — Differential pair auto-routing (positive/negative net parallel L-shaped, report length mismatch) pcb_design_health_report — One-click design health report (BOM+connectivity+current+DRC+clearance, READY/NEEDS_WORK/POOR rating) pcb_auto_fanout_and_route — Pipeline: fanout all components → auto-route all nets → DRC → silkscreen auto-fix
Advanced Features v3 (4, new in v1.3)
pcb_auto_place_components — Auto-placement: move components to pad centroid (first-order optimization) pcb_netlist_report — Generate netlist report from PCB pads (component→pin→net / net→component) pcb_design_snapshot / pcb_design_diff — Design snapshot and diff comparison (added/removed/moved) pcb_auto_route_nets upgrade — Single-layer obstacle avoidance routing (bypass pads+clearance) or two-layer L-shaped (useVias) pcb_bom_export upgrade — Support lcscCodes part number mapping (LCSC API protected, cannot auto-query)
Advanced Features v4 (3, new in v1.4)
sch_generate_from_netlist — Import netlist via official sch_Netlist.setNetlist to generate schematic (EasyEDA/JLCEDA/Protel2/PADS/Allegro/DISA/DSNET) sch_generate_from_pcb — One-click: PCB netlist report → Protel2 netlist → import to generate schematic pcb_eprj3_project_info — .eprj3 project inspector (directory/file: index, schematic/PCB/panel list, source file record count)
Project Structure
├── src/
│ ├── index.ts # MCP 入口(stdio)
│ ├── gateway-client.ts # 官方 Bridge Server HTTP 客户端(发现/拉起/execute)
│ ├── bridge-client.ts # 工具层接口(command(action, params)),基于 gateway-client
│ ├── codegen.ts # 动作 → eda 代码编译(含 ping/select/delete 内联实现)
│ ├── codegen/generated.ts# 自动生成:32 个经典动作的代码模板(npm run port)
│ ├── agent.ts # pcb_agent(Anthropic tool-use 循环)
│ ├── calculators.ts # 阻抗/线宽计算
│ └── tools/ # 工具注册(state/components/routing/copper/silkscreen/advanced/schematic/gateway...)
├── scripts/
│ ├── bridge-server.mjs # 官方 Bridge Server(vendored from easyeda/easyeda-api-skill)
│ ├── port-plugin.mjs # legacy 插件 → codegen 模板移植工具
│ └── smoke-bridge.mjs # 端到端协议冒烟测试(mock EDA,无需真实 EDA)
├── legacy-jlc-bridge/ # v0.1 自研插件(已弃用,仅存档)
└── package.jsonVerification
npm run build
npm run test:bridge # 75 项协议级断言(无需 EDA)Migration Notes (v0.1 → v1.0)
EDA side: Self-developed jlc-bridge plugin → Official Run API Gateway extension (no need to maintain plugin code)
Protocol side: Self-developed ws://127.0.0.1:18800/ws/bridge → Official Bridge Server (49620-49629, handshake verification)
Tool side: 35 action handlers ported as-is to official eda.* code templates (generated by scripts/port-plugin.mjs), MCP tool interface fully compatible with v0.1
New: pcb_bridge_status / pcb_list_eda_windows / pcb_select_eda_window / pcb_execute_code
License
MIT
Available Tools
59 toolscalc_impedanceB
计算 PCB 走线阻抗,或根据目标阻抗反算线宽。支持微带线/带状线/差分模式
Inputs: type (required), height (required), er, width, +3 more.
calc_trace_widthA
根据载流要求计算最小走线宽度 (IPC-2221)
Inputs: current (required), layer, tempRise, thickness.
pcb_auto_fanout_and_routeA
流水线:全部元件扇出 → 全部网络自动布线 → DRC → 丝印自修复
Inputs: no named parameters.
pcb_auto_place_componentsA
自动布局:把元件移动到其焊盘质心(一阶优化),锁定元件跳过
Inputs: maxMoves.
pcb_auto_route_netsA
自动布线:单层障碍规避(默认,绕开焊盘+clearance)或两层 L 型(useVias)。需 DRC 复查
Inputs: nets, width, useVias, topLayer, +2 more.
pcb_auto_silkscreenA
自动排列所有丝印(避免重叠)
Inputs: no named parameters.
pcb_batch_moveB
批量移动多个元件
Inputs: moves (required).
pcb_bom_exportB
导出 PCB BOM(按元件名聚合:数量、位号、网络、LCSC 料号),返回 JSON + CSV
Inputs: lcscCodes.
pcb_bridge_statusA
查看官方 Bridge Server 连接状态(服务标识、EDA 窗口连接数、当前活动窗口)
Inputs: no named parameters.
pcb_component_clearance_checkB
检查所有元件对的最小间距,标记低于阈值的违规对
Inputs: minClearance.
pcb_create_componentB
从库中放置元件到 PCB
Inputs: x (required), y (required), layer (required), libraryUuid (required), +2 more.
pcb_create_copper_pourC
创建矩形铺铜区域
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +2 more.
pcb_create_diff_pairC
创建差分对
Inputs: name (required), negNet (required), posNet (required).
pcb_create_equal_lengthC
创建等长组
Inputs: name (required), nets (required).
pcb_create_keepoutC
创建矩形禁布区
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +1 more.
pcb_create_viaC
创建过孔
Inputs: x (required), y (required), net (required), drill (required), +1 more.
pcb_current_density_reportA
各网络载流能力估算(IPC-2221,线宽总和 → 电流容量),标记偏低网络
Inputs: no named parameters.
pcb_delete_diff_pairB
删除差分对
Inputs: name (required).
pcb_delete_equal_lengthC
删除等长组
Inputs: name (required).
pcb_delete_keepoutB
删除禁布区
Inputs: primitiveId (required).
pcb_delete_pourC
删除铺铜
Inputs: primitiveId (required).
pcb_delete_selectedB
删除当前选中的对象
Inputs: no named parameters.
pcb_delete_tracksC
删除走线
Inputs: primitiveIds (required).
pcb_delete_viaC
删除过孔
Inputs: primitiveIds (required).
pcb_design_diffA
对比当前设计与上次快照,报告新增/移除/移动的元件
Inputs: no named parameters.
pcb_design_health_reportA
一键输出设计健康报告:BOM + 连通性 + 载流 + DRC + 间距,给出 READY/NEEDS_WORK/POOR 评分
Inputs: no named parameters.
pcb_design_snapshotA
保存当前设计快照(作为后续 pcb_design_diff 的基线)
Inputs: no named parameters.
pcb_drc_autofixA
运行 DRC 并自动修复可自动处理的问题(当前:丝印冲突),返回修复前后对比
Inputs: no named parameters.
pcb_eprj3_project_infoB
检查嘉立创EDA专业版 .eprj3 工程(目录或文件):工程索引、原理图/PCB/面板文件清单,或源文件记录统计(JSON-lines)
Inputs: projectPath (required).
pcb_execute_codeA
在嘉立创EDA专业版内直接执行 JavaScript 代码(高级/调试用)。代码运行于扩展环境,eda 为官方扩展 API。示例:return await eda.dmt_Project.getCurrentProjectInfo();
Inputs: code (required), windowId.
pcb_fanout_componentA
为指定元件的所有焊盘创建扇出过孔(同一网络)
Inputs: designator (required).
pcb_get_board_infoB
获取工程信息(板名、层数等)
Inputs: no named parameters.
pcb_get_feature_supportA
查询 bridge 支持的功能列表
Inputs: no named parameters.
pcb_get_net_primitivesB
查询指定网络的所有图元
Inputs: net (required).
pcb_get_padsB
查询焊盘信息
Inputs: designator.
pcb_get_silkscreensB
查询所有丝印文字
Inputs: no named parameters.
pcb_get_stateB
获取 PCB 完整状态(元件、网络、板框等)
Inputs: no named parameters.
pcb_get_tracksC
查询走线段
Inputs: net, layer.
pcb_list_diff_pairsA
列出所有差分对
Inputs: no named parameters.
pcb_list_eda_windowsA
列出所有已连接嘉立创EDA窗口及其活动状态
Inputs: no named parameters.
pcb_list_equal_lengthsA
列出所有等长组
Inputs: no named parameters.
pcb_move_componentB
移动元件到指定坐标 (mil)
Inputs: x (required), y (required), designator (required), rotation.
pcb_move_silkscreenC
移动丝印文字
Inputs: x (required), y (required), primitiveId (required), rotation.
pcb_net_connectivity_checkB
检查所有网络的连通性(焊盘数/走线段数,标记未布线网络)
Inputs: nets.
pcb_netlist_reportA
从 PCB 焊盘数据生成网表报告(元件→引脚→网络、网络→元件)
Inputs: no named parameters.
pcb_open_documentC
切换到指定文档(原理图或 PCB)
Inputs: uuid (required).
pcb_pingB
检查 bridge 连接状态
Inputs: no named parameters.
pcb_relocate_componentB
安全搬迁元件(自动断开走线)
Inputs: x (required), y (required), designator (required), rotation.
pcb_route_differential_pairsA
差分对自动布线:正/负网络平行 L 型走线(负网络偏移 gap),报告等长偏差
Inputs: gap, layer, width, pairName.
pcb_route_trackC
画走线
Inputs: net (required), layer (required), width (required), points (required).
pcb_run_drcA
运行 PCB 设计规则检查 (DRC)
Inputs: no named parameters.
pcb_screenshotA
截取当前 PCB 编辑器截图
Inputs: no named parameters.
pcb_select_componentB
在编辑器中选中元件
Inputs: designator (required).
pcb_select_eda_windowA
选择当前活动的嘉立创EDA窗口(多开时指定执行目标)
Inputs: windowId (required).
sch_generate_from_netlistA
通过官方 sch_Netlist.setNetlist 将网表导入原理图(生成原理图)。类型: EasyEDA/JLCEDA/Protel2/PADS/Allegro/DISA/DSNET
Inputs: netlist (required), type.
sch_generate_from_pcbC
一键:读取当前 PCB 网表报告 → 转 Protel2 网表 → 导入原理图生成
Inputs: type.
sch_get_netlistC
导出网表
Inputs: type.
sch_get_stateB
读取原理图状态
Inputs: no named parameters.
sch_run_drcB
运行原理图 DRC
Inputs: strict.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 59 tools
Most tools are pinned to a specific resource/action, but several clusters overlap: pcb_ping vs pcb_bridge_status, pcb_move_component vs pcb_relocate_component, pcb_run_drc vs pcb_drc_autofix, and the many getter/report/health tools. The descriptions are clear enough to resolve most ambiguity, but the sheer number of similar operations makes misselection plausible.
Names are consistently lowercase snake_case with pcb_/sch_/calc_ domain prefixes, and most follow a verb_object pattern. Exceptions such as pcb_delete_selected, pcb_bridge_status, pcb_design_health_report, and pcb_eprj3_project_info stray from the dominant style, so it is good but not perfect.
59 tools is far beyond the typical well-scoped range. The EDA domain is broad, but many tools are micro-operations and several pipeline/report tools could be consolidated, making the set feel oversized and harder to navigate.
The set covers the main PCB workflow: component placement, routing, vias, pours, keepouts, differential pairs, equal lengths, DRC, netlist/BOM reporting, design health, snapshots/diffs, and schematic generation. Minor gaps exist, such as no direct schematic editing or ability to update track/component properties, but pcb_execute_code and the broad reporting tools mitigate them.
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 circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
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.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with 嘉立创 EDA for PCB design tasks including project management, component libraries, rule checking, and manufacturing constraints.24 npm-
- FlicenseNot gradedqualityFmaintenanceEnables AI assistants to interact with JLCEDA EDA for schematic/PCB design operations like component placement, wiring, and circuit analysis through natural language.-
- AlicenseCqualityDmaintenanceAn MCP server that enables AI programming assistants to directly control JLCPCB EDA for PCB design automation, offering 39 tools for component placement, routing, copper pour, DRC, and a PCB Agent for autonomous complex tasks.43MIT
- 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.219MIT