firmforge
FirmForge
FirmForge ist eine MCP-basierte Firmware-Verifizierungs-Toolchain für die MCU-Entwicklung mit KI-Codierungsagenten. Sie bietet eine fünfstufige Hardware-Pipeline — Detect, Review, Build, Flash, Verify — und stellt die Stufen den Agenten als MCP-Tools zur Verfügung (ff_detect, ff_context, ff_build, ff_run, ff_flash, ff_monitor).
Die Toolchain kompiliert Firmware mit einem echten Compiler (avr-gcc / ArduinoCore-avr), programmiert das Ziel mit avrdude und verifiziert das Ergebnis über serielles Auslesen. Die Codegenerierung liegt außerhalb des Anwendungsbereichs.
Pipeline
Stufe | Beschreibung | Fehlerbehandlung |
S1 Detect | Board-Identifizierung über avrdude-Chip-Signatur-Sonde; USB-VID/PID- und Workspace-Inferenz als Fallback | Blockierend |
S2 Review | Statische Analyse: cppcheck, Register-/Bitfeld-Validierung gegen die Chip-Wissensbasis, Konfidenzbewertung | Nicht blockierend |
S3 Build | Kompilierung zu firmware.hex: Bare-Register-C (avr-gcc, | Blockierend |
S4 Flash | avrdude-Programmierung (ATmega2560 verwendet | Blockierend |
S5 Verify | Serielles Auslesen mit Musterabgleich; Live-Browser-Panel | Nicht blockierend |
Related MCP server: agentic-hil
Unterstützte Zielsysteme
Board | MCU | Notizen |
| ATmega2560 | 202 Register in der Wissensbasis (inkl. GCC-Aliase) |
| ATmega328P (UNO/Nano) | 91 Register in der Wissensbasis |
Benutzerdefinierte Boards werden über --boards-dir unterstützt.
Installation
Anforderungen: Python ≥ 3.10. Hardware ist nur für die Flash- und Verify-Stufen erforderlich.
pip install git+https://github.com/NotchStone/firmforge.git
ff setupff setup lädt avr-gcc, avrdude, cppcheck und ArduinoCore-avr herunter und installiert sie in ~/.firmforge/. Ein erneutes Ausführen ist idempotent.
Für MCP-Unterstützung (Agentenintegration):
pip install "firmforge[mcp] @ git+https://github.com/NotchStone/firmforge.git"Stabile Wheels sind den GitHub Releases beigefügt.
Ein China-Mirror ist auf Gitee verfügbar: siehe README_CN.md (中文).
Verwendung
# 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
Registrieren Sie den Server bei Ihrem Agenten (CodeBuddy, Cursor, Claude Desktop, ...):
{
"mcpServers": {
"firmforge": {
"command": "python",
"args": ["-m", "firmforge.adapters.mcp_server"],
"cwd": "/path/to/your/firmware/project"
}
}
}Agenten-Workflow: Fragen Sie ff_context nach Register-/Pin-Referenzen ab, bevor Sie Firmware schreiben, und verwenden Sie dann ff_run zum Kompilieren, Flashen und Verifizieren. Gebündelte Daten (Board-Definitionen, Chip-Wissen, Toolchain-Manifeste) werden aus dem Paket heraus aufgelöst; der Server läuft aus jedem Arbeitsverzeichnis.
Entwicklung
pip install -e .[test,mcp]
pytestLizenz
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 gradedqualityBmaintenanceMCP 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.19MIT
- 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.44943 PyPI37Apache 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.1937 PyPI12MIT
- AlicenseAqualityCmaintenanceAn 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.98MIT