{"name":"io.github.stillsurge/mcu-debug-mcp","slug":"stillsurge-mcu-debug-mcp","title":"mcu-debug-mcp","description":"Embedded debug MCP: serial, flash verify, fault decode, 45-pattern log analyzer, driver library","url":"https://mcp.market/server/stillsurge-mcu-debug-mcp","rating":null,"grade":"A","score":91,"certified":false,"status":"active","category":"other","tags":[],"presence":{"score":29,"stars":0,"forks":0,"downloads_week":169,"last_push_at":"2026-10-23T10:37:34.000Z","license":"MIT"},"uptime":null,"claimed":false,"transport":"pypi","callable_via_gateway":false,"default_price_micros":0,"repository":"https://github.com/stillsurge/mcu-debug-mcp","website":"https://github.com/stillsurge/mcu-debug-mcp","version":"0.1.1","remotes":[],"packages":[{"registryType":"pypi","identifier":"mcu-debug-mcp","version":"0.1.1","transport":{"type":"stdio"},"environmentVariables":[{"description":"Isolation mode: readonly (default) or write. Controls whether serial write/flash operations are allowed","name":"MCU_DEBUG_MCP_MODE"},{"description":"Comma-separated port denylist (e.g. COM6,COM28); supports * wildcard; DENY overrides ALLOW","name":"MCU_DEBUG_MCP_PORT_DENY"}]}],"tools":[{"name":"analyze_log","description":"分析日志，识别 30 类常见故障模式（乱码/AT报错/反复重启/HardFault/传感器全0/全FF/ DS18B20恒85/DHT超时/I2C NACK/网络断链/ESP崩溃/掉电/看门狗/固件损坏/CWJAP错误码/ CME错误码/RTOS断言/栈溢出/链接错误/编译错误/I2C扫描空/UART帧错/HAL断言/ADC饱和/ MQTT失败/HTTP错误/SD卡失败等），每条给出人话诊断和排查步骤。 输入可以是 serial_read 的输出、用户粘贴的串口日志、编译器/链接器报错。","write_action":false,"price_micros":0,"input_schema":null},{"name":"at_sequence","description":"批量执行 AT 指令序列并逐条断言（半自动回归测试）。 steps 形如 [{\"cmd\": \"AT\", \"expect\": \"OK\", \"timeout_s\": 2}, {\"cmd\": \"AT+CWJAP?\", \"expect\": \"WIFI|ERROR\"}]（expect 是正则）。 输出每步 PASS/FAIL/TIMEOUT + 回显尾，中途失败不中断，方便一次看全。","write_action":false,"price_micros":0,"input_schema":null},{"name":"baudrate_autodetect","description":"自动探测波特率：逐档打开串口采样，按\"最像正常日志\"评分排序并给推荐。 log_text 提供现成日志样本时走离线评分（不占串口）。设备静默时会提示先复位再扫。","write_action":false,"price_micros":0,"input_schema":null},{"name":"board_get","description":"输出指定开发板的板级知识：板载外设及占用引脚、板级坑清单（按翻车率排序）、 供电说明、数据来源。如 \"bluepill\"（蓝药丸）、\"blackpill_f411\"（黑药丸）。 给用户做硬件选型/排板级坑之前先查这个。","write_action":false,"price_micros":0,"input_schema":null},{"name":"board_list","description":"列出板级知识库已收录的开发板。选板子前先看有没有现成板级坑清单。","write_action":false,"price_micros":0,"input_schema":null},{"name":"bridge_probe","description":"桥自检：问那块跑桥固件的板「你是谁、支持哪些总线」——不碰任何总线，纯握手。","write_action":false,"price_micros":0,"input_schema":null},{"name":"chip_info","description":"读目标芯片的身份与存储信息（型号 / Device ID / 修订 / Flash 容量 / UID / 读保护）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"component_get","description":"单个器件的选型详情：接口 / 地址 / 移植要求 / 头号坑 / 出厂验证记录 / 接线避坑全文。name 来自 component_list。","write_action":false,"price_micros":0,"input_schema":null},{"name":"component_list","description":"器件选型清单：按接口（i2c / uart / timer_pwm / gpio_timing）列出可用的 传感器与模块，带地址、微秒时序要求。回答\"我要做温湿度采集/测距/姿态， 用哪个现成器件\"时先查这里，别凭记忆报型号。bus 可按接口过滤（如 \"i2c\"）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"decode_fault","description":"解码 Cortex-M 故障寄存器，给出人话诊断 + 排查方向。","write_action":false,"price_micros":0,"input_schema":null},{"name":"decode_register","description":"把寄存器原始值按位域拆开解释。 fields 形如 [{\"name\":\"HSION\",\"bit\":0}, {\"name\":\"PLLSRC\",\"lsb\":16,\"width\":2}]。 手头有寄存器值不知道每个位什么意思时用。","write_action":false,"price_micros":0,"input_schema":null},{"name":"decode_register_svd","description":"用 CMSIS-SVD 文件解码寄存器位域（含枚举值提示与描述）。 svd_path 指向厂商 SVD 文件（CubeMX/固件包里有），如： decode_register_svd(\"STM32F103.svd\", \"RCC\", \"CR\", 0x00040002)","write_action":false,"price_micros":0,"input_schema":null},{"name":"driver_get","description":"输出指定驱动的接线表+完整代码+验证记录。name 来自 driver_list。 这些代码是预验证过的，直接交付用户；需要适配的只有 *_port.h。","write_action":false,"price_micros":0,"input_schema":null},{"name":"driver_list","description":"列出可用的预验证驱动模板（带出厂验证记录）。 用户要做毕设传感器部分时，先看这里有没有现成的，而不是自己写。","write_action":false,"price_micros":0,"input_schema":null},{"name":"driver_wiring","description":"查指定驱动的接线知识库：接线表、头号坑清单（按翻车率排序）、 输出日志解读、答辩加分点。回答\"XX传感器怎么接/为什么不工作\"前先查这个。","write_action":false,"price_micros":0,"input_schema":null},{"name":"ecosystem_get","description":"输出指定生态的识别特征：工程产物 / 构建配置 / 日志特征 / 常见坑。 name 用 ecosystem_list 给的 key（如 zephyr / keil / rust_defmt）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"ecosystem_list","description":"列出已收录的嵌入式生态/框架（Zephyr / RT-Thread / PlatformIO / Keil / IAR / Rust defmt）。 拿到不认识的工作目录、或一段陌生的报错时，先判断「这是哪个生态的工程」—— 识别错了，后面每一步排查都会拐到沟里。","write_action":false,"price_micros":0,"input_schema":null},{"name":"env_status","description":"环境自检：依赖 / 串口 / 烧录器 / 知识库根 / 版本，一次问清。","write_action":false,"price_micros":0,"input_schema":null},{"name":"error_code_lookup","description":"查错误码释义表（外置知识库 knowledge/error_codes/*.json，每条带出处）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"flash_firmware","description":"烧录固件到开发板（**不可逆操作，双闸门**）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"flash_tool_detect","description":"检测本机已安装的烧录工具（esptool/st-flash/pyocd/openocd）。 烧录前先调这个看有什么可用。","write_action":false,"price_micros":0,"input_schema":null},{"name":"flash_verify","description":"烧录后校验：把固件文件与芯片上实际内容**逐字节比对**（只读，走 hotplug）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"frame_parse","description":"通用二进制帧解析：按「帧头 + 长度字段」切帧，可选逐帧校验。","write_action":false,"price_micros":0,"input_schema":null},{"name":"i2c_read_reg","description":"读 I2C 从设备的寄存器（最常见的「这颗 IMU 是不是活的」动作）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"i2c_scan","description":"扫描 I2C 总线上的 7 位地址，标出每个应答地址上**可能**是什么器件。","write_action":false,"price_micros":0,"input_schema":null},{"name":"i2c_write_reg","description":"写 I2C 从设备的寄存器。data 支持 \"0x01\" / \"1,2\" / [1,2]。","write_action":true,"price_micros":0,"input_schema":null},{"name":"logs_prune","description":"会话日志的保留策略与清理入口（日志只增不减时用）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"modbus_crc","description":"计算或校验 Modbus RTU 的 CRC16（RS485 毕设必备）。 check=False：对数据部分计算 CRC；check=True：校验完整帧（数据+CRC）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"modbus_parse","description":"解析 Modbus RTU 帧：正常响应拆出寄存器值/线圈状态，异常响应（功能码|0x80） 直译异常码 01-06（非法功能/非法地址/非法值/设备故障/忙...）并给排查建议。 从站\"该响应但不响应/回了一帧看不懂\"时用它。","write_action":false,"price_micros":0,"input_schema":null},{"name":"nmea_parse","description":"解析 NMEA 0183 语句（GPS/北斗模块最常见的串口输出），给人话解读。","write_action":false,"price_micros":0,"input_schema":null},{"name":"onewire_scan","description":"1-Wire 搜索 ROM，列出总线上每颗器件的 64 位 ROM 码，并解出家族码对应的器件。","write_action":false,"price_micros":0,"input_schema":null},{"name":"parse_map","description":"解析 .map 文件：段占用（Flash/RAM）、符号表、可疑大符号（查大数组/大缓冲）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"peripheral_api_get","description":"单个驱动的外设初始化要求全文（取自其 *_port.h 适配层原注释）。 name 来自 peripheral_api_list。","write_action":false,"price_micros":0,"input_schema":null},{"name":"peripheral_api_list","description":"外设 API 用法知识层：每个驱动要占哪些外设（I2C1/TIM1/UART2…）、 初始化顺序有什么硬要求。移植驱动或排查\"外设配了但读不到数\"时先查这里。","write_action":false,"price_micros":0,"input_schema":null},{"name":"pin_check","description":"检查 MCU 引脚分配是否冲突（内置数据手册级复用映射）。 mcu 如 \"stm32f103c8t6\"；pins 如 {\"PA9\": \"USART1_TX\", \"PB6\": \"I2C1_SCL\", \"PA0\": \"GPIO\"}。 board 可选开发板名（如 \"bluepill\"）：板载外设占用的引脚再挪用会警告。 能抓：该脚没有此功能（AI 幻觉接线）、同一功能双占、SWD 脚挪用、 remap 档不匹配、非 5V 容忍脚；ESP32 类查硬约束（flash 保留脚/仅输入/strapping）。 写代码分配引脚之前必须先过一遍。","write_action":false,"price_micros":0,"input_schema":null},{"name":"pinmap_get","description":"输出指定 MCU 的 pinmap JSON 原文（全引脚复用映射 + caveats + 常见冲突提示）。 pin_check 报错后想看完整数据、或需要给用户展示映射依据时用。","write_action":false,"price_micros":0,"input_schema":null},{"name":"pinmap_list","description":"列出引脚知识库已收录的 MCU 型号。pin_check 前可用它确认型号是否支持。","write_action":false,"price_micros":0,"input_schema":null},{"name":"probe_list","description":"探测已连接的调试器（DAPLink/ST-Link/J-Link...）和目标芯片。 \"烧录失败/找不到目标芯片\"时先调这个。需要可选依赖 pyocd。","write_action":false,"price_micros":0,"input_schema":null},{"name":"project_detect","description":"识别一个**工程目录**属于哪个生态（扫标志文件：platformio.ini / *.uvprojx / prj.conf / SConstruct / *.ewp / Cargo.toml），并给出该生态的构建方式与常见坑。 拿到别人的工程压缩包、或不知道从哪下手时先跑这个。只探一层，不递归。","write_action":false,"price_micros":0,"input_schema":null},{"name":"report_session","description":"把一次串口会话导出成 **Markdown 交付报告**（故障分析 + 原始日志附后）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"reset_reason","description":"读复位原因（RCC_RSR 标志）与内核运行状态，走 hotplug：**不复位、不停内核**。","write_action":false,"price_micros":0,"input_schema":null},{"name":"rs485_send","description":"经桥的 RS485 收发器发送字节（桥负责 DE 方向脚的时序）。","write_action":true,"price_micros":0,"input_schema":null},{"name":"rtt_read","description":"通过 pyocd 的 RTT 通道读目标板调试日志（⚠ 实验性）。 固件需集成 SEGGER RTT 控制块；比 UART 快且不占串口外设。 cbuffer：控制块编号（多通道时指定，默认读全部）；probe_serial：多调试器时指定。 失败自动给排查指引，建议先 probe_list 确认调试器。","write_action":false,"price_micros":0,"input_schema":null},{"name":"serial_close","description":"关闭串口句柄。调试结束记得关，释放端口。","write_action":false,"price_micros":0,"input_schema":null},{"name":"serial_list","description":"列出系统可用串口。识别 CH340/CP2102/FT232 等常见 USB 转串口芯片并给驱动建议。 毕设学生\"串口列表里找不到板子\"时先调这个。","write_action":false,"price_micros":0,"input_schema":null},{"name":"serial_open","description":"打开串口，返回句柄 handle。port 形如 \"COM3\" 或 \"/dev/ttyUSB0\"。 波特率不确定就先用 115200（STM32 HAL 默认）或 9600（老例程/模块默认）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"serial_pair_record","description":"同时监听两个串口，输出时间线交错的录制日志（RS485 主从对话/两设备联调）。 每行前缀 [A]/[B] 标明来源口，附 HEX 视图防波特率猜错时完全看不懂。最长 120s。","write_action":false,"price_micros":0,"input_schema":null},{"name":"serial_read","description":"从串口读取数据（非阻塞，三条件提前退出）。 expect：正则，命中立即返回（如 expect=\"OK|ERROR\" 等响应）； idle_ms：静默超时（板子说完就走）； seconds：总时长上限。返回文本视图 + HEX 视图 + 是否命中。 读到的内容同时累积进会话日志。","write_action":false,"price_micros":0,"input_schema":null},{"name":"serial_send","description":"向串口发送数据并等响应。newline=True 自动追加 \\r\\ （AT 指令必须！）。 expect：正则，如 \"OK\"——发 AT 后等到 OK/ERROR 立即返回，不傻等； wait_s：等待响应上限秒数（默认 0.5，AT 慢响应建议 3~5）。 hex_mode=True 时 data 按 HEX 解析（RS485/Modbus 用）。","write_action":true,"price_micros":0,"input_schema":null},{"name":"serial_session_log","description":"取该句柄自打开以来的全部累积日志（喂给 analyze_log 做整体分析用）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"sessions_get","description":"读取指定会话日志的内容（文件名来自 sessions_list）。 默认显示尾部 200 行（日志开头常是复位前旧数据）。整段内容可直接喂 analyze_log。","write_action":false,"price_micros":0,"input_schema":null},{"name":"sessions_list","description":"列出已落盘的串口会话日志（serial_open 时自动创建，新→旧）。 会话被关闭甚至对话轮次已隔很久之后，仍可用它找回之前的串口现场。","write_action":false,"price_micros":0,"input_schema":null},{"name":"spi_read_reg","description":"发一个 SPI 命令字并读回 N 字节（对读了命令字的从设备通用）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"spi_scan","description":"逐条 CS 读 JEDEC ID（0x9F），找出板上挂的 SPI flash，并解出厂商与容量。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stack_unwind","description":"栈回溯：把 fault 时压栈的 8 个字还原成调用链，定位出错函数。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stream_capture","description":"长时录测：持续采集串口一段时间，逐行打上到达时间戳落盘。","write_action":false,"price_micros":0,"input_schema":null},{"name":"symbol_lookup","description":"把地址反查成「函数名+偏移」。fault 地址定位代码的关键一步。","write_action":false,"price_micros":0,"input_schema":null},{"name":"timing_analysis","description":"时序 / 数据率分析：找丢帧（序号跳号）、卡顿（间隔离群）、节拍漂移。","write_action":false,"price_micros":0,"input_schema":null},{"name":"toolchain_status","description":"探测**本机**嵌入式工具链：编译器（ARM GCC / armclang / RISC-V / Xtensa）、 调试器、构建系统（CMake/Ninja/west/SCons/PlatformIO/Cargo）各给版本。 换机器、或「我这能编过、换台电脑就编不过」时先看这个。烧录器用 flash_tool_detect。","write_action":false,"price_micros":0,"input_schema":null}],"scan":{"score":91,"grade":"A","scanned_at":"2026-10-24T16:17:39.160Z","report":{"scannerVersion":"0.1.10","scannedAt":"2026-10-24T16:17:39.122Z","components":{"code":{"score":25,"max":25,"notes":["39 source files scanned"]},"reliability":{"score":-1,"max":20,"notes":["no gateway calls yet and no remote to probe"]},"poisoning":{"score":-1,"max":15,"notes":["tools not inspected (local package is not executed); not counted"]},"auth":{"score":12,"max":15,"notes":["local package, no credentials required"]},"maintenance":{"score":15,"max":15,"notes":["last push 1 days ago"]},"identity":{"score":7,"max":10,"notes":["registry namespace matches repository owner"]}},"findings":[],"inputs":{"packages":[{"registryType":"pypi","identifier":"mcu-debug-mcp","version":"0.1.1","found":true,"weeklyDownloads":169,"license":"MIT","dependencyCount":5,"publishedAt":"2026-10-23T10:36:28.520232Z","repositoryUrl":"https://github.com/liujycode/mcu-debug-mcp"}],"repo":{"found":true,"owner":"stillsurge","repo":"mcu-debug-mcp","archived":false,"pushedAt":"2026-10-23T10:37:34Z","stars":0,"forks":0,"openIssues":0,"ownerType":"Organization","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/346844180?v=4","ownerCreatedAt":"2026-10-23T10:06:42Z","license":"MIT"},"icon":{"url":null,"source":"none"},"presence":{"stars":0,"forks":0,"downloadsWeek":169,"license":"MIT","lastPushAt":"2026-10-23T10:37:34.000Z","score":29}}}},"grade_history":[],"reviews":[]}