JLC EDA MCP Server
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., "@JLC EDA MCP Server check the current board state"
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.
JLC EDA MCP Server
这是从原 jlc_import 目录整理出来的独立仓库,用来让支持 Model Context Protocol 的客户端控制嘉立创 EDA。
Credits
当前仓库基于 hyl64/jlcmcp 整理和改造。
git clone <this-repo-url> jlc-mcp
cd jlc-mcp仓库包含三个部分:
src/: MCP server,向 Codex、Claude Code、Cursor、Windsurf 等客户端暴露 PCB/原理图工具。local_jlc_gateway.cjs: 本机 gateway,接收 MCP server 的 HTTP 命令,并通过 WebSocket 转发给 EDA 插件。jlc-bridge/: 嘉立创 EDA 扩展插件,运行在 EDA 里执行实际操作。
Related MCP server: easyeda-mcp
架构
MCP client
-> stdio
MCP server: <absolute-path-to-jlc-mcp>/dist/index.js
-> HTTP POST http://127.0.0.1:18800/command
local gateway: local_jlc_gateway.cjs
-> WebSocket ws://127.0.0.1:18800/ws/bridge
jlc-bridge extension
-> 嘉立创 EDAMCP server 本身不直接控制 EDA,它只把工具调用发送给本机 gateway。jlc-bridge 插件启动后会连接 gateway 的 /ws/bridge,再由插件调用嘉立创 EDA 的扩展 API。
前置条件
Node.js 18 或更新版本
嘉立创 EDA 专业版,能安装本地扩展
一个支持 MCP 的客户端
如需使用
pcb_agent,需要设置ANTHROPIC_API_KEY
安装
cd /path/to/jlc-mcp
npm install
npm run build构建成功后,MCP 入口文件是:
/path/to/jlc-mcp/dist/index.js构建并安装 EDA 插件
cd /path/to/jlc-mcp/jlc-bridge
npm install
npm run build构建后会生成:
/path/to/jlc-mcp/jlc-bridge/build/jlc-bridge.eext
/path/to/jlc-mcp/jlc-bridge/build/jlc-bridge.lcex
/path/to/jlc-mcp/jlc-bridge/build/jlc-bridge_v0.1.29.eext在嘉立创 EDA 里安装其中一个扩展包。插件会在 EDA 启动后自动尝试连接:
ws://127.0.0.1:18800/ws/bridge也可以在 EDA 的 JLC Bridge 菜单里查看状态或手动切换。
WebSocket 是默认通信方式。插件还保留文件轮询 fallback,默认目录名是 jlc-bridge;如果确实要使用文件轮询,可以在 EDA 开发者控制台里设置 localStorage.jlcBridgeDir 为本机可写目录后重启插件。
启动 gateway
在一个单独终端中运行:
cd /path/to/jlc-mcp
npm run gateway默认监听:
http://127.0.0.1:18800检查状态:
curl http://127.0.0.1:18800/state如果 bridgeConnected 是 true,说明嘉立创 EDA 插件已经连上 gateway。
可选环境变量:
变量 | 默认值 | 说明 |
|
| gateway 监听地址 |
|
| gateway 监听端口 |
配置 MCP 客户端
把下面配置加入你的 MCP 客户端配置文件。仓库里也有同样内容的 mcp_config.example.json。
{
"mcpServers": {
"jlceda": {
"command": "node",
"args": [
"/absolute/path/to/jlc-mcp/dist/index.js"
],
"env": {
"GATEWAY_HTTP_URL": "http://127.0.0.1:18800/command"
}
}
}
}配置后重启 MCP 客户端。
如果要启用 pcb_agent,加上:
{
"env": {
"GATEWAY_HTTP_URL": "http://127.0.0.1:18800/command",
"ANTHROPIC_API_KEY": "sk-ant-...",
"AGENT_MODEL": "claude-sonnet-4-20250514"
}
}运行顺序
启动 gateway。
打开嘉立创 EDA,并确认
jlc-bridge插件已连接。启动或重启 MCP 客户端。
在客户端里调用
pcb_ping或pcb_get_state验证链路。
如果顺序反了也可以,插件和客户端可以稍后重连。但首次验证时按上面顺序更容易定位问题。
可用工具
当前 MCP server 默认注册 51 个工具;配置 ANTHROPIC_API_KEY 后增加 pcb_agent,共 52 个。分组如下:
状态查询:
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元件操作:
pcb_move_component、pcb_relocate_component、pcb_batch_move、pcb_select_component、pcb_delete_selected、pcb_create_component走线和过孔:
pcb_route_track、pcb_create_via、pcb_delete_tracks、pcb_delete_via铺铜和禁布区:
pcb_create_copper_pour、pcb_delete_pour、pcb_create_keepout、pcb_delete_keepout丝印:
pcb_get_silkscreens、pcb_move_silkscreen、pcb_auto_silkscreen高级规则:
pcb_create_diff_pair、pcb_list_diff_pairs、pcb_delete_diff_pair、pcb_create_equal_length、pcb_list_equal_lengths、pcb_delete_equal_length原理图:
sch_get_state、sch_get_netlist、sch_run_drc、pcb_open_document工程及原生数据:
eda_open_project、eda_get_project_context、eda_get_available_commands、pcb_get_netlist、eda_get_document_source、eda_set_document_source、eda_export_project规则和同步:
pcb_get_design_rules、pcb_set_design_rules、pcb_save_rule_configuration、pcb_import_changes、pcb_save_document、sch_save_document计算工具:
calc_impedance、calc_trace_widthAgent:
pcb_agent,仅在设置ANTHROPIC_API_KEY后注册
所有 PCB 坐标和尺寸参数默认使用 mil。
0.1.27 增加迁移核对工具,并修正 DRC 分类计数、原生线宽读取和多板工程的保存目标。新工具需要同时更新 MCP server 和 EDA 扩展;完整参数、兼容性及更新步骤见 0.1.27 说明。
0.1.28 修复原生导出临时元数据造成的版本误报,正确区分原理图 DRC 摘要与详细问题,并明确网表导入仍可能需要界面确认。见 0.1.28 说明。
0.1.29 增加 eda_open_project,按 UUID 或精确名称打开已有项目,默认保护其它已打开的编辑文档。见 打开项目说明。
本地验证
安装根目录和 jlc-bridge 的依赖后,运行:
npm run verify它会检查新扩展模块的类型、构建 MCP 和扩展,并运行 12 项回归测试,包括构建后的 stdio → HTTP → 扩展 WebSocket 命令分发测试。测试使用模拟的 EDA API,不连接真实编辑器;测试环境需要 Node.js 22 或更新版本。真实 EDA 的兼容性和项目 DRC 仍需在安装新扩展后验证。
只验证 MCP server 能启动并列出工具,不需要 gateway:
cd /path/to/jlc-mcp
npm run build
printf '%s\n' \
'{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"manual","version":"1.0.0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}' \
'{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
| node dist/index.js端到端验证需要 gateway 和 EDA 插件都运行:
curl http://127.0.0.1:18800/state然后在 MCP 客户端调用:
pcb_ping
pcb_get_state项目结构
.
├── src/
│ ├── index.ts
│ ├── bridge-client.ts
│ ├── agent.ts
│ ├── calculators.ts
│ └── tools/
├── jlc-bridge/
│ ├── src/index.ts
│ ├── extension.json
│ ├── build/pack.js
│ ├── package.json
│ └── tsconfig.json
├── local_jlc_gateway.cjs
├── mcp_config.example.json
├── package.json
└── tsconfig.json常见问题
jlc bridge is not connected
gateway 已启动,但 EDA 插件没有连上。检查嘉立创 EDA 是否已打开、插件是否安装并启用,然后访问:
curl http://127.0.0.1:18800/stateMCP 客户端找不到工具
先确认已经构建:
cd /path/to/jlc-mcp
npm run build再确认 MCP 配置里的路径是当前仓库的 dist/index.js 绝对路径,不是旧的 jlc_import 或 /tmp/jlcmcp 路径。
端口被占用
改 gateway 端口:
JLC_GATEWAY_PORT=18801 npm run gateway同时把 MCP 配置改成:
{
"GATEWAY_HTTP_URL": "http://127.0.0.1:18801/command"
}注意:当前 jlc-bridge 插件源码里默认连接 ws://127.0.0.1:18800/ws/bridge。如果改 gateway 端口,也需要同步修改 jlc-bridge/src/index.ts 里的 WS_URL 后重新构建并安装插件。
Available Tools
38 toolscalc_impedanceB
计算 PCB 走线阻抗,或根据目标阻抗反算线宽。支持微带线/带状线/差分模式
Inputs: type (required), height (required), width, targetImpedance, +3 more.
calc_trace_widthA
根据载流要求计算最小走线宽度 (IPC-2221)
Inputs: current (required), thickness, tempRise, layer.
pcb_auto_silkscreenA
自动排列所有丝印(避免重叠)
Inputs: no named parameters.
pcb_batch_moveB
批量移动多个元件
Inputs: moves (required).
pcb_create_componentB
从库中放置元件到 PCB
Inputs: libraryUuid (required), componentUuid (required), layer (required), x (required), +2 more.
pcb_create_copper_pourC
创建矩形铺铜区域
Inputs: net (required), layer (required), x1 (required), y1 (required), +2 more.
pcb_create_diff_pairC
创建差分对
Inputs: name (required), posNet (required), negNet (required).
pcb_create_equal_lengthC
创建等长组
Inputs: name (required), nets (required).
pcb_create_keepoutC
创建矩形禁布区
Inputs: x1 (required), y1 (required), x2 (required), y2 (required), +1 more.
pcb_create_viaC
创建过孔
Inputs: net (required), x (required), y (required), drill (required), +1 more.
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_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_equal_lengthsA
列出所有等长组
Inputs: no named parameters.
pcb_move_componentB
移动元件到指定坐标 (mil)
Inputs: designator (required), x (required), y (required), rotation.
pcb_move_silkscreenC
移动丝印文字
Inputs: primitiveId (required), x (required), y (required), rotation.
pcb_open_documentC
切换到指定文档(原理图或 PCB)
Inputs: uuid (required).
pcb_pingB
检查 bridge 连接状态
Inputs: no named parameters.
pcb_relocate_componentB
安全搬迁元件(自动断开走线)
Inputs: designator (required), x (required), y (required), rotation.
pcb_route_trackC
画走线
Inputs: net (required), points (required), layer (required), width (required).
pcb_run_drcA
运行 PCB 设计规则检查 (DRC)
Inputs: no named parameters.
pcb_screenshotA
截取当前 PCB 编辑器截图
Inputs: no named parameters.
pcb_select_componentB
在编辑器中选中元件
Inputs: designator (required).
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 38 tools
Each tool targets a specific operation (create, delete, get, move, etc.) on a distinct object (component, track, via, etc.). The prefixes pcb_, sch_, calc_ further separate domains. Even similar operations like delete are differentiated by object type, and move vs relocate have distinct behaviors.
All tools follow a consistent pattern of domain prefix (pcb_, sch_, calc_) followed by verb_noun (e.g., pcb_create_component, pcb_get_board_info). No mixing of styles, and verbs are consistently placed.
With 38 tools, the set is comprehensive for PCB and schematic design automation but slightly high. Most tools are necessary for common workflows, though some redundancy exists (e.g., multiple delete tools) that could be consolidated.
The PCB tool surface is fairly complete with creation, deletion, querying, and routing. However, schematic tools are limited to three read/export functions, missing creation or editing. Also, some PCB operations like editing component properties or board outline tools are absent.
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.
Community preview of HuaweiCloud DevKit MCP server (official: io.github.huaweicloud)
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceBridges JLCPCB/Lichuang EDA Pro with MCP clients to export and analyze schematic/PCB DRC, netlists, and BOMs, enabling automated diagnostics and data queries.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients like Claude Code to control a running EasyEDA Pro instance for PCB design automation, including DRC checks, project management, and script execution via a bridge server.54 npmMIT
- FlicenseBqualityCmaintenanceConnects Jia Li Chuang EDA / EasyEDA Pro schematics to MCP clients, enabling AI-driven schematic editing, reading, and analysis.19-
- AlicenseNot gradedqualityAmaintenanceEnables MCP/AI clients to read project state and execute protected PCB operations in EasyEDA Pro via a local Bridge and official extension APIs.Apache 2.0