原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

STM32 GDB Debugger

作者:Zeraissh版本 0.15.1i★ 3i在你的电脑上运行代码仓库 ↗
注册名称io.github.Zeraissh/stm32-gdb-mcp

安装方法

What it does

Debug STM32 firmware on real hardware via GDB + OpenOCD/ST-Link/J-Link with decoded results.

  • Connects 在你的电脑上运行
  • Account or key No key needed
  • Category 其他

为什么排在这里

列表按使用分(满分 100)排序,由以下部分组成

热度7/80GitHub 星标或每周下载量:较大的计 60,较小的计 20
新鲜度12/1230 天内有发布或代码更新得满分
仍在响应0/8上次检查时云端端点有响应
使用分19/100

质量: 基础检查通过 3/3 项(仅展示,不用于排序) · 上升势头: 暂无数据 (只用于“上升中”标签)

安装

选择你使用的 AI 应用,然后复制设置。

用一句话让 AI 帮你安装

请帮我安装 STM32 GDB Debugger。按照 https://mcp.popnx.com/i/zeraissh-stm32-gdb-mcp.md 操作,先把命令给我看,等我同意后再运行。

粘贴到能在你电脑上工作的 AI(如 Claude Code、Cursor)。它会读取我们的步骤,先给你看命令,等你同意。无需密钥,无需注册。 · 查看 AI 会读取的全文

通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月14日

第一步:你用哪个 AI?

选择你用的应用,步骤会显示在下方。

可连接 Claude,但需要先准备

需要先在电脑上安装 Python (uv)(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用

让 AI 帮你安装

把这段话复制到 Claude 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude 安装 MCP server STM32 GDB Debugger,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "stm32-gdb": { "command": "uvx", "args": [ "stm32-gdb-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 STM32 GDB Debugger 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 uv(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    uv --version
    • 显示版本号(例如 uv …)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载

    打开 uv 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version

    安装一次,所有需要 uv 的工具都能用

  2. 打开电脑版 Claude 应用的设置文件

    SettingsDeveloperEdit Config

  3. 粘贴这些设置并保存文件

    {
      "mcpServers": {
        "stm32-gdb": {
          "command": "uvx",
          "args": [
            "stm32-gdb-mcp"
          ]
        }
      }
    }
  4. 退出 Claude 再重新打开

  5. 试一试

    用 STM32 GDB Debugger 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude 说正在使用 STM32 GDB Debugger,或回答中出现 STM32 GDB Debugger 的工具名称,就表示连接成功

1 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • STM32_GDB_MCP_COMPACT 设置为 1 则仅公开核心工具;其他所有工具仍可通过 call(tool, args) 调用。
    查看英文原文Set to 1 to expose only the core tools; every other tool stays reachable through call(tool, args).
    · 默认值 1

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

ChatGPT 暂时无法连接 STM32 GDB Debugger

STM32 GDB Debugger 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器

你可以改用这些方式

A · 使用能连接 STM32 GDB Debugger 的应用

  • 需要先在电脑上安装 Python (uv)(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
  • 需要先在电脑上安装 Python (uv)(只需一次)
  • 需要先在电脑上安装 Python (uv)(只需一次)
  • 需要先在电脑上安装 Python (uv)(只需一次)

B · 其他 类中能连接 ChatGPT 的其他服务器

从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的

可连接 Claude Code,但需要先准备

需要先在电脑上安装 Python (uv)(只需一次)

让 AI 帮你安装

把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude Code 安装 MCP server STM32 GDB Debugger,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user stm32-gdb -- uvx stm32-gdb-mcp 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 STM32 GDB Debugger 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 uv(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    uv --version
    • 显示版本号(例如 uv …)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载

    打开 uv 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version

    安装一次,所有需要 uv 的工具都能用

  2. 打开终端

    Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell

  3. 粘贴这条命令并按 Enter

    claude mcp add --scope user stm32-gdb -- uvx stm32-gdb-mcp
  4. 在 Claude Code 中输入 /mcp

    应能看到 STM32 GDB Debugger 在列表中并显示已连接

  5. 试一试

    用 STM32 GDB Debugger 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude Code 说正在使用 STM32 GDB Debugger,或回答中出现 STM32 GDB Debugger 的工具名称,就表示连接成功

1 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • STM32_GDB_MCP_COMPACT 设置为 1 则仅公开核心工具;其他所有工具仍可通过 call(tool, args) 调用。
    查看英文原文Set to 1 to expose only the core tools; every other tool stays reachable through call(tool, args).
    · 默认值 1

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Cursor,但需要先准备

需要先在电脑上安装 Python (uv)(只需一次)

让 AI 帮你安装

把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Cursor 安装 MCP server STM32 GDB Debugger,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "stm32-gdb": { "command": "uvx", "args": [ "stm32-gdb-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 STM32 GDB Debugger 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 uv(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    uv --version
    • 显示版本号(例如 uv …)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载

    打开 uv 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version

    安装一次,所有需要 uv 的工具都能用

  2. 点击这个按钮打开 Cursor

    在 Cursor 中打开

    Cursor 会请你确认安装,点击 Install

  3. 在 Cursor 中以 Agent 模式打开 AI 聊天

  4. 试一试

    用 STM32 GDB Debugger 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Cursor 说正在使用 STM32 GDB Debugger,或回答中出现 STM32 GDB Debugger 的工具名称,就表示连接成功

1 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • STM32_GDB_MCP_COMPACT 设置为 1 则仅公开核心工具;其他所有工具仍可通过 call(tool, args) 调用。
    查看英文原文Set to 1 to expose only the core tools; every other tool stays reachable through call(tool, args).
    · 默认值 1

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同

可连接 VS Code,但需要先准备

需要先在电脑上安装 Python (uv)(只需一次)

让 AI 帮你安装

把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 VS Code 安装 MCP server STM32 GDB Debugger,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "stm32-gdb": { "type": "stdio", "command": "uvx", "args": [ "stm32-gdb-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 STM32 GDB Debugger 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 uv(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    uv --version
    • 显示版本号(例如 uv …)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载

    打开 uv 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version

    安装一次,所有需要 uv 的工具都能用

  2. 点击这个按钮打开 VS Code

    在 VS Code 中打开

    VS Code 会请你确认安装,点击 Install

  3. 在 VS Code 中以 Agent 模式打开 AI 聊天

  4. 试一试

    用 STM32 GDB Debugger 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 VS Code 说正在使用 STM32 GDB Debugger,或回答中出现 STM32 GDB Debugger 的工具名称,就表示连接成功

1 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • STM32_GDB_MCP_COMPACT 设置为 1 则仅公开核心工具;其他所有工具仍可通过 call(tool, args) 调用。
    查看英文原文Set to 1 to expose only the core tools; every other tool stays reachable through call(tool, args).
    · 默认值 1

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同

其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看

查看所有支持 MCP 的应用 →

JSON 设置在下方“开发者专用”中

卡住了?问问正在用 STM32 GDB Debugger 的人💬 讨论 →
开发者专用:终端命令和 JSON 设置

安装在电脑上

Claude Code

claude mcp add --scope user stm32-gdb -- uvx stm32-gdb-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "stm32-gdb": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "stm32-gdb": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "stm32-gdb": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}

需要你填写的值

  • STM32_GDB_MCP_COMPACT env
    设置为 1 则仅公开核心工具;其他所有工具仍可通过 call(tool, args) 调用。
    查看英文原文Set to 1 to expose only the core tools; every other tool stays reachable through call(tool, args).

说明为自动翻译,变量名保持原样;不确定时请查看原文。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

一览

每周下载量i
36/周
连接方式
在你的电脑上运行
最新版本i
0.15.1
分类i
其他
发布到注册中心i
2026年10月19日
代码最后更新i
2026年10月24日
作者
Zeraissh
软件包
pypi: stm32-gdb-mcp
注册状态
活跃

哪些应用可以使用它

依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。

在你的电脑上运行,适用于

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

全部应用及其优缺点 →

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月19日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 Zeraissh 验证,该账户拥有此仓库

  • ✓ 通过

    仍在维护

    代码最后更新于26天前

  • ✓ 通过

    有许可证

    使用 MIT

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

已公开的漏洞(OSV.dev)

OSV.dev 中没有 stm32-gdb-mcp@0.15.1 的记录

只检查这个版本的包本身,不包括所有依赖 · 检查于 2026年11月15日

我们检查什么 → · JSON

作者:申请重新检查或报告信息错误
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/zeraissh-stm32-gdb-mcp.svg)](https://mcp.popnx.com/en/servers/zeraissh-stm32-gdb-mcp)

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

用户评价

还没有评价

登录后写评价

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 20693 个服务器的 93%
  • 发布到注册中心的时间比此分类中其他 20693 个服务器的 58% 更新
  • 基础检查结果等于或优于此分类中其他 20693 个服务器的 99%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

STM32 GDB Debugger 安全吗?

它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于26天前,最新版本(0.15.1)于31天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

功能相近的其他选择

同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

作者:koala73广泛使用★ 9.1万3天前更新

在云端运行✓ 服务方 · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

作者:openstatusHQ广泛使用★ 92742个月前更新

在云端运行✓ 服务方 · openstatus.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

作者:Klavis-AI正在增长★ 582514个月前更新

在云端运行仓库已归档✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

作者:jitsucom广泛使用★ 51364个月前更新

在云端运行✓ 服务方 · jitsu.com
与相似项目对比
本项
STM32 GDB Debugger
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
运行位置需要安装在电脑上在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装
需要密钥否否否否否否
可在 Claude 中按 + 添加否否否否否否
基础检查3/34/44/44/41/44/4
许可证MITAGPL-3.0AGPL-3.0MITApache-2.0MIT
价格登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

STM32 GDB MCP Server / STM32 GDB MCP 服务器

An MCP server that lets an AI agent debug STM32 firmware on real hardware — drive GDB + OpenOCD/ST-Link/J-Link to flash, breakpoint, inspect memory/registers/RTOS, triage HardFaults, and profile — and get back decoded, structured evidence instead of raw GDB text.

让 AI 智能体在真实硬件上调试 STM32:通过 GDB + OpenOCD/ST-Link/J-Link 烧录、打断点、查 内存/寄存器/RTOS、定位 HardFault、做性能采样,返回已解码的结构化证据而非原始 GDB 文本。

uvx stm32-gdb-mcp          # any MCP client: command "uvx", args ["stm32-gdb-mcp"]

Needs arm-none-eabi-gdb (or gdb-multiarch) and a GDB server (OpenOCD / J-Link / st-util) on PATH; stm32-gdb-mcp-check-env prints the install command for your OS. See Install for one-command setup in Claude Code, Cursor, VSCode and others. / 需要 PATH 中有 arm-none-eabi-gdb(或 gdb-multiarch)和一种 GDB Server; stm32-gdb-mcp-check-env 会给出本机系统的安装命令。各客户端的一键安装见下方 Install。

Why this server / 为什么选它

Generic GDB MCP servers / 通用 GDB MCPprobe-rs-based servers / 基于 probe-rsstm32-gdb-mcp
Output / 返回内容Raw GDB text / 原始文本Structured / 结构化Decoded + suggested_next_actions / 解码结果 + 下一步建议
HardFault → source line / 定位到源码—✓✓ plus stack analysis / 附栈分析
FreeRTOS tasks, stacks, queues / RTOS 感知——✓
Peripheral registers decoded from SVD / SVD 外设解码——✓
Logs / 日志—RTTRTT, SWO, UART
Symbolized PC sampling / 符号化采样——✓
One-call bring-up (flash_and_run, debug_until) / 组合工具—partial / 部分✓
Replay + debug report / 回放与报告——✓
Multi-board rack, programmable USB hub / 多板与 USB Hub——✓
Probes / 调试器Any GDB remoteprobe-rs probesST-Link, J-Link, CMSIS-DAP via OpenOCD / J-Link GDB Server / st-util
Targets / 目标芯片AnyCortex-M, RISC-V, ESP32STM32 (Cortex-M)

Pick a probe-rs-based server if you need RISC-V or ESP32; pick this one when you debug STM32 and want the agent to get from symptom to root cause with fewer calls. / 需要 RISC-V 或 ESP32 时选 probe-rs 系;调试 STM32、希望 agent 用更少调用从现象走到根因时选本项目。

What you get / 能力一览

Bring-up & flash / 启动与烧录detect_probe, suggest_server_args, build_firmware, flash_and_run, self_check, reset_target
Execution / 执行控制run_and_wait(结构化停止事件), run_for_duration(运行/采样后暂停并采集), breakpoint, step, halt/continue, debug_until
Inspect / 状态检查(需暂停)capture_state, read_memory/read_variable, read_registers, frame, read_peripheral_register
Fault triage / 故障诊断reconstruct_fault_context(故障 PC → 源码), diagnose_fault, analyze_stack
RTOS / 实时系统detect_rtos, read_freertos, snapshot(scope=rtos)
Observe / 可观测性logging(RTT/SWO/UART), setup_swo(无需额外解码器的 printf), sample_pc(符号化采样器)
Determinism / 可复现性run_scenario(回放), batch, get_session 日志/指标, export_debug_report
Multi-board / 多板卡任意工具传 session="name";使用 list_sessions/close_session 管理

Two cross-cutting goals: low comprehension cost (decoded outputs, suggested_next_actions) and minimal repro steps (composites like flash_and_run / debug_until collapse 5–15 calls into one). Compact mode keeps the visible surface small; every tool remains reachable through call(tool, args), and tool_help exposes hidden schemas.

两个贯穿目标是:通过解码结果和 suggested_next_actions 降低理解成本,并通过 flash_and_run、debug_until 等组合工具把多次调用压缩为一次,缩短复现路径。 compact 模式只展示核心工具;所有隐藏工具仍可由 call(tool, args) 调用,并可用 tool_help 查询完整说明与 schema。

Install / 安装

ClientOne command
Claude Code(工具 + skills + 常驻规则)/plugin marketplace add Zeraissh/stm32-gdb-mcp,然后 /plugin install stm32-debug-kit@zeraissh-stm32
Cursor / VSCode / Codex / Windsurf / Traepython scripts/deploy.py --project " " --ide vscode,cursor
Manual / 手动配置(任意 MCP 客户端)pip install -e .,再将客户端指向 stm32-gdb-mcp

deploy.py installs the server, writes the IDE's MCP config, and drops a project-aware rules file into your firmware project. Per-client config snippets + the rules template are in docs/install-ides.md. Compact mode is on by default. PyPI/console installs also expose stm32-gdb-mcp-check-env, stm32-gdb-mcp-install, and stm32-gdb-mcp-deploy.

deploy.py 会安装服务器、写入 IDE 的 MCP 配置,并在固件项目中生成带项目上下文的规则文件。 各客户端配置片段和规则模板见 docs/install-ides.md。默认启用 compact 模式;PyPI/console 安装还会提供上述三个辅助命令。

stm32-gdb-mcp-check-env --json also reports the imported module version/path, installed distribution version, and all four console scripts. Use stm32-gdb-mcp-deploy --upgrade when those installation fields drift. / stm32-gdb-mcp-check-env --json 还会报告当前导入 模块的版本/路径、已安装发行版本和四个 console script;这些安装字段发生漂移时,使用 stm32-gdb-mcp-deploy --upgrade 修复。

Requirements / 环境要求:PATH 中需要 arm-none-eabi-gdb(Debian/Ubuntu 上的 gdb-multiarch 也可以,或用 STM32_GDB_MCP_GDB 指定任意支持 ARM 的 GDB),以及至少一种 GDB Server(openocd / JLinkGDBServerCL / st-util)。运行 stm32-gdb-mcp-check-env(或 python setup_env.py)检查;缺什么,它会打印本机系统(Windows scoop / macOS brew / Linux apt、pacman)对应的一行安装命令。 Needs arm-none-eabi-gdb (or gdb-multiarch, or any ARM-capable GDB named by STM32_GDB_MCP_GDB) plus one GDB server; stm32-gdb-mcp-check-env prints the install command for whatever is missing on your OS.

What the plugin runs and connects to / 插件会运行和连接什么

The Claude Code plugin (stm32-debug-kit) runs everything locally on your machine:

  • MCP server: python scripts/run_mcp_server.py, which runs the server from this repository's src/ over stdio. The Python it runs under needs the dependencies in pyproject.toml (pip install -e . or pip install stm32-gdb-mcp).
  • SessionStart hook: python hooks/session_start.py prints a short banner into the session context. It reads nothing and sends nothing.
  • Processes it starts: arm-none-eabi-gdb (or the GDB named above), a GDB server (openocd, JLinkGDBServerCL or st-util), and, when you ask it to build, cmake/make. They talk to the debug probe over USB and to each other over TCP on localhost.
  • Local ports: GDB server ports on localhost; the optional USB hub daemon and dashboard serve on 127.0.0.1 only (default port 8765). Serial ports are opened only when a tool reads a UART log.
  • Files: it reads your firmware project (ELF, SVD, build files). It writes only where a tool is told to (a debug report, a saved debug config), plus small lock and state files under the system temp folder (stm32-gdb-mcp/).
  • Network: nothing leaves your machine unless an agent calls report_issue, which files a GitHub issue on Zeraissh/stm32-gdb-mcp through your own gh CLI login. That issue contains the description the agent wrote, the MCP version and environment summary, and the session's tool journal and metrics. There is no telemetry.

Claude Code 插件(stm32-debug-kit)的所有内容都在本机运行:

  • MCP 服务器:python scripts/run_mcp_server.py,通过 stdio 运行本仓库 src/ 中的服务器。 运行它的 Python 需要装好 pyproject.toml 中的依赖(pip install -e . 或 pip install stm32-gdb-mcp)。
  • SessionStart hook:python hooks/session_start.py 只向会话上下文输出一段简短说明, 不读取也不发送任何数据。
  • 启动的进程:arm-none-eabi-gdb(或上文指定的 GDB)、GDB Server(openocd、JLinkGDBServerCL 或 st-util),以及按需构建时的 cmake/make。它们通过 USB 连接调试器,彼此之间通过 localhost 上的 TCP 通信。
  • 本地端口:GDB Server 端口只在 localhost;可选的 USB Hub 守护进程和看板只监听 127.0.0.1(默认端口 8765)。只有在工具读取 UART 日志时才会打开串口。
  • 文件:读取你的固件工程(ELF、SVD、构建文件)。只在工具指定的位置写文件(调试报告、 保存的调试配置),另外在系统临时目录的 stm32-gdb-mcp/ 下写少量锁文件和状态文件。
  • 网络:除非 agent 调用 report_issue,否则不会有数据离开本机。report_issue 会用你 本机 gh CLI 的登录身份,在 Zeraissh/stm32-gdb-mcp 上提交一个 GitHub issue,内容包括 agent 写的描述、MCP 版本和环境摘要,以及本次会话的工具调用记录和指标。没有任何遥测。

30-second quickstart / 快速上手

detect_probe()                                           # USB evidence; auto-select only one probe

debug_profile(action=set, mcu="STM32L431", probe="stlink", elf_path="build/app.elf", svd_path="STM32L4.svd") suggest_server_args(mcu="STM32L431") # probe omitted -> use profile probe start_debug_session(server_type="openocd") # server_args omitted -> infer from profile mcu/probe self_check() # ALWAYS first: byte order, core, family flash_and_run(file_path="build/app.elf", run_to="main") breakpoint(action=set, location="my_func", condition="state == BAD") run_and_wait() # structured stop event + next actions run_for_duration(duration_sec=30, capture={"expressions": ["rx_count"]}) run_for_duration(duration_sec=60, sample={"interval_ms": 500, "expressions": ["rx_count", "state"]}) reconstruct_fault_context() # on a crash: faulting PC → file:line

detect_probe reads physical USB devices, keeps serials for identical probes, and never chooses between multiple connected probes. / detect_probe 读取真实 USB 设备,同型号探针按 序列号分别保留;连接多个探针时绝不会擅自选择。

The full tool reference (lean families with action=/what=) is skills/stm32-debug/reference/tool-map.md. The server also ships always-on instructions, so any MCP client gets the debug loop without setup.

完整工具索引见 skills/stm32-debug/reference/tool-map.md, 其中按 action= / what= 归并工具族。服务器还会发送常驻 instructions,因此任意 MCP 客户端连接后都能获得同一套调试闭环。

Key rules (the target must cooperate) / 关键规则

  • Reads need a HALTED core. If a read says target_unresponsive, halt_execution first. / 读取要求内核已暂停。 若返回 target_unresponsive,先执行 halt_execution。
  • run_for_duration(sample=...) is best-effort low-rate debugger polling. It does not halt the target itself, but running-target expression reads may fail on some probes/MCUs; use SWO/ring-buffer firmware telemetry for higher-rate or guaranteed capture. / run_for_duration(sample=...) 是尽力而为的低速调试器轮询;某些探针或 MCU 无法在运行中读取 表达式。需要更高采样率或可靠采集时,请使用 SWO 或固件环形缓冲。
  • A breakpoint TIMEOUT means the path was NOT reached — don't just retry. Halt, capture_state, breakpoint(action=list) (hit_count=0 confirms), read the gating flag, set an earlier breakpoint or drive the precondition. / 断点超时表示路径没有到达。 不要原样重试;暂停后采集状态、确认 命中次数、读取门控条件,再前移断点或驱动前置条件。
  • Writes are guarded (option bytes/IWDG/WWDG blocked) — write_guard(action=policy) to allow. / 写操作受保护。 option bytes、IWDG、WWDG 默认禁止,需用 write_guard(action=policy) 显式放行。
  • Never hard-kill OpenOCD (wedges the ST-Link USB) — use recover_session. SWD is exclusive. / 不要强杀 OpenOCD。 使用 recover_session;同一探针的 SWD 调试连接是独占的。
  • A wedged probe needs a physical re-enumeration. With the optional [hub] extra and a SmartUSBHub, hub(action=power) cuts VBUS and hub(action=data) drops the USB data lines, so that re-plug becomes a tool call. Without a hub it is still a hum

只显示了开头部分;其余内容请在仓库中阅读