Skip to content
Back to search

MCP4EDA

This is the Github Repo for the paper: MCP4EDA: LLM-Powered Model Context Protocol RTL-to-GDSII Automation with Backend Aware Synthesis Optimization. MCP server for a collection of open-source EDA tools

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/nellyw8--mcp4eda/badge.svg)](/listings/nellyw8--mcp4eda)

HTML

<a href="/listings/nellyw8--mcp4eda"><img src="/api/listings/nellyw8--mcp4eda/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone and Build the MCP Server

git clone https://github.com/NellyW8/mcp-EDA
cd mcp-EDA
npm install
npm run build
npx tsc   

2. Project Structure

mcp-EDA/
├── src/
│   └── index.ts          # Main server code
├── build/
│   └── index.js          # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.md

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 473 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # EDA Tools MCP Server
  2. Implementation of the paper: [MCP4EDA: LLM-Powered Model Context Protocol RTL-to-GDSII Automation with Backend Aware Synthesis Optimization](https://arxiv.org/abs/2507.19570)
  3. A comprehensive Model Context Protocol (MCP) server that provides Electronic Design Automation (EDA) tools integration for AI assistants like Claude Desktop and Cursor IDE. This server enables AI to perform Verilog synthesis, simulation, ASIC design flows, and waveform analysis through a unified interface.
  4. - [**Our Website**](http://www.agent4eda.com/)
  5. ## Demo
  6. https://github.com/user-attachments/assets/65d8027e-7366-49b5-8f11-0430c1d1d3d6
  7. *EDA MCP Server demonstration showing Verilog synthesis, simulation, and ASIC design flow*
  8. ## Features
  9. - **Verilog Synthesis**: Synthesize Verilog code using Yosys for various FPGA targets (generic, ice40, xilinx)
  10. - **Verilog Simulation**: Simulate designs using Icarus Verilog with automated testbench execution
  11. - **Waveform Viewing**: Launch GTKWave for VCD file visualization and signal analysis
  12. - **ASIC Design Flow**: Complete RTL-to-GDSII flow using OpenLane with Docker integration
  13. - **Layout Viewing**: Open GDSII files in KLayout for physical design inspection
  14. - **Report Analysis**: Read and analyze OpenLane reports for PPA metrics and design quality assessment
  15. ## Prerequisites
  16. Before using this MCP server, you need to install the following EDA tools:
  17. ### 1. Yosys (Verilog Synthesis)
  18. **macOS (Homebrew):**
  19. ```bash
  20. brew install yosys
  21. ```
  22. **Ubuntu/Debian:**
  23. ```bash
  24. sudo apt-get update
  25. sudo apt-get install yosys
  26. ```
  27. **From Source:**
  28. ```bash
  29. # Install prerequisites
  30. sudo apt-get install build-essential clang bison flex \
  31. libreadline-dev gawk tcl-dev libffi-dev git \
  32. graphviz xdot pkg-config python3 libboost-system-dev \
  33. libboost-python-dev libboost-filesystem-dev zlib1g-dev
  34. # Clone and build
  35. git clone https://github.com/YosysHQ/yosys.git
  36. cd yosys
  37. make -j$(nproc)
  38. sudo make install
  39. ```
  40. **Alternative - OSS CAD Suite (Recommended):**
  41. Download the complete toolchain from: https://github.com/YosysHQ/oss-cad-suite-build/releases
  42. ### 2. Icarus Verilog (Simulation)
  43. **macOS (Homebrew):**
  44. ```bash
  45. brew install icarus-verilog
  46. ```
  47. **Ubuntu/Debian:**
  48. ```bash
  49. sudo apt-get install iverilog
  50. ```
  51. **Windows:**
  52. Download installer from: https://bleyer.org/icarus/
  53. ### 3. GTKWave (Waveform Viewer)
  54. **Direct Downloads (Recommended):**
  55. - **Windows:** Download from [SourceForge](https://sourceforge.net/projects/gtkwave/)
  56. - **macOS:** Download from [SourceForge](https://sourceforge.net/projects/gtkwave/) or use Homebrew: `brew install --cask gtkwave`
  57. - **Linux:** Download from [SourceForge](https://sourceforge.net/projects/gtkwave/) or use package manager: `sudo apt-get install gtkwave`
  58. **Alternative Installation Methods:**
  59. ```bash
  60. # macOS (Homebrew)
  61. brew install --cask gtkwave
  62. # Ubuntu/Debian
  63. sudo apt-get install gtkwave
  64. # Build from source (all platforms)
  65. git clone https://github.com/gtkwave/gtkwave.git
  66. cd gtkwave
  67. meson setup build && cd build && meson install
  68. ```
  69. ### 4. Docker Desktop (Recommended for OpenLane)
  70. **Direct Downloads:**
  71. - **Windows:** [Download Docker Desktop for Windows](https://www.docker.com/products/docker-desktop)
  72. - **macOS:** [Download Docker Desktop for Mac](https://www.docker.com/products/docker-desktop) or `brew install --cask docker`
  73. - **Linux:** [Download Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/)
  74. **Installation:**
  75. 1. Download and install Docker Desktop from the official website
  76. 2. Launch Docker Desktop and ensure it's running
  77. 3. Verify installation: `docker run hello-world`
  78. **Note:** Docker Desktop includes Docker Engine, Docker CLI, and Docker Compose in one package.
  79. ### 5. OpenLane (ASIC Design Flow)
  80. **Simple Installation Method (Recommended):**
  81. ```bash
  82. # Install OpenLane via pip
  83. pip install openlane
  84. # Pull the Docker image
  85. docker pull efabless/openlane:latest
  86. # Verify installation
  87. docker run hello-world
  88. ```
  89. **Usage Example:**
  90. ```bash
  91. # Create project directory
  92. mkdir -p ~/openlane-projects/my-design
  93. cd ~/openlane-projects/my-design
  94. # Create Verilog file (counter example)
  95. cat > counter.v << 'EOF'
  96. module counter (
  97. input wire clk,
  98. input wire rst,
  99. output reg [7:0] count
  100. );
  101. always @(posedge clk or posedge rst) begin
  102. if (rst)
  103. count <= 8'b0;
  104. else
  105. count <= count + 1;
  106. end
  107. endmodule
  108. EOF
  109. # Create configuration file
  110. cat > config.json << 'EOF'
  111. {
  112. "DESIGN_NAME": "counter",
  113. "VERILOG_FILES": ["counter.v"],
  114. "CLOCK_PORT": "clk",
  115. "CLOCK_PERIOD": 10.0
  116. }
  117. EOF
  118. # Run the RTL-to-GDSII flow
  119. python3 -m openlane --dockerized config.json
  120. ```
  121. **Key Benefits:**
  122. - The `--dockerized` flag handles all tool dependencies automatically via Docker
  123. ### 6. KLayout (Layout Viewer)
  124. **Direct Downloads (Recommended):**
  125. - **Windows:** [Download KLayout for Windows](https://www.klayout.de/build.html)
  126. - **macOS:** [Download KLayout for macOS](https://www.klayout.de/build.html) or `brew install --cask klayout`
  127. - **Linux:** [Download KLayout for Linux](https://www.klayout.de/build.html) or `sudo apt install klayout`
  128. **Alternative Installation:**
  129. ```bash
  130. # macOS (Homebrew)
  131. brew install --cask klayout
  132. # Ubuntu/Debian
  133. sudo apt install klayout
  134. ```
  135. ## Installation
  136. ### 1. Clone and Build the MCP Server
  137. ```bash
  138. git clone https://github.com/NellyW8/mcp-EDA
  139. cd mcp-EDA
  140. npm install
  141. npm run build
  142. npx tsc
  143. ```
  144. ### 2. Project Structure
  145. ```
  146. mcp-EDA/
  147. ├── src/
  148. │ └── index.ts # Main server code
  149. ├── build/
  150. │ └── index.js # Compiled JavaScript
  151. ├── package.json
  152. ├── tsconfig.json
  153. └── README.md
  154. ```
  155. ## Configuration
  156. ### Docker Desktop MCP Integration
  157. This method uses Docker Desktop's built-in MCP extension for the easiest setup experience.
  158. #### Prerequisites
  159. - Docker Desktop 4.39.0+ installed and running
  160. - Claude Desktop installed
  161. #### Setup Steps
  162. 1. **Install Docker Desktop Extension:**
  163. - Launch Docker Desktop
  164. - Go to "Extensions" from the left menu
  165. - Search for "AI Tools" or "Docker MCP Toolkit"
  166. - Install "Labs: AI Tools for Devs" extension
  167. 2. **Configure Docker MCP Connection:**
  168. - Open the installed "Labs: AI Tools for Devs" extension
  169. - Click the gear icon in the upper right corner
  170. - Select the "MCP Clients" tab
  171. - Click "Connect" for "Claude Desktop" or "Cursor IDE"
  172. <img src="assets/docker.png" alt="Docker Setup" width="700">
  173. This automatically configures Claude Desktop and Cursor IDE with:
  174. ```json
  175. {
  176. "mcpServers": {
  177. "MCP_DOCKER": {
  178. "command": "docker",
  179. "args": [
  180. "run",
  181. "-i",
  182. "--rm",
  183. "alpine/socat",
  184. "STDIO",
  185. "TCP:host.docker.internal:8811"
  186. ]
  187. }
  188. }
  189. }
  190. ```
  191. ### Cursor IDE Setup
  192. 1. **Add Your EDA MCP Server:**
  193. - Locate your Claude Desktop config file, Settings > Developer > Edit Config:
  194. - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
  195. - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
  196. - Add your EDA server to the existing configuration:
  197. ```json
  198. {
  199. "mcpServers": {
  200. "MCP_DOCKER": {
  201. "command": "docker",
  202. "args": [
  203. "run",
  204. "-i",
  205. "--rm",
  206. "alpine/socat",
  207. "STDIO",
  208. "TCP:host.docker.internal:8811"
  209. ]
  210. },
  211. "eda-mcp": {
  212. "command": "node",
  213. "args": [
  214. "/absolute/path/to/your/eda-mcp-server/build/index.js"
  215. ],
  216. "env": {
  217. "PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin",
  218. "HOME": "/your/home/directory"
  219. }
  220. }
  221. }
  222. }
  223. ```
  224. 2. **Restart Claude Desktop** and verify both servers are running in Settings > Developer.
  225. ### Cursor IDE Setup
  226. 1. **Open Cursor Settings:**
  227. - Press `Ctrl + Shift + P` (Windows/Linux) or `Cmd + Shift + P` (macOS)
  228. - Search for "Cursor Settings"
  229. - Navigate to "MCP" in the sidebar
  230. 2. **Add MCP Server:**
  231. Click "Add new MCP server" and configure:
  232. ```json
  233. {
  234. "mcpServers": {
  235. "MCP_DOCKER": {
  236. "command": "docker",
  237. "args": [
  238. "run",
  239. "-i",
  240. "--rm",
  241. "alpine/socat",
  242. "STDIO",
  243. "TCP:host.docker.internal:8811"
  244. ]
  245. },
  246. "eda-mcp": {
  247. "command": "node",
  248. "args": [
  249. "/absolute/path/to/your/eda-mcp-server/build/index.js"
  250. ],
  251. "env": {
  252. "PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin",
  253. "HOME": "/your/home/directory"
  254. }
  255. }
  256. }
  257. }
  258. ```
  259. 3. **Enable MCP Tools:**
  260. - Go to Cursor Settings → MCP
  261. - Enable the "eda-mcp" server
  262. - You should see the server status change to "Connected"
  263. ## Usage Examples
  264. ### 1. Verilog Synthesis
  265. ```
  266. Ask Claude: "Can you synthesize this counter module for an ice40 FPGA?"
  267. module counter(
  268. input clk,
  269. input rst,
  270. output [7:0] count
  271. );
  272. reg [7:0] count_reg;
  273. assign count = count_reg;
  274. always @(posedge clk or posedge rst) begin
  275. if (rst)
  276. count_reg <= 8'b0;
  277. else
  278. count_reg <= count_reg + 1;
  279. end
  280. endmodule
  281. ```
  282. ### 2. Verilog Simulation
  283. ```
  284. Ask Claude: "Please simulate this adder with a testbench"
  285. // Design
  286. module adder(
  287. input [3:0] a,
  288. input [3:0] b,
  289. output [4:0] sum
  290. );
  291. assign sum = a + b;
  292. endmodule
  293. // Testbench will be generated automatically or you can provide one
  294. ```
  295. ### 3. ASIC Design Flow
  296. ```
  297. Ask Claude: "Run the complete ASIC flow for this design with a 10ns clock period"
  298. module simple_cpu(
  299. input clk,
  300. input rst,
  301. input [7:0] data_in,
  302. output [7:0] data_out
  303. );
  304. // Your RTL design here
  305. endmodule
  306. ```
  307. **What you get after completion:**
  308. - `runs/RUN_*/final/gds/design.gds` - Final GDSII layout
  309. - `runs/RUN_*/openlane.log` - Complete execution log
  310. - `runs/RUN_*/reports/` - Timing, area, power analysis reports
  311. - All intermediate results (DEF files, netlists, etc.)
  312. ### 4. Waveform Analysis
  313. ```
  314. Ask Claude: "View the waveforms from the simulation with project ID: abc123"
  315. ```
  316. ## Troubleshooting
  317. ### Common Issues
  318. 1. **MCP Server Not Detected:**
  319. - Verify the absolute path in configuration
  320. - Check that Node.js is installed and accessible
  321. - Restart Claude Desktop/Cursor after configuration changes
  322. 2. **Docker Permission Errors:**
  323. ```bash
  324. sudo groupadd docker
  325. sudo usermod -aG docker $USER
  326. sudo reboot
  327. ```
  328. 3. **Tool Not Found Errors:**
  329. - Verify tools are installed: `yosys --version`, `iverilog -V`, `gtkwave --version`
  330. - Check PATH environment variable in MCP configuration
  331. - On macOS, ensure Homebrew paths are included: `/opt/homebrew/bin`
  332. 4. **OpenLane Timeout:**
  333. - The server has a 10-minute timeout for OpenLane flows
  334. - For complex designs, consider simplifying or running multiple iterations
  335. 5. **GTKWave/KLayout GUI Issues:**
  336. - On macOS: GTKWave/KLayout may need manual approval in Security & Privacy settings
  337. - On Linux: Ensure X11 forwarding is working if using remote systems
  338. - On Windows: Ensure GUI applications can launch from command line
  339. ### Debugging
  340. 1. **Check MCP Server Logs:**
  341. - **Claude Desktop:** `~/Library/Logs/Claude/mcp*.log` (macOS)
  342. - **Cursor:** Check the MCP settings panel for error messages
  343. 2. **Test Tools Manually:**
  344. ```bash
  345. yosys -help
  346. iverilog -help
  347. docker run hello-world
  348. gtkwave --version
  349. klayout -v
  350. ```
  351. 3. **Verify Node.js Environment:**
  352. ```bash
  353. node --version
  354. npm --version
  355. ```
  356. ## Support
  357. For issues and questions:
  358. - Check the troubleshooting section above
  359. - Review MCP server logs
  360. - Test individual tools manually
  361. - Open an issue with detailed error messages and environment information
  362. ---
  363. **Note:** This MCP server requires local installation of EDA tools. The server acts as a bridge between AI assistants and your local EDA toolchain, enabling sophisticated hardware design workflows through natural language interaction.
  364. ## Cite
  365. ```bibtex
  366. @misc{wang2025mcp4edallmpoweredmodelcontext,
  367. title={MCP4EDA: LLM-Powered Model Context Protocol RTL-to-GDSII Automation with Backend Aware Synthesis Optimization},
  368. author={Yiting Wang and Wanghao Ye and Yexiao He and Yiran Chen and Gang Qu and Ang Li},
  369. year={2025},
  370. eprint={2507.19570},
  371. archivePrefix={arXiv},
  372. primaryClass={cs.AR},
  373. url={https://arxiv.org/abs/2507.19570},
  374. }
  375. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.