firmforge
Provides a complete firmware verification toolchain for Arduino boards (ATmega2560 and ATmega328P), enabling board detection, static analysis, compilation with avr-gcc/ArduinoCore-avr, flashing via avrdude, and serial verification of firmware output.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
FirmForge
English · 中文(README_CN.md)
FirmForge is an MCP-based firmware verification toolchain for MCU development with AI coding agents. It provides a five-stage hardware pipeline — Detect, Review, Build, Flash, Verify — and exposes the stages to agents as MCP tools (ff_detect, ff_context, ff_build, ff_run, ff_flash, ff_monitor).
The toolchain compiles firmware with a real compiler (avr-gcc for AVR, arm-none-eabi-gcc + CMSIS for STM32), programs the target with avrdude (AVR) or OpenOCD over SWD (STM32), and verifies the result via serial readback. Code generation is out of scope.
Pipeline
Stage | Description | Failure handling |
S1 Detect | Board identification via avrdude chip-signature probe; USB VID/PID and workspace inference as fallbacks | Blocking |
S2 Review | Static analysis: cppcheck, register/bitfield validation against the chip knowledge base, confidence scoring | Non-blocking |
S3 Build | Compile to firmware.hex: bare-register C (avr-gcc, | Blocking |
S4 Flash | avrdude programming (ATmega2560 uses | Blocking |
S5 Verify | Serial readback and a three-state verdict: | Blocking on no data / assertion mismatch |
FirmForge reports what came back and whether your assertion matched. It does not judge whether the output means the feature works — that belongs to the caller (agent or human), so pass --expected to make S5 verifiable.
Related MCP server: agentic-hil
Supported Targets
Board | MCU | Notes |
| ATmega2560 | 202 registers in knowledge base (incl. GCC aliases) |
| ATmega328P (UNO/Nano) | 91 registers in knowledge base |
| STM32H743ZIT6 | SWD via CMSIS-DAP; serial readback through the board's CH340N |
Custom boards are supported via --boards-dir.
Installation
Requirements: Python ≥ 3.10. Hardware is required only for the Flash and Verify stages.
pip install git+https://github.com/NotchStone/firmforge.git
ff setupff setup downloads and installs avr-gcc, avrdude, cppcheck, and ArduinoCore-avr to ~/.firmforge/. Re-running is idempotent.
For MCP support (agent integration):
pip install "firmforge[mcp] @ git+https://github.com/NotchStone/firmforge.git"Stable wheels are attached to GitHub Releases.
A China mirror is available on Gitee: see README_CN.md (中文).
Usage
# Detect connected board
ff detect
# Review + compile only (no hardware required)
ff build arduino_mega --app path/to/source
# Full pipeline on hardware
ff run arduino_mega --app path/to/source --expected "Hello World"
# Flash a pre-built hex
ff flash arduino_mega --firmware firmware.hexMCP Server
Register the server with your agent (CodeBuddy, Cursor, Claude Desktop, ...):
{
"mcpServers": {
"firmforge": {
"command": "python",
"args": ["-m", "firmforge.adapters.mcp_server"],
"cwd": "/path/to/your/firmware/project"
}
}
}Agent workflow: query ff_context for register/pin references before writing firmware, then ff_run to compile, flash, and verify. Bundled data (board definitions, chip knowledge, toolchain manifests) is resolved from inside the package; the server runs from any working directory.
Development
pip install -e .[test,mcp]
pytestLicense
MIT © FirmForge Contributors
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for simulating firmware on virtual microcontroller instances, allowing AI agents to upload, run, and read UART output from supported boards such as STM32 and Nordic.18MIT
- AlicenseAqualityBmaintenanceAgentic Hardware-in-the-Loop (Agentic HIL) lets coding agents develop firmware on real embedded boards: flash, reset, read UART and exchange CAN traffic, diagnose and fix. Local, policy-gated MCP tools support OpenOCD, pyOCD and STM32CubeProgrammer, with pytest for CI.44972 PyPI26Apache 2.0
- AlicenseCqualityCmaintenanceMCP server for AI-assisted MCU and embedded firmware debugging. It connects to real hardware via debug probes, inspects CPU/memory/peripherals, manages Keil builds, and provides structured evidence for fault diagnosis.1957 PyPI10MIT
- AlicenseAqualityBmaintenanceAn MCP server that enables AI agents to inspect, plan, validate, and apply STM32CubeMX .ioc configuration changes, and generate STM32CubeIDE projects, ensuring safe and testable embedded-system workflows.97MIT