mcp-verilog
Lint, compile, simulate, and inspect toolchain for Verilog/SystemVerilog designs via MCP.
Lint Verilog/SystemVerilog files using
verible-verilog-lintwith structured line/column/severity/rule diagnostics.Compile for syntax and elaboration checking using
iverilogorverilatorwithout full simulation.Simulate testbenches with
iverilog+vvp, capturing$fatalassertions, errors, and timeout protection.Get toolchain info on active runtime and versions of
iverilog,verilator,verible, andsv2v.
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., "@mcp-verilog Lint counter.v and report any syntax errors."
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-verilog
Purpose and first steps
Lint, compile, and simulate Verilog/SystemVerilog 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 verilog_toolchain_info before running a design.
What to expect: Compiler/simulator availability, followed by diagnostics and testbench outcomes.
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-rtl-review, mcp-cocotb, eda-docker-images.
Model Context Protocol (MCP) server for Verilog and SystemVerilog hardware development.
mcp-verilog provides structured, token-efficient tool APIs so AI coding agents and IDEs (Cursor, Windsurf, GitHub Copilot / OpenAI Codex, Claude Code, Google Antigravity, OpenCode, Cline) can lint, syntax-check, and simulate Verilog designs in closed-loop workflows without blowing context windows on unstructured compiler output.
Related MCP server: waveform-mcp
Install and run
Run this MCP server directly from npm:
npx -y @zesun33/mcp-verilogFor 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-verilog
Without | With |
Dumps 5,000 lines of raw compiler output into context | Returns |
Agent hallucinates line numbers and syntax bugs | Direct file/line jump: |
Broken | Timeout kill-switch ( |
Requires manual host install of 5+ C++ EDA packages | Zero host install (isolated rootless Podman) |
Example tool requests and results
1. Probing the Toolchain (Zero-Config Verification)
// Tool Call: verilog_toolchain_info
{
"runtime": "podman",
"tools": [
{ "name": "iverilog", "available": true, "version": "Icarus Verilog version 12.0 (stable)" },
{ "name": "verilator", "available": true, "version": "Verilator 5.020" },
{ "name": "verible-verilog-lint", "available": true, "version": "v0.0-4080-ga0a8d8eb" },
{ "name": "sv2v", "available": true, "version": "v0.0.13" }
]
}2. Pinpoint Syntax Diagnostics (1-Shot Repair)
// Tool Call: verilog_lint {"files": ["syntax_error.v"]}
{
"success": false,
"diagnostics": [
{ "file": "syntax_error.v", "line": 9, "severity": "error", "message": "syntax error at token 'end'" }
]
}3. Closed-Loop Testbench Simulation (318ms)
// Tool Call: verilog_simulate {"files": ["counter.v", "counter_tb.v"], "top_module": "counter_tb"}
{
"success": true,
"exitCode": 0,
"stdout": "PASS: Counter testbench completed successfully with count=5\n"
}4. Instant Assertion Triage (Catches Failures Safely)
// Tool Call: verilog_simulate {"files": ["failing_tb.v"], "top_module": "failing_tb"}
{
"success": false,
"exitCode": 1,
"errors": ["FATAL: failing_tb.v:11: SIMULATION_ASSERTION_FAILED: Test intentional failure."]
}5. Waveform Summary Without a GUI (Token-Capped Toggles)
// Tool Call: verilog_wave_summary {"vcd_file": "waves.vcd"}
{
"success": true,
"timescale": "1ps",
"signalCount": 12,
"signals": [
{ "name": "wave_demo_tb.clk", "width": 1, "transitions": 28, "toggled": true }
]
}6. Line Coverage via Verilator (Honest Uncovered Lines)
// Tool Call: verilog_coverage {"files": ["counter.v", "wave_demo_tb.v"], "top_module": "wave_demo_tb"}
{
"success": true,
"linesTotal": 24,
"linesCovered": 21,
"coveragePct": 87.5
}7. Testbench Skeleton in One Call (1-Shot Harness)
// Tool Call: verilog_generate_tb {"files": ["counter.v"], "top_module": "counter"}
{
"success": true,
"testbenchModule": "counter_tb",
"clockPort": "clk",
"resetPort": "rst"
}Tools Exposed
Tool | Parameters | Engine | Description |
|
|
| Analyzes code style and syntax, returning structured line, column, severity, and rule diagnostics. |
|
|
| Elaboration and syntax checking without running a full simulation. |
|
|
| Compiles and executes a behavioral testbench, capturing runtime |
|
| VCD parser | Summarizes a VCD file as per-signal toggle counts, time range, and timescale (no GUI needed). |
|
|
| Builds the |
|
| Port parser | Generates a clock/reset harness testbench skeleton with DUT instantiation, VCD dump, and a TODO for assertions. |
| none | Probe | Returns the active runtime ( |
Execution Runtime
mcp-verilog runs inside the zesun33/verilog rootless Podman image so tools are identical on any Linux host.
Public install (recommended — anyone can pull):
podman pull ghcr.io/zesun33/verilog:latest
export MCP_VERILOG_IMAGE=ghcr.io/zesun33/verilogghcr.io/zesun33/verilog is the default (anyone can pull). Local builds still work as localhost/zesun33/verilog via MCP_VERILOG_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_VERILOG_RUNTIME=hostUniversal Client & AI IDE Setup
Because mcp-verilog 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": {
"verilog": {
"command": "node",
"args": ["/path/to/personal-projects/mcp-verilog/dist/index.js"]
}
}
}2. VS Code (GitHub Copilot / OpenAI Codex / Cline)
Add to your VS Code MCP settings or user settings:
{
"mcpServers": {
"verilog": {
"command": "node",
"args": ["/path/to/personal-projects/mcp-verilog/dist/index.js"]
}
}
}3. Claude Desktop & Claude Code
Add to claude_desktop_config.json:
{
"mcpServers": {
"verilog": {
"command": "node",
"args": ["/path/to/personal-projects/mcp-verilog/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 # Unit tests (regex parsers & contract)
npm test # All tests (including Podman integration)npm releases
See RELEASING.md for GitHub Actions dry runs and trusted publishing.
Available Tools
4 toolsverilog_compileA
Performs syntax validation and elaboration checking on Verilog files using iverilog or verilator without running full simulation.
Inputs: files (required), cwd, compiler, top_module.
verilog_lintA
Lints Verilog / SystemVerilog source files using verible-verilog-lint and returns structured line, column, severity, and rule diagnostics.
Inputs: files (required), cwd, ruleset.
verilog_simulateA
Compiles and runs a behavioral testbench simulation using iverilog + vvp. Captures runtime assertions ($fatal), testbench errors, and protects against infinite loops with a timeout.
Inputs: files (required), cwd, dump_waves, timeout_ms, +1 more.
verilog_toolchain_infoA
Returns active container or host execution runtime info and versions of iverilog, verilator, verible, and sv2v.
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 stage of Verilog development: lint rules, compile/elaboration, simulation execution, and environment/version introspection. There is no meaningful overlap between these purposes.
All tools share the verilog_ prefix and use lowercase snake_case, making them easy to group. The first three are clearly verb-style actions, while verilog_toolchain_info is noun-style, a minor deviation from a strict verb_noun pattern.
Four tools is a well-scoped size for a Verilog toolchain server. Each tool covers a significant, non-redundant capability without bloating the API.
Lint, compile, simulate, and toolchain info cover the core hardware verification workflow well. A formatter such as verible-verilog-format or waveform/coverage retrieval would round out the surface, but agents can work around those gaps.
Maintenance
Related MCP Connectors
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
Secure Linux sandboxes for AI agents, as MCP tools.
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Run, build, and validate firmware on virtual hardware from your AI agent. Hardware knowledge corpus.
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
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to parse and query VCD/FSDB simulation waveforms, search signals, analyze AXI transactions, render ASCII timing diagrams, and check protocol compliance through structured MCP tools.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents such as Claude Code, Cursor, and Codex to safely drive a locally installed Xilinx Vivado through 32 MCP tools spanning sessions, synthesis, implementation, timing and CDC analysis, XDC checks, IP inspection, offline waveform queries, and device programming, backed by evidence-driven workflow prompts and structured Chinese diagnostics.-
- AlicenseNot gradedqualityBmaintenanceGives coding agents structured access to an EDA toolchain so they can lint, simulate, formally verify, synthesize, place and route, program a board and read its UART. Returns parsed results (errors with file and line, timing per clock, utilization, inferred memories, counterexample traces) instead of raw logs, closing the run-simulate-fix loop without copy-paste.35 PyPI13AGPL 3.0