EDA Tools MCP Server
EDA 工具 MCP 服务器
一个全面的模型上下文协议 (MCP) 服务器,为 Claude Desktop 和 Cursor IDE 等 AI 助手提供电子设计自动化 (EDA) 工具集成。该服务器使 AI 能够通过统一接口执行 Verilog 综合、仿真、ASIC 设计流程和波形分析。
演示
https://github.com/user-attachments/assets/65d8027e-7366-49b5-8f11-0430c1d1d3d6
EDA MCP 服务器演示,展示了 Verilog 综合、仿真和 ASIC 设计流程
功能
Verilog 综合:使用 Yosys 为各种 FPGA 目标(通用、ice40、xilinx)综合 Verilog 代码
Verilog 仿真:使用 Icarus Verilog 进行仿真,并自动执行测试平台 (testbench)
波形查看:启动 GTKWave 进行 VCD 文件可视化和信号分析
ASIC 设计流程:使用 OpenLane 和 Docker 集成实现完整的 RTL 到 GDSII 流程
布局查看:在 KLayout 中打开 GDSII 文件以进行物理设计检查
报告分析:读取并分析 OpenLane 报告,以获取 PPA 指标和设计质量评估
先决条件
在使用此 MCP 服务器之前,您需要安装以下 EDA 工具:
1. Yosys (Verilog 综合)
macOS (Homebrew):
brew install yosysUbuntu/Debian:
sudo apt-get update
sudo apt-get install yosys从源码编译:
# Install prerequisites
sudo apt-get install build-essential clang bison flex \
libreadline-dev gawk tcl-dev libffi-dev git \
graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev
# Clone and build
git clone https://github.com/YosysHQ/yosys.git
cd yosys
make -j$(nproc)
sudo make install替代方案 - OSS CAD Suite (推荐): 从以下地址下载完整工具链:https://github.com/YosysHQ/oss-cad-suite-build/releases
2. Icarus Verilog (仿真)
macOS (Homebrew):
brew install icarus-verilogUbuntu/Debian:
sudo apt-get install iverilogWindows: 从以下地址下载安装程序:https://bleyer.org/icarus/
3. GTKWave (波形查看器)
直接下载 (推荐):
Windows: 从 SourceForge 下载
macOS: 从 SourceForge 下载或使用 Homebrew:
brew install --cask gtkwaveLinux: 从 SourceForge 下载或使用包管理器:
sudo apt-get install gtkwave
其他安装方法:
# macOS (Homebrew)
brew install --cask gtkwave
# Ubuntu/Debian
sudo apt-get install gtkwave
# Build from source (all platforms)
git clone https://github.com/gtkwave/gtkwave.git
cd gtkwave
meson setup build && cd build && meson install4. Docker Desktop (推荐用于 OpenLane)
直接下载:
Windows: 下载适用于 Windows 的 Docker Desktop
macOS: 下载适用于 Mac 的 Docker Desktop 或
brew install --cask dockerLinux: 下载适用于 Linux 的 Docker Desktop
安装:
从官网下载并安装 Docker Desktop
启动 Docker Desktop 并确保其正在运行
验证安装:
docker run hello-world
注意: Docker Desktop 在一个包中包含了 Docker Engine、Docker CLI 和 Docker Compose。
5. OpenLane (ASIC 设计流程)
简单安装方法 (推荐):
# Install OpenLane via pip
pip install openlane
# Pull the Docker image
docker pull efabless/openlane:latest
# Verify installation
docker run hello-world使用示例:
# Create project directory
mkdir -p ~/openlane-projects/my-design
cd ~/openlane-projects/my-design
# Create Verilog file (counter example)
cat > counter.v << 'EOF'
module counter (
input wire clk,
input wire rst,
output reg [7:0] count
);
always @(posedge clk or posedge rst) begin
if (rst)
count <= 8'b0;
else
count <= count + 1;
end
endmodule
EOF
# Create configuration file
cat > config.json << 'EOF'
{
"DESIGN_NAME": "counter",
"VERILOG_FILES": ["counter.v"],
"CLOCK_PORT": "clk",
"CLOCK_PERIOD": 10.0
}
EOF
# Run the RTL-to-GDSII flow
python3 -m openlane --dockerized config.json主要优势:
--dockerized标志通过 Docker 自动处理所有工具依赖项
6. KLayout (布局查看器)
直接下载 (推荐):
Windows: 下载适用于 Windows 的 KLayout
macOS: 下载适用于 macOS 的 KLayout 或
brew install --cask klayoutLinux: 下载适用于 Linux 的 KLayout 或
sudo apt install klayout
其他安装:
# macOS (Homebrew)
brew install --cask klayout
# Ubuntu/Debian
sudo apt install klayout安装
1. 克隆并构建 MCP 服务器
git clone https://github.com/NellyW8/mcp-EDA
cd mcp-EDA
npm install
npm run build
npx tsc 2. 项目结构
mcp-EDA/
├── src/
│ └── index.ts # Main server code
├── build/
│ └── index.js # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.md配置
Docker Desktop MCP 集成
此方法使用 Docker Desktop 内置的 MCP 扩展,以获得最简单的设置体验。
先决条件
已安装并运行 Docker Desktop 4.39.0+
已安装 Claude Desktop
设置步骤
安装 Docker Desktop 扩展:
启动 Docker Desktop
转到左侧菜单中的 "Extensions"
搜索 "AI Tools" 或 "Docker MCP Toolkit"
安装 "Labs: AI Tools for Devs" 扩展
配置 Docker MCP 连接:
打开已安装的 "Labs: AI Tools for Devs" 扩展
点击右上角的齿轮图标
选择 "MCP Clients" 选项卡
为 "Claude Desktop" 或 "Cursor IDE" 点击 "Connect"
这将自动为 Claude Desktop 和 Cursor IDE 配置:
{ "mcpServers": { "MCP_DOCKER": { "command": "docker", "args": [ "run", "-i", "--rm", "alpine/socat", "STDIO", "TCP:host.docker.internal:8811" ] } } }
Claude Desktop 设置
添加您的 EDA MCP 服务器:
找到您的 Claude Desktop 配置文件,Settings > Developer > Edit Config:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
将您的 EDA 服务器添加到现有配置中:
{ "mcpServers": { "MCP_DOCKER": { "command": "docker", "args": [ "run", "-i", "--rm", "alpine/socat", "STDIO", "TCP:host.docker.internal:8811" ] }, "eda-mcp": { "command": "node", "args": [ "/absolute/path/to/your/eda-mcp-server/build/index.js" ], "env": { "PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin", "HOME": "/your/home/directory" } } } }重启 Claude Desktop 并在 Settings > Developer 中验证两个服务器是否都在运行。
Cursor IDE 设置
打开 Cursor 设置:
按
Ctrl + Shift + P(Windows/Linux) 或Cmd + Shift + P(macOS)搜索 "Cursor Settings"
在侧边栏中导航到 "MCP"
添加 MCP 服务器: 点击 "Add new MCP server" 并配置:
{ "mcpServers": { "MCP_DOCKER": { "command": "docker", "args": [ "run", "-i", "--rm", "alpine/socat", "STDIO", "TCP:host.docker.internal:8811" ] }, "eda-mcp": { "command": "node", "args": [ "/absolute/path/to/your/eda-mcp-server/build/index.js" ], "env": { "PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin", "HOME": "/your/home/directory" } } } }启用 MCP 工具:
转到 Cursor Settings → MCP
启用 "eda-mcp" 服务器
您应该会看到服务器状态变为 "Connected"
使用示例
1. Verilog 综合
Ask Claude: "Can you synthesize this counter module for an ice40 FPGA?"
module counter(
input clk,
input rst,
output [7:0] count
);
reg [7:0] count_reg;
assign count = count_reg;
always @(posedge clk or posedge rst) begin
if (rst)
count_reg <= 8'b0;
else
count_reg <= count_reg + 1;
end
endmodule2. Verilog 仿真
Ask Claude: "Please simulate this adder with a testbench"
// Design
module adder(
input [3:0] a,
input [3:0] b,
output [4:0] sum
);
assign sum = a + b;
endmodule
// Testbench will be generated automatically or you can provide one3. ASIC 设计流程
Ask Claude: "Run the complete ASIC flow for this design with a 10ns clock period"
module simple_cpu(
input clk,
input rst,
input [7:0] data_in,
output [7:0] data_out
);
// Your RTL design here
endmodule完成后您将获得:
runs/RUN_*/final/gds/design.gds- 最终的 GDSII 布局runs/RUN_*/openlane.log- 完整的执行日志runs/RUN_*/reports/- 时序、面积、功耗分析报告所有中间结果 (DEF 文件、网表等)
4. 波形分析
Ask Claude: "View the waveforms from the simulation with project ID: abc123"故障排除
常见问题
未检测到 MCP 服务器:
验证配置中的绝对路径
检查 Node.js 是否已安装且可访问
配置更改后重启 Claude Desktop/Cursor
Docker 权限错误:
sudo groupadd docker sudo usermod -aG docker $USER sudo reboot工具未找到错误:
验证工具是否已安装:
yosys --version,iverilog -V,gtkwave --version检查 MCP 配置中的 PATH 环境变量
在 macOS 上,确保包含 Homebrew 路径:
/opt/homebrew/bin
OpenLane 超时:
服务器对 OpenLane 流程有 10 分钟的超时限制
对于复杂设计,考虑简化或进行多次迭代
GTKWave/KLayout GUI 问题:
在 macOS 上:GTKWave/KLayout 可能需要在“安全性与隐私”设置中手动批准
在 Linux 上:如果使用远程系统,请确保 X11 转发正常工作
在 Windows 上:确保 GUI 应用程序可以从命令行启动
调试
检查 MCP 服务器日志:
Claude Desktop:
~/Library/Logs/Claude/mcp*.log(macOS)Cursor: 检查 MCP 设置面板以获取错误消息
手动测试工具:
yosys -help
iverilog -help
docker run hello-world
gtkwave --version
klayout -v验证 Node.js 环境:
node --version
npm --version支持
如有问题和疑问:
查看上面的故障排除部分
查看 MCP 服务器日志
手动测试各个工具
提交包含详细错误消息和环境信息的 issue
注意: 此 MCP 服务器需要本地安装 EDA 工具。该服务器充当 AI 助手与您的本地 EDA 工具链之间的桥梁,通过自然语言交互实现复杂的硬件设计工作流程。
引用
@misc{wang2025mcp4edallmpoweredmodelcontext,
title={MCP4EDA: LLM-Powered Model Context Protocol RTL-to-GDSII Automation with Backend Aware Synthesis Optimization},
author={Yiting Wang and Wanghao Ye and Yexiao He and Yiran Chen and Gang Qu and Ang Li},
year={2025},
eprint={2507.19570},
archivePrefix={arXiv},
primaryClass={cs.AR},
url={https://arxiv.org/abs/2507.19570},
}Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kfy123bot/mcp4eda-kfy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server