Prototype · Preview: every server in the official registry, synced every 30 minutes. Reviews and accounts come in a later step.
PopNx MCPMCP servers for people who use AI · explained in plain words

mcu-debug-mcp

by stillsurgeversion 0.1.1i★ –iRuns on your computer
Registry nameio.github.stillsurge/mcu-debug-mcp

Install

Overview

Description from the maker (original English)

Embedded debug MCP: serial, flash verify, fault decode, 45-pattern log analyzer, driver library

PopNx MCP’s three pillars

These three are never merged into one score: opinions, measurements and popularity are different things.

What you can do with it

We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.

  • Connection: Runs on your computer
  • Transport: stdio
  • Category: Other

Install

Pick the AI app you use, then copy the settings.

Before you install

  • Basic checks: 1 of 1 passed
  • Runs on your computer with your user’s permissions (files, network, apps).
  • You fill in yourself: MCU_DEBUG_MCP_MODE, MCU_DEBUG_MCP_PORT_DENY

You need

  • PyPIPython’s uv installed (for the uvx command)

Which app do you use?

Pick your app above. We remember it, so next time the button says “Install in …”.

Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json

{
  "mcpServers": {
    "mcu-debug": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ],
      "env": {
        "MCU_DEBUG_MCP_MODE": "your-value",
        "MCU_DEBUG_MCP_PORT_DENY": "your-value"
      }
    }
  }
}

Run this in your terminal

claude mcp add mcu-debug --env MCU_DEBUG_MCP_MODE=your-value --env MCU_DEBUG_MCP_PORT_DENY=your-value -- uvx mcu-debug-mcp

Fill in the empty values before running it.

Open in Cursor

Or copy the settings yourself

Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcu-debug": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ],
      "env": {
        "MCU_DEBUG_MCP_MODE": "your-value",
        "MCU_DEBUG_MCP_PORT_DENY": "your-value"
      }
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

Open in VS Code

Or copy the settings yourself

Paste into .vscode/mcp.json in your project

{
  "servers": {
    "mcu-debug": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ],
      "env": {
        "MCU_DEBUG_MCP_MODE": "your-value",
        "MCU_DEBUG_MCP_PORT_DENY": "your-value"
      }
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.

Your choice stays on this device in a cookie; no account needed.

Values you fill in

  • MCU_DEBUG_MCP_MODE env
    Isolation mode: readonly (default) or write. Controls whether serial write/flash operations are allowed
  • MCU_DEBUG_MCP_PORT_DENY env
    Comma-separated port denylist (e.g. COM6,COM28); supports * wildcard; DENY overrides ALLOW

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 7, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account stillsurge, which owns the repo

  • … Not checked yet

    Still maintained

    We have not read this repo from GitHub yet

  • … Not checked yet

    Has a licence

    We have not read this repo from GitHub yet

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Compared with others in Otheri

  • More stars than 0% of the other 18349 servers in this category
  • Published to the registry more recently than 73% of the other 18349 servers in this category
  • Basic checks equal to or better than 100% of the other 18349 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is mcu-debug-mcp safe?

It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed –, and the latest version (0.1.1) reached the registry 15 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: Spec Driven Development, Remote Desktop Commander, arr-mcp

Alternatives

Servers in the same category from other makers, sorted by stars.

Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Spec Driven Development

by formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

Runs on your computer★ 440MITUpdated 14 months ago
Install

Remote Desktop Commander

by desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

Runs in the cloud★ 211Updated 2 days ago
Install

arr-mcp

by bardesss

One server, 40 tools, the whole media stack: *arrs, Jellyfin, Plex, Seerr, Cleanuparr, downloaders

Runs on your computerUpdated today
Install

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

mcu-debug-mcp · 嵌入式调试 MCP(领域级)

让 AI"看到并看懂"你手上的板子:串口读写 + 故障模式库(45 条规则)+ 烧录失败模式直译 + Modbus 帧解析 + 编译报错解析 + 引脚冲突检测(三引擎)+ 板级知识库 + 波特率自动探测 + AT 序列回归 + 双口对录 + 会话持久化 + RTT 通道 + 烧录桥接 + 寄存器位域解码 + 调试器探测 + 预验证驱动模板库(9 款)+ 器件选型库(按接口/地址/时序要求) + 外设 API 用法层(初始化顺序硬要求) + 错误码统一查询(6 张表·带出处) + 报文解析(自定义二进制帧 / NMEA-GPS) + 工程结构与工具链探测 + 会话日志治理与交付报告。共 59 个工具 + 16 个 MCP resources + 6 个 prompts(8 静态 resources + 8 模板 resources)。

和"直接问 AI"的本质区别:AI 不再听你转述"传感器好像不太对",而是亲自读到串口里的真实字节——AT 指令返回了什么、数据是全 0 还是乱码、程序是不是在反复重启、Keil 为什么烧不进去——然后按出厂预置的故障模式库给出诊断和排查步骤。引脚分配前用数据手册级映射表核对(能抓 AI 幻觉接线)。驱动代码来自验证过的模板库(纯函数 PC 可测 + Python 交叉验证),不是 AI 现编的。

安全与隔离:默认不碰硬件

这个 MCP 的工具会真的打开串口、写字节、烧 flash。开发机上常年挂着正在使用的设备 (UART 桥、调试器 CDC 口、正在跑的调试会话),一次误调用就能打断它们。所以默认档位是只读:

项默认说明
隔离档位readonly读/枚举允许;写串口、AT、波特率扫描、双口对录、烧录一律拒绝,并在拒绝信息里写清「为什么拒 + 什么风险 + 怎么放开」
端口名单未设置MCU_DEBUG_MCP_PORT_DENY=COM6,COM28 把你在用的口锁死(支持 * 通配,DENY 优先于 ALLOW)
不可逆操作双闸门烧录要 dry_run=False 且 confirm=True 才会写 flash;只给预览
测试隔离强制测试进程锁 readonly + 端口全禁 + 真实串口构造被替换;跑测试不会碰你的设备
MCU_DEBUG_MCP_MODE=write              # 放开写权限(做真机操作时)

MCU_DEBUG_MCP_PORT_DENY=COM6,COM28 # 把在用的口锁死(即使放开了写权限也打不开) MCU_DEBUG_MCP_NO_TOUCH_DTR=1 # 打开端口时不翻转 DTR/RTS,尽量不触发开发板自动复位

完整的风险矩阵(每个操作会做什么、需要什么才能执行、哪些操作没纳入闸门及原因)见 [`SECURITY.md`](SECURITY.md)。随时可用 env_status 查当前档位、名单与「因此被禁用了哪些操作」。

与同类工具的差异(2026-09 竞品调研结论)

同类串口 MCP(qarnet/serial-mcp、mcp-serial、uart-mcp 等)只做「串口通道」;本项目的差异化在知识层:

能力串口通道类 MCP本项目
串口读写✅(普遍更全)✅ expect 模式等待响应
日志分析❌ 把原始日志丢给 LLM 现看✅ 45 条模式库(30 内置 + 15 外置),规则出厂预置+带排查步骤
烧录失败诊断❌✅ ST-Link 连接失败/Keil 找不到算法/esptool 进不了下载模式/RDP 读保护…8 条规则族
错误码查询❌✅ error_code_lookup:ESP-IDF esp_err_t / ESP-AT 通用响应 / CWJAP / CME / PubSubClient rc / Modbus 异常码,共 6 张表 51 条,每条带出处;未收录明说查不到
编译/链接报错解析❌✅ gcc / Keil / armcc / MSVC 四种风格
引脚冲突检测❌✅ pin_check 三引擎:F1 固定复用 / F4 AF 表 / ESP32 io_mux 硬约束,可交叉板载外设
板级知识库❌✅ board_get:板载外设占用+坑清单按翻车率排序+供电说明(蓝药丸/黑药丸已收录)
会话持久化❌✅ 串口会话自动落盘 logs/,隔多少轮对话都能 sessions_list + sessions_get 回看现场
波特率自动探测❌✅ baudrate_autodetect 逐档评分排序(支持离线日志样本评分)
AT 批量回归❌✅ at_sequence 逐条断言 PASS/FAIL + serial_pair_record 双口对录时间线
预验证驱动库❌✅ 9 款,纯函数分离+交叉验证+坑清单+答辩加分点
寄存器位域解码embedded-mcp 有✅ 支持手工 fields + CMSIS-SVD 文件
RTT 通道❌✅ rtt_read(pyocd 桥接,实验性)
知识库质量保障❌✅ validate_knowledge.py 机械核验(引脚数/唯一性/复用唯一/正则可编译),CI 可挂
知识库可扩展❌✅ 故障模式/错误码表/引脚映射/板级知识全部 JSON 外置,社区可贡献(逐条标 source)

工具清单(59 个)

工具功能依赖
serial_list枚举串口,识别 CH340/CP2102/FT232 并给驱动建议pyserial
serial_open / serial_close打开/关闭串口(返回句柄;会话日志自动落盘,落点见 env_status)pyserial
serial_read读数据(expect 正则命中即返回 + idle_ms 静默超时 + 总超时),文本+HEX 双视图pyserial
serial_send发指令(AT 自动加 \r\n;支持 HEX;expect 等响应),自动读回pyserial
serial_session_log取全量会话日志pyserial
sessions_list列出已落盘会话日志(新→旧),隔轮次可回看无
sessions_get回看指定会话日志内容(默认尾部 200 行),可喂 analyze_log无
logs_prune会话日志保留策略与清理入口(默认 dry-run 只列不删;真删需 write 档 + confirm=True)无
baudrate_autodetect波特率自动探测:逐档采样评分排序给推荐(log_text 可离线评分)pyserial
at_sequenceAT 指令序列批量回归:逐条正则断言 PASS/FAIL/TIMEOUT + 回显尾pyserial
serial_pair_record双口对录:两串口时间线交错录制(RS485 主从/双机对话),文本+HEXpyserial
analyze_log45 条故障模式分析(见下),每条给人话诊断+排查步骤无
modbus_crcModbus RTU CRC16 计算/校验(RS485 毕设)无
modbus_parseModbus RTU 帧解析:拆寄存器值/线圈,异常响应直译异常码 01-06无
error_code_lookup错误码统一查询(esp_idf / at_common / cwjap / cme / modbus_exception / mqtt_rc):释义+排查方向+出处;未收录明说查不到、不猜无
pin_check引脚冲突检测(三引擎):幻觉接线/同功能双占/SWD 挪用/remap 档/ESP32 硬约束/板载外设交叉无
pinmap_list / pinmap_get引脚知识库浏览(列表 / JSON 原文)无
board_list / board_get板级知识库:板载外设+坑清单+供电说明(bluepill / blackpill_f411 / esp32_devkitc32)无
probe_list探测调试器与目标芯片pyocd(可选)
rtt_readRTT 通道读日志(⚠ 实验性,固件需含 SEGGER RTT 控制块)pyocd(可选)
flash_tool_detect检测本机烧录工具无
flash_firmware烧录固件,桥接 STM32_Programmer_CLI/esptool/st-flash/pyocd,默认 dry-run;烧完自动复位各工具(可选)
driver_list / driver_get预验证驱动模板库(9 款,含接线表+验证记录)无
driver_wiring驱动接线知识库:接线表+头号坑+日志解读+答辩加分点无
component_list / component_get器件选型库:按接口(i2c / uart / timer_pwm / gpio_timing)列器件,带 7 位地址、微秒时序要求、头号坑、出厂验证记录;数据全部派生自预验证驱动库的 meta.json 与 *_port.h,零凭记忆条目无
peripheral_api_list / peripheral_api_get外设 API 用法层:每个驱动要占哪些外设(I2C1 / TIM1 / UART2…)+ 初始化顺序硬要求(取自适配层注释原句,如「工程里先完成 HAL_I2C_MspInit 与 hi2c1 初始化」)无
decode_register寄存器值按位域拆解无
decode_register_svd按 CMSIS-SVD 文件解码位域(含枚举提示)无
decode_faultCortex-M 故障寄存器解码(CFSR/HFSR/BFAR/MMFAR):20 位逐条给人话成因+排查;三类陷阱在输出里强制拦截(见下)无
parse_map.map 解析(GNU ld / Keil / IAR):段占用 + 最大符号 + 栈深线索;认不出格式就说认不出,不猜;主机 map 会报警无
symbol_lookup地址→符号反查:给出函数名+偏移;越界/落在空隙/野指针拒绝硬套函数名无
stack_unwind栈回溯:硬件 8 字栈帧还原调用链 + EXC_RETURN 判栈类型(MSP/PSP、标准/扩展帧)+ 跑飞识别无
env_status环境自检:依赖 / 串口(含 VID:PID 识别与 Unix 权限)/ 烧录器 / 知识库根与条目数 / 版本,一次问清;探不到的会明说为什么探不到无
ecosystem_list / ecosystem_get生态/框架识别知识库(Zephyr / RT-Thread / PlatformIO / Keil / IAR / Rust defmt):识别特征 + 构建产物 + 日志签名 + 各自的坑,条目级带出处无
project_detect工程结构识别:按标志文件/后缀认生态(platformio.ini / *.uvprojx / prj.conf / Cargo.toml…),只探一层(避免 vendor/ 误判);认不出明说该看什么无
toolchain_status工具链探测:编译器 / GDB / SDK 逐个探版本;「未发现」不等于环境坏了——会说明 IDE 自带工具不一定暴露到命令行无
report_session交付物生成:会话日志 → Markdown 报告(故障分析 + 原始日志附后);目标已存在不默认覆盖无
nmea_parseNMEA 0183 解析(GPS/北斗):GGA/RMC/GSA/GSV/VTG/GLL 逐句给人话(经纬度度分+十进制/定位质量/星数/HDOP/速度);每句验 XOR,不过的明说不可信;非 NMEA 行单独点名跳过无
frame_parse通用二进制帧解析:帧头 + 长度字段切帧,支持 sum8 / CRC16-Modbus;校验字节不计入长度字段(Modbus 就靠这条);切不动/截断/垃圾字节逐条报出,绝不静默丢无
chip_info芯片身份与存储信息:型号 / Device ID / 修订 / 内核类型 / Flash 容量 / 96 位 UID / 选项字节(读保护、TZEN、写保护组);默认 hotplug 档不复位不停内核,要 UID 得显式 mode="full"(会复位目标,受隔离层管辖)STM32_Programmer_CLI
reset_reason复位原因 + 内核运行状态:RCC_RSR 逐位直译(引脚/欠压/软件/看门狗/低功耗)并给可执行建议;讲清标志是「累积」的——多个位同时为 1 ≠ 一次同时发生;clear_flags+confirm 支持「清 → 复现 → 再读」定位这一次STM32_Programmer_CLI
flash_verify烧录后逐字节校验:把文件与芯片上实际内容比对,报出首个不一致的偏移 + 绝对地址 + 前后 8 字节上下文;支持 .bin / .hex / .elf(ELF 按段表偏移取值);只读走 hotplugSTM32_Programmer_CLI
timing_analysis时序/数据率分析:丢帧(序号跳号)、卡顿(间隔离群)、节拍漂移(累计变化量 vs 实际离散度);窗口不足一个时间戳刻度时明说不给指标,不编数据率无

| stream_capture | 长时录测:串口持续采集,按到达时刻逐行打时间戳落盘(无时间戳 = 时序信息永久丢失);产物可直接喂 timing_analysis(path=...);重名不覆盖旧现场 | pyserial | bridge_probe | 桥自检:确认那块跑桥固件的 MCU 活着、认 MCUDBG/1 协议、支持哪些总线——纯握手不碰总线;绝不自动扫口找桥(实测过往别人正在跑的固件里灌探测字节的后果) | pyserial | i2c_scan | I2C 总线扫描:逐地址 ACK 探测,给出 7 位地址 + 读/写地址 + 可能的器件提示(最小表,逐条来自器件数据手册,只提示不判定);扫不到时给 5 步排查清单(上电/接反/上拉/复用器/共地) | 桥固件 + pyserial | i2c_read_reg | I2C 读寄存器("这颗 IMU 活着吗"第一动作);读回全 0 / 全 0xFF 分别给不同的成因清单,不代用户判"器件坏了" | 桥固件 + pyserial | i2c_write_reg | I2C 写寄存器,可选 verify=True 回读比对(默认关:只写寄存器回读必然不一致,默认开会造成假 FAIL);7 位地址校验拦下 8 位写地址 | 桥固件 + pyserial | spi_scan | SPI 扫描:逐 CS 读 JEDEC ID(0x9F),解厂商/容量;明说 SPI 没有地址概念,扫不到传感器/ADC 属正常;空槽(全 0/全 1)如实区分"读回全 0"和"MISO 悬空" | 桥固件 + pyserial | spi_read_reg | SPI 按命令字读 N 字节(0x9F 读 JEDEC / 传感器 WHO_AM_I 都通用) | 桥固件 + pyserial | onewire_scan | 1-Wire 搜索 ROM(AN187 算法 + CRC8 校验):列出 ROM 码并解家族码(DS18B20 等);搜不到先怀疑数据线缺 4.7k 上拉 | 桥固件 + pyserial | rs485_send | RS485 发送(桥负责 DE 时序);输出里强制写明"只证明发得出去,不证明对端收到"——不当成链路已通的证据 | 桥固件 + pyserial

总线工具需要一块跑 MCUDBG/1 桥固件的 MCU 当执行端:固件源码在 tools/bridge_fw/

(NUCLEO-H563ZI 现成,附"编译 → 烧录 → 真机验证 → 自动恢复原固件"一条龙脚本)。

为什么不自动扫串口找桥、为什么 SP-Link bridge 和 FT2232H 走不通,见 core.py 总线工具区块头注释。 |

MCP resources(16 个:8 静态 + 8 模板)

知识库只读浏览,AI 可主动引用——每类知识都是「清单 + 明细」两段:清单看有哪些,明细读原文(条目级 source 出处一并可见)。

知识库清单明细
预验证驱动mcu://driversmcu://driver/{name} · mcu://wiring/{name}(接线)
器件选型库mcu://componentsmcu://component/{name}(选型详情+接线坑)
外设 API 用法mcu://peripheralapis(取自各驱动 *_port.h,随驱动走,无独立明细资源)
引脚复用映射mcu://pinmapsmcu://pinmap/{mcu}(pinmap JSON 原文)
板级知识mcu://boardsmcu://board/{name}
错误码直译表mcu://errcodesmcu://errcode/{table}(整表 JSON 原文)
故障位域表mcu://faultbitsmcu://faultbits/{arch}(如 cortex_m,两种写法都认)
生态/框架识别mcu://ecosystemsmcu://ecosystem/{name}(如 keil、rtthread,显示名模糊匹配)

pin_check 三引擎

engine适用检查逻辑
fixed_muxF1 系列(stm32f103c8t6)固定复用表:功能默认档全局唯一,remap 档提示,SWD 挪用警告
af_tableF4 系列(stm32f411ceu6)AF 复用表:一功能可映射多脚,按表核对
io_muxESP32 系列(esp32dev)GPIO Matrix 任意路由,查硬约束:flash 保留脚(GPIO6-11,必砖级)/ 仅输入脚(GPIO34-39)/ strapping 脚(0/2/5/12/15)

可带 board 参数交叉检查板载外设占用(如 pin_check("stm32f103c8t6", {...}, board="bluepill")——PC13 被板载 LED 占用会警告)。

analyze_log 覆盖的模式(45 条)

内置 30 条:

总线/传感器层(13):MOJIBAKE 乱码→波特率 · AT_ERROR · AT_NO_RESP · BOOT_LOOP · HARDFAULT+CFSR 位级解读 · SENSOR_ZERO 全 0 · SENSOR_FF 全 FF · DS18B20_85 恒 85°C · DHT_TIMEOUT · NEG_INVALID 错误码负值 · I2C_NACK · I2C_SCAN_EMPTY 扫描零设备 · ADC_SATURATED 恒满量程

ESP 生态(5):ESP_PANIC Guru Meditation · ESP_BROWNOUT 掉电 · ESP_WDT 看门狗 · ESP_FLASH_CORRUPT 镜像损坏 · CWJAP_ERR 连 WiFi 错误码 1-4

AT/网络协议(4):AT_CME_ERROR(3GPP 码表)· NET_LINK WiFi 断链 · MQTT_FAIL(PubSubClient rc 码表)· HTTP_ERR 4xx/5xx/curl

RTOS/系统层(4):RTOS_ASSERT 断言 · RTOS_STACK_OVF 栈溢出 · HAL_ASSERT STM32 HAL 参数断言 · UART_FRAMING 帧错误/溢出

开发期报错(3):COMPILE_UNDEF 链接未定义符号 · COMPILE_SYNTAX 编译错误(gcc/Keil/armcc/MSVC)· SD_INIT_FAIL

外置 15 条(knowledge/fault_patterns.json,社区可贡献):

  • 烧录失败族(8):STLINK_CONNECT_FAIL · KEIL_NO_ALGO 找不到 Flash 算法 · KEIL_FLASH_DL_FAIL 下载失败 · OPENOCD_TARGET_FAIL · ESPTOOL_FAIL 进不了下载模式 · PYOCD_PROBE_FAIL · FLASH_READOUT_PROTECT 读保护激活 · SWD_COMM_FAIL 调试中失联
  • 总线/网络族(6,v4 新增):CAN_BUS_OFF(bus-off/error passive,终端电阻 60Ω/ACK 原理)· WIFI_RECONNECT_STORM(断连 ≥3 次计数门槛,供电头号原因)· BLE_CONN_LOST(连接参数/MTU/断开原因码 0x08/0x13)· JLINK_FAIL(克隆许可/DLL 冲突)· DNS_FAIL(DNS 配置/内网域名)· USB_ENUM_FAIL(DP 1.5kΩ 上拉/48MHz 晶振/R10)

串口报错贴进 analyze_log 一样能分析——编译报错、烧录失败日志直接粘进来就行。

预验证驱动库(9 款)

dht11(温湿度)· hcsr04(超声波)· ds18b20(单总线温度,CRC8+补码换算)· mpu6050(六轴,量程换算+静止自检)· esp8266at(AT 响应解析库,IPD 帧+错误码)· ssd1306(OLED,帧缓冲+页寻址)· servo_sg90(舵机,角度→脉宽→定时器 CCR)· stepper_28byj48(步进电机,精确减速比 63.684:1)· hc05(蓝牙 AT 助手,响应分类+命令生成)

每个驱动:纯函数与总线时序分离(PC 可测)· wiring.md(接线表+头号坑清单按翻车率排序+答辩加分点)· meta.json 如实标注验证状态。

会话持久化("记得住")

serial_open 自动在 logs/ 落盘会话日志(端口/波特率/时间戳元信息 + 全部收发内容),读写时实时追加。调试被中断、换会话、隔几天之后:sessions_list 列出历史会话 → sessions_get 回看现场 → 整段喂 analyze_log。只读文件系统下静默降级,不影响主流程。

安装

# 方式一:PyPI / pip(发布形态,src 正规包——不污染 site-packages 顶层)

pip install mcu-debug-mcp # 核心(MCP 框架) pip install "mcu-debug-mcp[all]" # + pyserial(串口)+ pyocd(调试器/RTT)

方式二:从源码目录安装

pip install .[all]

方式三:开发模式(改代码即时生效;测试/审计直接从 src/ 导入)

pip install -e .[all]

装完后用 console script 起服务(等价于 python -m mcu_debug_mcp.server)

mcu-debug-mcp

客户端配置

一键安装(Claude Code / Claude Desktop / Cursor)
# Claude Code

pip install "mcu-debug-mcp[all]" claude mcp add mcu-debug-mcp -- python -m mcu_debug_mcp.server

Claude Desktop(claude_desktop_config.json)/ Cursor(mcp.json):

{

"mcpServers": { "mcu-debug-mcp": { "command": "python", "args": ["-m", "mcu_debug_mcp.server"], "env": { "MCU_DEBUG_MCP_MODE": "readonly" } } } }

默认 readonly 档:读/枚举可用,写串口、烧录等硬件操作被拒并说明如何放开。

调试需要真机写入时再加 "MCU_DEBUG_MCP_MODE": "write" + MCU_DEBUG_MCP_PORT_DENY 锁住在用的口(见上文安全表)。

WorkBuddy(三步上手)

第 1 步:装包(本机需有 Python 3.10+;没有就让 WorkBuddy 代装,见下方提示词)

pip install "mcu-debug-

Only the beginning is shown; read the rest in the repo

Ask PopNx