mcp-fpga
This MCP server exposes tools to synthesize, place-and-route, pack, and program iCE40/ECP5 FPGA designs, plus probe the toolchain and list board presets.
Probe the active runtime and installed FPGA toolchain versions (
fpga_toolchain_info).List board presets with device, package, and programmer (
fpga_boards).Synthesize Verilog/RTL to a nextpnr-ready JSON netlist and return cell/wire counts (
fpga_synth).Run place-and-route for iCE40/ECP5 using a JSON netlist and explicit device/package or board preset, returning utilization and Fmax (
fpga_place_route).Pack routed images into bitstreams:
.ascto.binfor iCE40 via icepack,.configto.bitfor ECP5 via ecppack with optional compression (fpga_bitstream).Program bitstreams with dry-run default for safety; real flashing targets attached hardware using iceprog for iCE40 and openFPGALoader for ECP5 where available (
fpga_program).
Provides FPGA synthesis, place-and-route, bitstream generation, and programming capabilities to Windsurf (Codeium).
Provides FPGA synthesis, place-and-route, bitstream generation, and programming capabilities to GitHub Copilot.
Provides FPGA synthesis, place-and-route, bitstream generation, and programming capabilities to Google Antigravity.
Provides FPGA synthesis, place-and-route, bitstream generation, and programming capabilities to OpenAI Codex.
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-fpga Synthesize and place-and-route blink.v for the iCEBreaker board, then generate the bitstream."
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-fpga
Purpose and first steps
Synthesize and route FPGA designs and prepare bitstreams 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 fpga_toolchain_info before running a design.
What to expect: Tool availability, then synthesis/place-and-route metrics and bitstream artifacts.
Current scope: Published MCP server for iCE40/ECP5 flows. Programming defaults to a dry run and requires an attached board for an actual hardware check. The npx command waits for an MCP client.
Start here: Runtime requirements and configuration.
Related projects: mcp-yosys, mcp-verilog.
Model Context Protocol (MCP) server for FPGA synthesis, place-and-route, and bitstream programming (iCE40/ECP5).
mcp-fpga gives AI coding agents and IDEs (Cursor, Windsurf, GitHub Copilot / OpenAI Codex, Claude Code, Google Antigravity, OpenCode, Cline) a complete open-source FPGA flow: Yosys synthesis to nextpnr JSON, nextpnr place-and-route with utilization/Fmax reports, bitstream packing (icepack/ecppack), and hardware programming via iceprog (iCE40) or openFPGALoader (ECP5). Board presets (iCEBreaker, HX8K, ULX3S-class, generic ECP5) resolve device/package details.
Hardware honesty: bitstream flashing needs a board on USB, which CI hosts cannot verify.
fpga_programdry-runs by default and only reports the plan; setdry_run: falseon a host with hardware attached. ECP5.bitfiles use openFPGALoader in the FPGA image.
Related MCP server: fpga-mcp
Install and run
Run this MCP server directly from npm:
npx -y @zesun33/mcp-fpgaFor 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.
Example tool requests and results
1. Probing the Toolchain (Zero-Config Verification)
// Tool Call: fpga_toolchain_info
{
"runtime": "podman",
"image": "ghcr.io/zesun33/fpga",
"versions": {
"yosys": "Yosys 0.38+92",
"nextpnr-ice40": "present",
"nextpnr-ecp5": "present",
"icepack": "present",
"ecppack": "present",
"iceprog": "present",
"openFPGALoader": "present"
}
}2. Listing Board Presets
// Tool Call: fpga_boards
{
"boards": [
{ "board": "icebreaker", "family": "ice40", "device": "up5k", "package": "sg48", "programmer": "iceprog" },
{ "board": "hx8k", "family": "ice40", "device": "hx8k", "package": "ct256", "programmer": "iceprog" }
]
}3. iCEBreaker Flow: Synth, Place-and-Route, Bitstream
// Tool Call: fpga_synth {"verilog_sources": ["blink.v"], "top_module": "blink", "family": "ice40"}
// -> { "success": true, "jsonNetlist": "blink_ice40.json", "cellCount": 30 }
// Tool Call: fpga_place_route {"json_netlist": "blink_ice40.json", "top_module": "blink", "board": "icebreaker"}
// -> { "success": true, "device": "up5k", "utilization": { "ICESTORM_LC": { "used": 28 } }, "fmax": { "clk": { "achievedMhz": 194.3 } } }
// Tool Call: fpga_bitstream {"input_file": "blink_up5k.asc"}
// -> { "success": true, "bitstreamFile": "blink_up5k.bin", "bytes": 135100 }4. Safe Programming Default (Dry Run)
// Tool Call: fpga_program {"bitstream_file": "blink_up5k.bin"}
{
"success": true,
"programmer": "iceprog",
"flashed": false,
"warnings": ["Dry run only: no hardware touched. Set dry_run=false on a host with the board attached."]
}Tools Exposed
Tool | Parameters | Engine | Description |
|
|
| RTL to nextpnr JSON netlist with cell/wire counts. |
|
|
| P&R with utilization and Fmax from |
|
|
| Routed image to bitstream ( |
|
|
| iCE40 |
| none | Static presets | Board → device/package/programmer table. |
| none | Probe | Versions of the FPGA toolchain, including openFPGALoader. |
Execution Runtime
mcp-fpga runs inside the zesun33/fpga rootless Podman image so tools are identical on any Linux host.
Public install (recommended — anyone can pull):
podman pull ghcr.io/zesun33/fpga:latest
export MCP_FPGA_IMAGE=ghcr.io/zesun33/fpgaghcr.io/zesun33/fpga is the default (anyone can pull). Local builds still work as localhost/zesun33/fpga via MCP_FPGA_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_FPGA_RUNTIME=hostTargets iCE40 / ECP5 toolchains shipped in zesun33/fpga.
Universal Client & AI IDE Setup
Because mcp-fpga implements the standard Model Context Protocol (MCP), it connects seamlessly to any MCP-compliant AI IDE or agent interface:
{
"mcpServers": {
"fpga": {
"command": "node",
"args": ["/path/to/mcp-fpga/dist/index.js"]
}
}
}Cursor: Configure in
.cursor/mcp.json.Windsurf: Configure in
~/.codeium/windsurf/mcp_config.json.GitHub Copilot / OpenAI Codex: Configure via Copilot MCP settings or Codex tool proxy.
Claude Code: Configure via
claude mcp add fpga node /path/to/dist/index.js.Google Antigravity: Load as workspace MCP server in
antigravity.json.OpenCode & Cline: Direct stdio JSON-RPC connection.
Verification & Testing
Run the full 6-gate verification suite:
# Full verification (with Podman FPGA synthesis and P&R)
./scripts/verify.sh
# Fast / CI verification (headless environments)
./scripts/verify.sh --quickLicense
Apache-2.0 © 2026 Md Zesun Ahmed Mia
npm releases
See RELEASING.md for GitHub Actions dry runs and trusted publishing.
Available Tools
6 toolsfpga_bitstreamA
Packs a routed image to a bitstream: icepack (.asc to .bin) for iCE40, ecppack (optionally --compress) for ECP5. Feed the result into fpga_program.
Inputs: input_file (required), cwd, compress.
fpga_boardsA
Lists board presets (device, package, programmer) for place-and-route targeting. Use a preset name as fpga_place_route board input.
Inputs: no named parameters.
fpga_place_routeA
Runs nextpnr place-and-route for iCE40/ECP5 from a Yosys JSON netlist. Device and package resolve from an explicit pair or a board preset (explicit wins). Returns utilization and Fmax from the JSON report. Use fpga_boards to list presets.
Inputs: json_netlist (required), cwd, board, device, +3 more.
fpga_programA
Flashes an iCE40 bitstream via iceprog. Dry-run (default) only reports the planned command: real flashing needs board hardware this host cannot verify. ECP5 needs openFPGALoader, which is absent from the image.
Inputs: bitstream_file (required), cwd, dry_run.
fpga_synthA
Synthesizes RTL to a nextpnr-ready JSON netlist with Yosys (synth_ice40/synth_ecp5), returning cell and wire counts. First stage of the FPGA flow; feed jsonNetlist into fpga_place_route.
Inputs: top_module (required), verilog_sources (required), cwd, family.
fpga_toolchain_infoA
Returns active container/host runtime and versions of Yosys, nextpnr, icepack, ecppack, and iceprog.
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 6 tools
Each tool has a unique, clearly defined role in the FPGA workflow (synthesis, place-and-route, bitstream, programming, board listing, toolchain info). No overlap or ambiguity.
All tools follow a consistent 'fpga_' prefix with descriptive verb/noun combinations. The pattern is uniform and predictable.
Six tools cover the essential FPGA flow without redundancy or unnecessary additions. The count fits the domain scope well.
The tool set covers the core synthesis-to-programming pipeline and auxiliary info/board queries. Slightly missing advanced features like device status or configuration readback, but the main workflow is fully supported.
Maintenance
Related MCP Connectors
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
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.
Run, build, and validate firmware on virtual hardware from your AI agent. Hardware knowledge corpus.
AI-native programming language and toolchain for accountable, verifiable agent-driven development.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides AI assistants with a complete FPGA toolchain for HDL linting, simulation, synthesis, and place-and-route across various hardware targets. It features a GitHub-backed IP core registry that enables users to search for and import MIT-licensed cores directly through their chat interface.151MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to drive Xilinx Vivado, Intel Quartus, and Anlogic TangDynasty for FPGA development, including project creation, synthesis, implementation, timing closure, and hardware programming through natural language.31 PyPI8MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents such as Claude Code, Cursor, and Codex to drive a locally installed Xilinx Vivado across the full FPGA flow, from GUI, headless Tcl, or attached sessions through synthesis, implementation, timing and CDC analysis, waveform queries, and device programming. It exposes 32 curated tools plus evidence-driven workflow prompts that return structured timing/IO reports, Chinese-language CRITICAL WARNING diagnostics, and guarded bitstream generation.-
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to safely drive a locally installed Xilinx Vivado FPGA flow, covering session control, synthesis, implementation, timing and CDC analysis, XDC constraints, IP inspection, waveform queries, and device programming with structured, evidence-based diagnostics.-