Skip to main content
Glama
zesun33
by zesun33

@zesun33/mcp-fpga

Model Context Protocol (MCP) server for FPGA synthesis, place-and-route, and bitstream programming (iCE40/ECP5).

License: Apache-2.0 CI Protocol: MCP Runtime: Rootless Podman

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. 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_program dry-runs by default and only reports the plan; set dry_run: false on a host with hardware attached. ECP5 flashing needs openFPGALoader, which is absent from the image — program ECP5 bitstreams externally.


⚡ Quick Tour: See It in Action

Real Agent Scenarios in 60 Seconds

1. Probing the Toolchain (Zero-Config Verification)

// Tool Call: fpga_toolchain_info
{
  "runtime": "podman",
  "image": "localhost/zesun33/fpga",
  "versions": {
    "yosys": "Yosys 0.38+92",
    "nextpnr-ice40": "present",
    "nextpnr-ecp5": "present",
    "icepack": "present",
    "ecppack": "present",
    "iceprog": "present",
    "openFPGALoader": "Not installed (ECP5 flashing needs external tooling)"
  }
}

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."]
}

Related MCP server: cg-agent-kit

Tools Exposed

Tool

Parameters

Engine

Description

fpga_synth

verilog_sources: string[], top_module: string, family?: "ice40" | "ecp5", cwd?: string

synth_ice40 / synth_ecp5

RTL to nextpnr JSON netlist with cell/wire counts.

fpga_place_route

json_netlist: string, top_module?: string, family?: "ice40" | "ecp5", board?: string, device?: string, package?: string, cwd?: string

nextpnr-ice40 / nextpnr-ecp5

P&R with utilization and Fmax from --report JSON. Explicit device/package wins over presets.

fpga_bitstream

input_file: string, compress?: boolean, cwd?: string

icepack / ecppack

Routed image to bitstream (.asc.bin, .config.bit).

fpga_program

bitstream_file: string, dry_run?: boolean, cwd?: string

iceprog

iCE40 flashing; dry-run default, honest HW errors otherwise.

fpga_boards

none

Static presets

Board → device/package/programmer table.

fpga_toolchain_info

none

Probe

Versions of the FPGA toolchain, including openFPGALoader absence.


Execution Runtime

mcp-fpga runs inside the zesun33/fpga rootless Podman image (localhost/zesun33/fpga):

  • Container mount: -v <workspace>:/workspace:Z -w /workspace

  • Podman storage option: --storage-opt overlay.ignore_chown_errors=true

To force host binaries instead of container execution:

export MCP_FPGA_RUNTIME=host

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 --quick

License

Apache-2.0 © 2026 Md Zesun Ahmed Mia

Available Tools

6 tools
fpga_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
compressNoPass --compress to ecppack (ECP5 only).
input_fileYesRouted image: .asc (iCE40) or .config (ECP5).

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It explains the conversion action and the optional flag, but does not mention output file behavior, side effects, or resource implications. This is partial transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the main purpose, and includes necessary technical details (icepack/ecppack, compress option) without any fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Provides enough context for a moderate-complexity tool: explains what it does, mentions the next step (fpga_program), and clarifies the optional compress flag. It does not specify output file naming, but this is not essential for the tool's use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds context about conversion tools and the ECP5-only compress option, but the schema already describes all parameters well. No significant additional parameter meaning is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('packs') and resource ('routed image to bitstream'), and differentiates from siblings by mentioning the exact tools (icepack, ecppack) and input/output formats. This clearly identifies the tool's role in the FPGA flow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly implies the tool is used after routing and before programming by saying 'Feed the result into fpga_program'. It also explains the optional --compress flag for ECP5. It does not explicitly state when not to use it relative to all siblings, but the workflow context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fpga_boardsA

Lists board presets (device, package, programmer) for place-and-route targeting. Use a preset name as fpga_place_route board input.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description says 'lists', which transparently indicates a read-only, non-destructive operation. Since no annotations are present, the description carries the burden, and 'lists' adequately conveys the behavior without requiring further side-effect disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with two short sentences that directly state purpose and usage. No unnecessary words or redundant details are included.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description gives enough context for a board-preset listing operation, including its role in place-and-route targeting. It does not describe output format, but the output is implied to be a list of presets, which is sufficient for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters in the schema, so there is nothing to explain. The empty schema is fully covered and the description does not need to add parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool lists board presets (device, package, programmer) and explicitly connects them to place-and-route targeting. The verb 'lists' and resource 'board presets' are specific and distinguish this from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use a preset as input to fpga_place_route, which gives practical guidance. It does not explicitly contrast with alternatives like fpga_synth or fpga_bitstream, but the purpose is clear enough for typical usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
boardNoBoard preset name (see fpga_boards).
deviceNoDevice size, e.g. up5k, hx8k, 25k, 45k.
familyNoFPGA family (default: from board preset, else ice40).
packageNoPackage, e.g. sg48, ct256, CABGA256.
top_moduleNoTop module name (for output naming).
json_netlistYesYosys JSON netlist (jsonNetlist from fpga_synth).

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes the main action and output, but does not disclose side effects (e.g., whether it writes files or produces a routed netlist) or error conditions. Since annotations are absent, this is a partial disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Few sentences, no fluff, directly states purpose, inputs, and output.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers inputs, output summary, and resolution logic. However, without an output schema, it does not fully describe the return value or any other outputs, and it omits prerequisites like prior synthesis.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All parameters are described in the schema, and the description adds context about the netlist origin (from fpga_synth) and the priority of explicit device/package over board preset.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it runs nextpnr place-and-route for iCE40/ECP5, from a Yosys JSON netlist, and describes the output (utilization and Fmax). It is distinct from synthesis, bitstream, and programming tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides guidance on device/package resolution and points to fpga_boards for presets. It does not explicitly say when to use vs alternatives, but the place-and-route role is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
dry_runNoReport the plan without touching hardware (default: true).
bitstream_fileYesBitstream file to flash.

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Even without annotations, the description transparently discloses that dry-run only reports the command, real flashing writes to hardware, and potential tool absence for ECP5. This reliably informs the agent of side effects and limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences deliver all essential information without fluff. The structure is front-loaded with the primary action, followed by caveats.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity, the description fully captures the necessary context: the hardware requirement, the default behavior, and a critical dependency for a different target. No critical missing information for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema already covers all parameters with descriptions (100% coverage), providing a baseline of 3. The description adds extra context by explaining the default value of dry_run and clarifying that the bitstream is for iCE40, going slightly beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the verb 'Flashes' and specific target 'iCE40 bitstream via iceprog', and also distinguishes from sibling tools by mentioning the alternative ECP5 path. The action and resource are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on default dry-run behavior, warns that real flashing requires hardware the host cannot verify, and alerts that ECP5 needs openFPGALoader which is absent. This gives clear when-to-use and expected behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory.
familyNoFPGA family (default: ice40).
top_moduleYesTop module name.
verilog_sourcesYesRTL source files.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses key behaviors: uses Yosys with synth_ice40/synth_ecp5, returns cell and wire counts, and outputs a JSON netlist for nextpnr. No side effects mentioned, and annotations are absent; still, it covers the essential operational behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences that front-load the primary purpose and include a flow pointer. Every word contributes to understanding the tool's role and output.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking an output schema, the description specifies the return value (cell and wire counts) and the destination of the netlist (fpga_place_route), making the tool's context complete for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for each parameter, so baseline is 3. The description does not add extra semantic meaning beyond the schema, such as explaining the relationship between family and synth commands.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool synthesizes RTL to a nextpnr-ready JSON netlist using Yosys, and distinguishes it as the first stage of the FPGA flow with a direct link to fpga_place_route.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly places the tool in the flow: 'First stage of the FPGA flow; feed jsonNetlist into fpga_place_route', providing clear guidance on when to use it relative to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fpga_toolchain_infoA

Returns active container/host runtime and versions of Yosys, nextpnr, icepack, ecppack, and iceprog.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the burden of disclosing behavioral traits. It states the tool 'returns' information, implying a read-only operation, but does not mention potential side effects, failure modes, or any environmental dependencies beyond vague 'active container/host'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that succinctly lists exactly what the tool returns. No unnecessary words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the primary output (versions of Yosys, nextpnr, icepack, ecppack, iceprog) and the context (active container/host runtime). It lacks detail on output format or what 'active' means, but for such a simple informational tool, this is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty, so there are no parameters to explain. The description adds no parameter-specific meaning, which is acceptable because none exist; the schema coverage is effectively 100%.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool returns active container/host runtime and versions of specific toolchain components. This distinguishes it from the sibling tools (synth, place_route, bitstream, program, boards) which perform actions rather than report environment information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives, nor does it mention any conditions or prerequisites. It only describes what it returns, leaving the caller to infer when it is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observedfpga_bitstream
    • First observedfpga_boards
    • First observedfpga_place_route
    • First observedfpga_program
    • First observedfpga_synth
    • First observedfpga_toolchain_info

TDQS

A4.2/5.0
Disambiguation5/5

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.

Naming Consistency5/5

All tools follow a consistent 'fpga_' prefix with descriptive verb/noun combinations. The pattern is uniform and predictable.

Tool Count5/5

Six tools cover the essential FPGA flow without redundancy or unnecessary additions. The count fits the domain scope well.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides 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.
    15
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables 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.
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables 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.
    4
    -

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/zesun33/mcp-fpga'

If you have feedback or need assistance with the MCP directory API, please join our Discord server