jlceda-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., "@jlceda-mcp-server route a track from R1 pin 1 to C2 pin 2"
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
本项目上传的文件完全由opus4.6完成,有问题请问agent
嘉立创 EDA MCP Server — 让 AI 编程助手直接操控嘉立创 EDA 的 PCB 自动化工具集。
通过 Model Context Protocol 暴露 39 个 PCB/原理图工具,在 Claude Code / Cursor / Windsurf 等 AI IDE 中直接执行元件移动、走线、铺铜、DRC 等操作。内置 PCB Agent 可自主编排多步操作完成复杂任务。
架构
AI IDE ──stdio──> mcp-server ──WebSocket──> gateway ──> jlc-bridge 插件 ──> 嘉立创 EDAMCP server 通过 stdio 与 AI IDE 通信,内部维护 WebSocket 连接到 gateway 的 /ws/bridge 端点,转发命令给 jlc-bridge 插件控制 EDA 编辑器。
本仓库包含两个组件:
src/— MCP Server(Node.js,39 个 PCB/原理图工具 + Agent)jlc-bridge/— 嘉立创 EDA 扩展插件(运行在 EDA 内部,执行实际操作)
Related MCP server: KiCad MCP Server
前置条件
Node.js >= 18
gateway 运行中(默认端口 18800)
jlc-bridge 插件已连接嘉立创 EDA
安装 & 构建
npm install
npm run build配置
在你的项目目录下创建 .mcp.json:
{
"mcpServers": {
"jlceda": {
"command": "node",
"args": ["<path-to>/jlceda-mcp-server/dist/index.js"],
"env": {
"GATEWAY_WS_URL": "ws://127.0.0.1:18800/ws/bridge",
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}配置完成后重启 AI IDE,即可在对话中使用所有工具。
环境变量
变量 | 默认值 | 说明 |
|
| Gateway WebSocket 地址 |
| — | Anthropic API Key(设置后启用 pcb_agent 工具) |
|
| Agent 使用的模型 |
工具清单 (39 个)
状态查询 (9)
工具 | 说明 |
| 获取 PCB 完整状态(元件、网络、板框) |
| 截取编辑器截图(base64 PNG) |
| 运行 PCB 设计规则检查 |
| 查询走线段,可按网络/层过滤 |
| 查询焊盘信息,可按位号过滤 |
| 查询指定网络的所有图元 |
| 获取工程信息 |
| 查询 bridge 支持的功能列表 |
| 检查 bridge 连接状态 |
元件操作 (6)
工具 | 说明 |
| 移动元件到指定坐标 |
| 安全搬迁元件(自动断开走线) |
| 批量移动多个元件 |
| 在编辑器中选中元件 |
| 删除当前选中的对象 |
| 从库中放置元件到 PCB |
走线 / 过孔 (4)
工具 | 说明 |
| 画走线(指定网络、路径点、层、线宽) |
| 创建过孔 |
| 删除走线 |
| 删除过孔 |
铺铜 / 禁布区 (4)
工具 | 说明 |
| 创建矩形铺铜区域 |
| 删除铺铜 |
| 创建矩形禁布区 |
| 删除禁布区 |
丝印 (3)
工具 | 说明 |
| 查询所有丝印文字 |
| 移动丝印 |
| 自动排列丝印(避免重叠) |
高级约束 (6)
工具 | 说明 |
| 创建差分对 |
| 列出所有差分对 |
| 删除差分对 |
| 创建等长组 |
| 列出所有等长组 |
| 删除等长组 |
原理图 / 文档 (4)
工具 | 说明 |
| 读取原理图状态 |
| 导出网表 |
| 运行原理图 DRC |
| 切换到指定文档(原理图或 PCB) |
PCB Agent (1)
工具 | 说明 |
| 智能 Agent — 给出高层任务,自主编排多步操作完成(需 ANTHROPIC_API_KEY) |
计算工具 (2)
工具 | 说明 |
| 计算走线阻抗,或根据目标阻抗反算线宽(微带线/带状线/差分) |
| 根据载流要求计算最小走线宽度 (IPC-2221) |
所有坐标参数单位为 mil(密耳),与嘉立创 EDA bridge 一致。
项目结构
├── src/ # MCP Server 源码
│ ├── index.ts # MCP 入口(stdio transport)
│ ├── bridge-client.ts # WebSocket 客户端,连接 gateway bridge
│ ├── calculators.ts # 阻抗/线宽纯计算函数
│ ├── agent.ts # PCB Agent 核心(工具注册表 + tool-use 循环)
│ └── tools/
│ ├── state.ts # 状态查询 (7)
│ ├── components.ts # 元件操作 (3)
│ ├── routing.ts # 走线/过孔 (4)
│ ├── copper-keepout.ts # 铺铜/禁布区 (4)
│ ├── silkscreen.ts # 丝印 (3)
│ ├── advanced.ts # 差分对/等长组 (4)
│ ├── schematic.ts # 原理图 (3)
│ ├── calculators.ts # 阻抗/线宽计算工具 (2)
│ └── agent.ts # PCB Agent 工具注册 (1)
├── jlc-bridge/ # 嘉立创 EDA 扩展插件
│ ├── src/index.ts # 插件主入口(2700+ 行)
│ ├── extension.json # 插件清单
│ ├── build/pack.js # 打包脚本(生成 .eext/.lcex)
│ ├── package.json
│ └── tsconfig.json
├── dist/ # MCP Server 编译输出
├── package.json
└── tsconfig.json核心模块
bridge-client.ts
WebSocket 客户端,连接 gateway /ws/bridge。
协议:发送
{type:'command', id, timestamp, payload:{action, params}},接收{type:'result', payload:{commandId, success, data, error}}命令超时 60 秒
断线自动重连(3 秒间隔)
懒连接:首次调用
command()时才建立 WebSocket
agent.ts
PCB 智能 Agent 核心,基于 Anthropic Claude API 的 tool-use 循环。
工具注册表:将 28 个 bridge 动作映射为 Anthropic tool-use 格式
Agent 循环:system prompt → messages.create → 执行 tool_use → 追加 tool_result → 继续循环
最大轮次限制(默认 20),防止无限循环
收集每步执行日志,最终一起返回
零额外基础设施,纯
@anthropic-ai/sdk实现
jlc-bridge 插件
运行在嘉立创 EDA 内部的扩展插件,负责执行实际的 PCB/原理图操作。
通过 WebSocket 连接 gateway,接收并执行命令
支持文件轮询回退(当 WebSocket 不可用时)
50+ 个底层操作函数(元件移动、走线、铺铜、DRC 等)
打包为
.eext/.lcex格式,在嘉立创 EDA 扩展管理器中安装
构建插件:
cd jlc-bridge
npm install
npm run build # 编译 + 打包为 .eext使用示例
在 AI IDE 中直接用自然语言:
> 获取当前 PCB 状态
→ 调用 pcb_get_state
> 把 U1 移到 (1000, 2000)
→ 调用 pcb_move_component {designator:"U1", x:1000, y:2000}
> 运行 DRC 检查
→ 调用 pcb_run_drc
> 在 GND 网络顶层铺铜,范围 (0,0) 到 (2000,4000)
→ 调用 pcb_create_copper_pour {net:"GND", layer:1, x1:0, y1:0, x2:2000, y2:4000}
> 创建 USB 差分对
→ 调用 pcb_create_diff_pair {name:"USB", posNet:"USB_DP", negNet:"USB_DN"}
> 分析当前布局并给出优化建议
→ 调用 pcb_agent {task:"分析当前布局并给出优化建议"}
→ Agent 自主调用 get_state → 分析 → 给出建议验证
# 编译
npm run build
# 测试 MCP 协议(不需要 gateway)
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":0}
{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js
# 端到端测试(需要 gateway + jlc-bridge 运行)
# 在 AI IDE 中说 "获取当前 PCB 状态" 即可验证技术栈
TypeScript 5.7, ES2022 modules
@modelcontextprotocol/sdk ^1.12 — MCP 协议实现
@anthropic-ai/sdk ^0.39 — Claude API(Agent tool-use 循环)
ws ^8 — WebSocket 客户端
zod ^3.23 — 工具参数 schema 定义
License
MIT
Available Tools
43 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_silkscreenA
自动排列所有丝印(避免重叠)
Inputs: no named parameters.
pcb_batch_moveB
批量移动多个元件
Inputs: moves (required).
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_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: x (required), y (required), designator (required), rotation.
pcb_move_silkscreenC
移动丝印文字
Inputs: x (required), y (required), primitiveId (required), rotation.
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_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).
sch_clear_schematicA
清空当前原理图的所有元件/导线/网络标号/连接点(重绘前清理)
Inputs: no named parameters.
sch_create_componentA
在原理图放置元件。可直接传 libraryUuid+uuid,或传 lcsc/query 由 easyeda-agent 自动解析 device identity(路线1:LCSC 取件解析器)。先试 JLCMCP 原生创建,失败降级委派 easyeda-agent。
Inputs: x (required), y (required), lcsc, uuid, +5 more.
sch_create_junctionB
在原理图放置连接点(junction)
Inputs: x (required), y (required).
sch_create_netlabelA
在原理图放置网络标号(绑定到导线上)
Inputs: x (required), y (required), net (required), orientation.
sch_create_wireA
在原理图绘制正交导线(points 为 "x1 y1 x2 y2 ..." 空格分隔的点串)
Inputs: points (required), color, lineWidth.
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 43 tools
Most tools are separated by domain prefixes and resource types, but pcb_relocate_component, pcb_move_component, and pcb_batch_move are easily confused; read operations also mix get/list/query with overlapping scopes. Descriptions are often terse, so an agent may pick the wrong movement or query tool.
Tool names consistently use snake_case and domain prefixes (pcb_, sch_, calc_), with mostly verb_noun structure. Minor inconsistencies exist: delete_tracks is plural while delete_via is singular, and read operations alternate between get_, list_, and query_.
43 tools is a large surface for an agent to navigate; while EDA automation is broad, many operations overlap in purpose and the count exceeds what is needed for a coherent tool set. It feels more like a full API dump than a curated MCP surface.
The set covers the main PCB workflow: components, routing, vias, pours, keepouts, silkscreen, diff pairs, equal-length tuning, DRC, schematic entry, netlist export, and calculators. Gaps include no dedicated schematic object deletion (only clear-all) and no component editing beyond placement/movement, but these are workable.
Related MCP Connectors
Autonomous 0-DRC PCB Routing, RF/DFM Pre-Flight & KiCad MCP Server (calligraphyeda.com).
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.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for AI-assisted PCB design with EasyEDA Pro, enabling inspection, review, and automation of schematics, PCBs, and manufacturing export.14Apache 2.0
- AlicenseBqualityBmaintenanceAn MCP server that enables AI assistants to analyze schematics, inspect PCBs, trace connections, validate designs, and generate embedded code for KiCad projects.39184MIT
- AlicenseCqualityDmaintenanceEnables AI coding assistants to control JLCPCB EDA for PCB automation, exposing 39 tools for component manipulation, routing, copper pour, DRC, and more. Includes a built-in PCB agent for orchestrating multi-step tasks.59276MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents end-to-end control of KiCad 9+ for rule checks, manufacturing exports, production-readiness certification, and live PCB editor control.MIT