@zesun33/mcp-yosys
This MCP server gives MCP-capable AI agents and hardware engineers structured Yosys-based RTL synthesis, hierarchy inspection, latch triage, and toolchain probing.
Synthesize designs (
yosys_synthesize): map Verilog/SystemVerilog to generic gates, iCE40 FPGA, or Sky130 standard cells, returning structured cell counts plus warnings/errors, with optional hierarchy flattening and netlist output.Triage synthesis hazards (
yosys_check_latch): fast RTL elaboration to pinpoint inferred transparent latches, combinational loops, and multiple drivers with exact source line numbers.Inspect design hierarchy (
yosys_hierarchy): reveal the module instantiation tree and flag missing/unresolved blackboxes.Probe the environment (
yosys_toolchain_info): report the active container/host runtime and Yosys engine version before running a design.All tools accept
verilog_sources,top_module,cwd, andtimeout_msoverrides, and run via rootless Podman by default (host binaries viaMCP_YOSYS_RUNTIME=host).Schema vs README note: the schema exposes 4 tools, while the README also lists
yosys_equivandyosys_write_spice, and additional synthesis targets (xilinx,intel,nangate45) not present in the schema'stargetenum.
Provides RTL synthesis targeting Intel FPGA architectures, returning structured cell counts and warnings for designs mapped to Intel FPGAs.
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., "@@zesun33/mcp-yosys Synthesize counter.v with top module counter and show cell counts"
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.
@zesun33/mcp-yosys
Purpose and first steps
Inspect synthesis, hierarchy, and unintended latches before physical design through an MCP server.
Who it is for: Hardware engineers using an MCP-capable client or coding agent.
First task: Configure the server in your MCP client, then call yosys_toolchain_info before running a design.
What to expect: Tool availability, then synthesis statistics, hierarchy, and latch diagnostics.
Current scope: Published MCP server. The npx command starts a stdio server that waits for a client; EDA execution also needs its documented host/container tools.
Start here: Runtime requirements and configuration.
Related projects: mcp-verilog, mcp-openroad.
Model Context Protocol (MCP) server for open-source RTL synthesis, cell statistics, and latch triage via Yosys.
mcp-yosys equips AI coding agents and IDEs (Cursor, Windsurf, GitHub Copilot / OpenAI Codex, Claude Code, Google Antigravity, OpenCode, Cline) with structured tools to synthesize Verilog/SystemVerilog designs, inspect cell hierarchies, and triage synthesis hazards (such as unintended transparent latches and combinational loops) before committing code to ASIC or FPGA physical design flows.
Related MCP server: mcp-verilog
Install and run
Run this MCP server directly from npm:
npx -y @zesun33/mcp-yosysFor the complete hardware-agent setup, use npx -y @zesun33/create-hw-agent my-asic.
⚡ Quick Tour: See It in Action
The examples below illustrate tool requests and result fields. Timings, counts, and scores depend on the input and runtime; they are not guaranteed outcomes or fresh verification results.
Why AI Agents Need mcp-yosys
Without | With |
Dumps 500+ lines of techmap & ABC logs into context | Structured JSON with |
Inferred latches buried in intermediate RTLIL logs | Pinpointed latch alerts: |
Agent blindly guesses gate count and area footprint | Direct cell breakdown ( |
Unresolved blackboxes silently fail downstream P&R | Explicit |
Requires manual installation of Yosys, ABC, and libs | Zero host configuration (runs via isolated rootless Podman) |
Example tool requests and results
1. Probing the Environment (Zero-Config Verification)
// Tool Call: yosys_toolchain_info
{
"runtime": "podman",
"image": "ghcr.io/zesun33/asic",
"yosysVersion": "Yosys 0.38+92 (git sha1 84116c9a3)",
"availableTargets": ["generic", "ice40", "xilinx", "intel", "sky130", "nangate45"]
}2. Instant Latch Detection & Triage (130ms)
// Tool Call: yosys_check_latch {"verilog_sources": ["latch_demo.v"], "top_module": "latch_demo"}
{
"success": true,
"hasLatches": true,
"latches": [
{
"module": "latch_demo",
"variable": "q",
"line": 8,
"rawMessage": "Latch inferred for signal `\\latch_demo.\\q' from process `\\latch_demo.$proc$latch_demo.v:8$1'"
}
],
"hasCombinationalLoops": false,
"warnings": [
"Latch inferred for signal `\\latch_demo.\\q' from process `\\latch_demo.$proc$latch_demo.v:8$1': $auto$proc_dlatch.cc:433:proc_dlatch$15"
]
}3. Gate-Level Synthesis & Cell Accounting (220ms)
// Tool Call: yosys_synthesize {"verilog_sources": ["counter.v"], "top_module": "counter", "target": "generic"}
{
"success": true,
"topModule": "counter",
"target": "generic",
"cellCount": 10,
"cellsByType": {
"$_AND_": 2,
"$_DFFE_PN0P_": 4,
"$_NOT_": 1,
"$_XOR_": 3
},
"wireCount": 8,
"warnings": [],
"errors": []
}4. Design Hierarchy & Blackbox Inspection (140ms)
// Tool Call: yosys_hierarchy {"verilog_sources": ["hierarchy_demo.v"], "top_module": "alu_top"}
{
"success": true,
"topModule": "alu_top",
"modules": [
{ "name": "alu_top", "isTop": true, "submodules": ["adder", "sub"] },
{ "name": "adder", "isTop": false, "submodules": [] },
{ "name": "sub", "isTop": false, "submodules": [] }
],
"missingModules": []
}Tools Exposed
Tool | Parameters | Engine | Description |
|
|
| Synthesizes RTL design to generic gates, iCE40/Xilinx/Intel FPGAs, Nangate45 standard cells, or Sky130 ( |
|
| PDK models + netlist parser | Converts a synthesized gate-level netlist to a hierarchical SPICE schematic for Netgen LVS: |
|
|
| Fast RTL elaboration pass to detect inferred transparent latches, combinational loops, and multiple drivers with source line numbers. |
|
|
| Proves combinational equivalence (EQUIVALENT / NOT_EQUIVALENT / INCONCLUSIVE; sequential and latch designs report INCONCLUSIVE, never a false pass). |
|
|
| Analyzes module instantiation tree and verifies that no submodules or blackboxes are missing. |
| none | Probe | Returns active container/host runtime and Yosys synthesis engine version. |
Execution Runtime
mcp-yosys runs inside the zesun33/asic rootless Podman image so tools are identical on any Linux host.
Public install (recommended — anyone can pull):
podman pull ghcr.io/zesun33/asic:latest
export MCP_YOSYS_IMAGE=ghcr.io/zesun33/asicghcr.io/zesun33/asic is the default (anyone can pull). Local builds still work as localhost/zesun33/asic via MCP_YOSYS_IMAGE.
Container mount:
-v <workspace>:/workspace:Z -w /workspacePodman storage option:
--storage-opt overlay.ignore_chown_errors=true
To force host binaries instead of container execution:
export MCP_YOSYS_RUNTIME=hostOther useful overrides:
export MCP_YOSYS_IMAGE=ghcr.io/zesun33/fpga # FPGA image instead of ASICUniversal Client & AI IDE Setup
Because mcp-yosys implements the standard Model Context Protocol (MCP), it connects seamlessly to any MCP-compliant AI IDE or agent interface:
Environment | Supported Tools | Setup Location |
AI IDEs | Cursor, Windsurf, Google Antigravity, Zed |
|
Extensions | GitHub Copilot / OpenAI Codex, Cline, Roo Code | VS Code MCP extension settings |
CLI Agents | Claude Code, OpenCode, Goose, Antigravity CLI ( | Global MCP configuration or CLI flags |
Desktop | Claude Desktop |
|
1. Cursor / Windsurf / Antigravity IDE
Add to your project's .cursor/mcp.json or .windsurf/mcp.json:
{
"mcpServers": {
"yosys": {
"command": "node",
"args": ["/path/to/personal-projects/mcp-yosys/dist/index.js"]
}
}
}2. VS Code (GitHub Copilot / OpenAI Codex / Cline)
Add to your VS Code MCP settings or user configuration:
{
"mcpServers": {
"yosys": {
"command": "node",
"args": ["/path/to/personal-projects/mcp-yosys/dist/index.js"]
}
}
}3. Claude Desktop & Claude Code
Add to claude_desktop_config.json:
{
"mcpServers": {
"yosys": {
"command": "node",
"args": ["/path/to/personal-projects/mcp-yosys/dist/index.js"]
}
}
}Verification & Testing
Run the full 6-gate verification suite:
# Full verification (with Podman container execution)
./scripts/verify.sh
# Fast / CI verification (headless environments)
./scripts/verify.sh --quickRun specific test tiers:
npm run test:unit # Fast unit tests (parsers & contract)
npm test # Full test suite (including live container synthesis)npm releases
See RELEASING.md for GitHub Actions dry runs and trusted publishing.
Available Tools
4 toolsyosys_check_latchA
Performs fast RTL elaboration and latch checking to identify inferred transparent latches, combinational loops, and multiple drivers with exact source lines.
Inputs: top_module (required), verilog_sources (required), cwd, timeout_ms.
yosys_hierarchyA
Inspects module hierarchy, detecting instantiated submodules and flagging missing/unresolved blackboxes.
Inputs: top_module (required), verilog_sources (required), cwd, timeout_ms.
yosys_synthesizeA
Synthesizes a Verilog/SystemVerilog design using Yosys, mapping to generic gates, iCE40 FPGA, or Sky130 standard cells, and returns structured cell counts and warnings.
Inputs: top_module (required), verilog_sources (required), cwd, target, +3 more.
yosys_toolchain_infoA
Returns active container/host runtime and version information for the Yosys synthesis engine.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct concern: synthesis, latch/loop checking, hierarchy inspection, and toolchain information. There is no meaningful overlap in purpose or output, so an agent can select the right tool without ambiguity.
All tool names share the clear yosys_ prefix and use snake_case, making them predictable. Minor inconsistency exists because some names are verbs (yosys_synthesize), some are verb+noun (yosys_check_latch), and some are nouns (yosys_hierarchy, yosys_toolchain_info), but the pattern is still readable.
Four tools is a well-scoped set for a focused Yosys server. Each tool provides a distinct capability without unnecessary bloat or duplication.
The tool set covers the core Yosys workflow: synthesis, latch checking, hierarchy analysis, and environment info. There are minor gaps such as no explicit netlist export or arbitrary Yosys pass execution, but these are not critical for the apparent purpose.
Maintenance
Related MCP Connectors
A public board where AI agents design pieces of an open AI inference accelerator on sky130. Submit Verilog and it is linted, synthesised, simulated against hidden vectors, mapped to real standard cells for area, timed for critical path and power, and proven equivalent to a reference. No key, no account, one call. The best verified design gets fabricated.
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables AI assistants to perform Electronic Design Automation (EDA) tasks including Verilog synthesis, simulation, ASIC design flows, and waveform analysis through a unified interface.6ISC
- AlicenseAqualityCmaintenanceEnables AI coding agents and IDEs to lint, compile, syntax-check, and simulate Verilog/SystemVerilog designs through structured, token-efficient MCP tools with isolated containerized toolchains.417 npmApache 2.0
- AlicenseAqualityBmaintenanceEnables AI coding agents and IDEs to perform AST-backed semantic Verilog/SystemVerilog code reviews, catching race conditions, reset polarity mismatches, and bitwidth truncations while computing a 0–100 RTL quality score.410 npm1Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI coding agents and IDEs to execute ASIC physical design flows including floorplanning, placement, clock tree synthesis, routing, and static timing analysis through the OpenROAD engine, returning concise low-token JSON metrics.610 npmApache 2.0