stm32-forge
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.
STM32 Forge
一套引擎,四个入口。 把 STM32 从「探测工具链 → 建工程 → 改 .ioc(含时钟)→ 生成代码 → 编译 → 烧录 → 调试 → 回读寄存器」整条链交给模型执行,在 DeepSeek Harness 里是原生工具,在 Claude Code / Codex / Kun / WorkBuddy / Cursor 里通过 MCP 用同一套能力——因为两边吃的是同一份工具定义。
Fork 自三个上游的合并重构版,不是薄包装:源码级吸收后重写、去重、补断言。 出处与许可证逐项列在 NOTICE。主许可 Apache-2.0。
English · 架构 · MCP 接入 · 变更与"不做什么" · 迁移指南 · 路线图
为什么再做一个
现存的三个 STM32 插件各有绝活,也各有硬伤,而且互相装不到一起——DSH 的工具注册表重名直接抛错(dsh-tools/lib/index.js:385),stm32_build / stm32_flash / stm32_serial / stm32_watch / stm32_doctor / stm32_rtt 六个名字在两个上游里各写了一遍。
STM32 Forge 的处理方式:
来源 | 拿过来 | 丢掉 |
| 21 族设备库、18 族时钟规划、 | 12 MB 资源一刀切、Windows 盘符硬编码、单个 10 万行文件 |
| GDB/MI 深度调试、J-Link 后端、Keil uvprojx + UV4、ELF 符号与体积(v0.3 吸收中) | 与别人撞车的工具名、没有 |
| 工程卡 | 私有 backend 进程与端口、必须切「单片机模式」、随包分发 GPL 的 OpenOCD |
Related MCP server: stm32cubemx-mcp
三条红线由代码保证
只写自有区域:
.ioc走事务(计划 → 校验 → 备份 → 原子替换 → 失败回滚);源码只写USER CODE BEGIN/END,块外逐字节保留。烧录不与调试抢探针:只烧录就不开会话,烧完
monitor reset run+ detach;要调试才开,空闲自动关。Serial Wire 不能关:
.ioc没有 SWD 时烧录前直接拒绝(会烧到失联)。每一步都带证据:计划编号、
file:line:col、Verified OK、寄存器位域值、两次构建的体积差。
这些在代码里是断言 + 单测,不是 README 里的祈祷。
安装
DeepSeek Harness(原生工具 + 面板 + 命令 + SKILL)
dsh plugin --profile web add github:kcylp/dsh-stm32-forge
# 装完完全重启 DSH(插件层只在进程启动时加载)任何 MCP 客户端(Claude Code / Codex / Kun / WorkBuddy / Cursor)
{
"mcpServers": {
"stm32-forge": {
"command": "node",
"args": ["<包目录>/lib/mcp/main.js"],
"cwd": "D:/work/blink"
}
}
}逐客户端的接法、验证方式与排错见 docs/MCP.md。
命令行
node lib/cli/main.js tools # 37 个工具一览
node lib/cli/main.js doctor --dir D:\work\blink # 体检:缺什么、探针通不通
node lib/cli/main.js build --dir D:\work\blink
node lib/cli/main.js flash --dir D:\work\blink工具面(DSH 与 MCP 同名同参)
组 | 工具 |
环境 |
|
工程 |
|
|
|
生成 |
|
代码 |
|
构建 |
|
烧录 |
|
调试 |
|
寄存器 |
|
运行时 |
|
设计 |
|
资料 |
|
运维 |
|
命令(DSH 壳):/stm32-doctor /stm32-env /stm32-setup /stm32-build /stm32-flash /stm32-debug /stm32-stop
状态
v0.2.0:三个入口已落地并各自验证过 —— DSH 原生(37 工具 / 7 命令 / SKILL / 调试台)、MCP stdio(initialize + tools/list + tools/call,与 DSH 同源同参)、CLI(tools / doctor / env / ioc / project / build / flash / call)。离线用例 1180 pass / 0 fail。
下一步:v0.3 吸收 Lylgj/dsh-stm32-toolkit 的 GDB/MI 深度调试、J-Link、Keil UV4 与 ELF 体积;v0.4 吸收 airls 的工程卡 / 功能契约 / 编码感知读写。见 docs/ROADMAP.md。
许可证
Apache-2.0。上游归属与随包第三方素材见 NOTICE。
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
Primary-source MCP server with epistemic compiler, Audit.lean & offline veriscope-verify CLI.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Lean 4 MCP server: compile, prove theorems, and formalize math with Mathlib.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Related MCP Servers
- FlicenseAqualityDmaintenanceMCP server for scaffolding, building, and flashing bare-metal STM32C011 firmware using the STM32CubeCLT toolchain. Exposes tools for project scaffold, build, flash, and probe listing.4-
- 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
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets AI coding agents drive the full STM32 development loop—code generation, build, flash, debug, serial monitoring, and fault diagnosis—end to end via CubeIDE, CubeMX, CubeProgrammer, OpenOCD, and GDB.1MIT
- AlicenseAqualityNot gradedmaintenanceMCP server for debugging STM32 microcontrollers over ST-LINK using STM32CubeCLT tools (GDB, ST-LINK_gdbserver, STM32_Programmer_CLI) with session management, flashing, breakpoints, memory/register access, and expression evaluation.191GPL 3.0