firmforge
FirmForge
FirmForge 是一个基于 MCP 的固件验证工具链,用于配合 AI 编码代理进行 MCU 开发。它提供五阶段硬件流水线——检测(Detect)、审查(Review)、构建(Build)、烧录(Flash)、验证(Verify)——并将这些阶段以 MCP 工具的形式暴露给代理(ff_detect、ff_context、ff_build、ff_run、ff_flash、ff_monitor)。
该工具链使用真实编译器(avr-gcc / ArduinoCore-avr)编译固件,使用 avrdude 对目标设备进行编程,并通过串口回读验证结果。代码生成不在其范围内。
流水线
阶段 | 描述 | 失败处理 |
S1 检测 | 通过 avrdude 芯片签名探测进行板卡识别;USB VID/PID 和工作区推断作为后备方案 | 阻塞 |
S2 审查 | 静态分析:cppcheck、针对芯片知识库的寄存器/位域验证、置信度评分 | 非阻塞 |
S3 构建 | 编译为 firmware.hex:裸寄存器 C(avr-gcc, | 阻塞 |
S4 烧录 | avrdude 编程(ATmega2560 使用 | 阻塞 |
S5 验证 | 串口回读与模式匹配;实时浏览器面板 | 非阻塞 |
Related MCP server: Chiplab
支持的芯片目标
芯片目标 | MCU | 备注 |
| ATmega2560 | 知识库中 202 个寄存器(含 GCC 别名) |
| ATmega328P (UNO/Nano) | 知识库中 91 个寄存器 |
通过 --boards-dir 支持自定义板卡。
安装
要求:Python ≥ 3.10。仅在烧录和验证阶段需要硬件。
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"稳定版 wheel 包附在 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 贡献者
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server for Arduino CLI interactions, built with FastMCP. This server enables AI agents to seamlessly interact with Arduino CLI for development, debugging, code verification, and more.162MIT
- 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.16MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for Agentic Hardware-in-the-Loop testing, enabling AI agents to probe, flash, reset, and validate embedded firmware on real hardware via bounded MCP tools.12Apache 2.0
- AlicenseCqualityAmaintenanceMCP 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.434MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/NotchStone/Firmforge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server