firmforge
FirmForge
FirmForge — это инструментальная цепочка проверки прошивки на основе MCP для разработки MCU с AI-агентами кодирования. Она предоставляет пятиэтапный аппаратный конвейер — Detect, Review, Build, Flash, Verify — и предоставляет этапы агентам в виде MCP-инструментов (ff_detect, ff_context, ff_build, ff_run, ff_flash, ff_monitor).
Инструментальная цепочка компилирует прошивку с помощью реального компилятора (avr-gcc / ArduinoCore-avr), программирует целевое устройство с помощью avrdude и проверяет результат через последовательное чтение. Генерация кода не входит в область применения.
Конвейер
Этап | Описание | Обработка сбоев |
S1 Detect | Определение платы через зонд сигнатуры чипа avrdude; резервные выводы — USB VID/PID и рабочая директория | Блокирующий |
S2 Review | Статический анализ: cppcheck, проверка регистров/битовых полей по базе знаний чипа, оценка уверенности | Неблокирующий |
S3 Build | Компиляция в firmware.hex: голый регистровый C (avr-gcc, | Блокирующий |
S4 Flash | Программирование через avrdude (ATmega2560 использует | Блокирующий |
S5 Verify | Последовательное чтение с сопоставлением шаблонов; живая панель в браузере | Неблокрующий |
Related MCP server: agentic-hil
Поддерживаемые целевые устройства
Плата | MCU | Примечания |
| ATmega2560 | 202 регистра в базе знаний (включая алиасы GCC) |
| ATmega328P (UNO/Nano) | 91 регистр в базе знаний |
Пользовательские платы поддерживаются через --boards-dir.
Установка
Требования: Python ≥ 3.10. Оборудование требуется только для этапов Flash и Verify.
pip install git+https://github.com/NotchStone/firmforge.git
ff setupff setup загружает и устанавливает avr-gcc, avrdude, cppcheck и ArduinoCore-avr в ~/.firmforge/. Повторный запуск идемпотентен.
Для поддержки MCP (интеграция с агентами):
pip install "firmforge[mcp] @ git+https://github.com/NotchStone/firmforge.git"Стабильные сборки прикреплены к GitHub Releases.
Зеркало для Китая доступно на Gitee: см. README_CN.md (中文).
Использование
# 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-сервер
Зарегистрируйте сервер в вашем агенте (CodeBuddy, Cursor, Claude Desktop, ...):
{
"mcpServers": {
"firmforge": {
"command": "python",
"args": ["-m", "firmforge.adapters.mcp_server"],
"cwd": "/path/to/your/firmware/project"
}
}
}Рабочий процесс агента: запросите ff_context для ссылок на регистры/пины перед написанием прошивки, затем ff_run для компиляции, прошивки и проверки. Встроенные данные (определения плат, знания о чипах, манифесты инструментов) разрешаются изнутри пакета; сервер работает из любой рабочей директории.
Разработка
pip install -e .[test,mcp]
pytestЛицензия
MIT © Участники FirmForge
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