McuBuddy MCP server
io.github.cunjun/mcubuddy·v0.5.1·6 starsAI-native MCU debugging and observability through probes, symbols, RTOS, logs, and build tools.
6 stars
Reviews
Write oneNobody has reviewed McuBuddy yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
McuBuddy tools (100, 16 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
backtraceHeuristic call stack reconstruction for Cortex-M targets.
board_smoke_testwrite actionRun a generic read-only hardware sanity check for the configured board.
build_projectclear_all_breakpointsclear_breakpointcompare_elf_to_flashCompare all loadable ELF sections against actual target memory.
configure_buildSet Keil UV4 build/flash parameters. Only needed if using build_project or flash_firmware.
configure_elfSet the ELF/AXF file path for symbol resolution.
configure_keil_projectAuto-configure Keil build and ELF paths from a project path or discovery root.
configure_logSet UART log channel parameters (e.g. uart_port='COM5', uart_baudrate=115200).
configure_probeSet probe connection parameters. Run list_connected_probes first to find unique_id.
connect_with_configcontinue_targetResume target execution.
diagnoseRoute a user-level symptom to the most relevant diagnosis tool.
diagnose_clock_issuediagnose_hardfaultdiagnose_interrupt_issuediagnose_memory_corruptionScan stack and heap regions for corruption evidence.
diagnose_peripheral_stuckDiagnose why a peripheral is not working.
diagnose_stack_overflowDiagnose potential stack overflow on a Cortex-M target.
diagnose_startup_failuredisassembleDisassemble Thumb/Thumb-2 instructions at the given address.
disconnect_alldiscover_keil_projectsFind Keil project files, targets, and likely AXF/ELF outputs under a directory.
doctorwrite actionRun a read-only environment, dependency, probe, target, and config preflight.
dump_memoryRead and display memory in formatted form.
dwarf_backtraceAccurate call stack using DWARF .debug_frame CFI rules.
elf_addr_to_sourceLook up the source file and line number for a given address using DWARF .debug_line.
elf_list_functionsList all function symbols from the loaded ELF with address and size.
elf_loadelf_symbol_infoReturn address, size, type, and source location for a single symbol.
erase_flashErase target flash memory.
first_contactwrite actionRun the safest first board contact flow and suggest next debug tools.
flash_firmwareget_gdb_server_statusReturn whether the pyOCD GDB server is running and which ports it uses.
get_jlink_gdb_server_statusReturn whether the J-Link GDB server is running and which port it uses.
get_localsRead local variables and parameters at the current PC using DWARF .debug_info.
get_runtime_configget_target_infoReturn alias-match and device-patch info for a target on a given backend.
list_conditional_breakpointsList all registered conditional breakpoints in the current session.
list_connected_probesList all probes currently connected to this machine. Start here if unsure what probe to use.
list_demo_profileslist_rtos_tasksList all FreeRTOS tasks with state, priority, and stack usage.
list_supported_targetsList built-in target profiles and validation metadata for a backend.
list_tool_safetyList safety levels for public McuBuddy tools.
list_validation_recordsList machine-readable real-hardware validation records.
load_demo_profilelog_connectlog_disconnectlog_taillog_traceStep through code and record each unique source line visited.
match_chip_nameResolve a chip alias to a backend-specific target name.
memory_diffRe-read a snapshotted memory region and return a byte-level diff.
memory_findSearch a memory region for a byte pattern.
memory_snapshotCapture a memory region snapshot for later comparison.
probe_clear_all_watchpointswrite actionRemove all hardware watchpoints.
probe_connectprobe_continue_untilprobe_disconnectprobe_haltprobe_read_fpu_registersprobe_read_memoryRead bytes from target memory at the given address.
probe_read_mpu_regionsprobe_read_registersprobe_remove_watchpointwrite actionRemove a hardware watchpoint at the given address.
probe_resetprobe_resumeprobe_set_watchpointSet a hardware data watchpoint on a memory address.
probe_stepwrite actionExecute one instruction and return the new PC (with symbol if ELF is loaded).
probe_write_memorywrite actionWrite bytes to target memory. data is a list of integers (0-255).
program_flashProgram target flash memory from raw byte data.
read_cycle_counterRead the DWT cycle counter when supported by the active probe backend.
read_memory_mapReturn the Cortex-M address space layout and ELF section map.
read_rtt_logRead Segger RTT log output directly from target RAM via probe (no UART needed).
read_stack_usageScan FreeRTOS task stacks for the canary high-water mark.
read_stopped_contextread_swo_logRead bytes from the J-Link SWO host buffer when supported by the active probe backend.
read_symbol_valueRead the value of a symbol (variable, linker symbol) by name from target memory.
reset_and_traceReset the target and immediately trace execution from the reset vector.
rtos_switch_contextSwitch CPU context to a blocked or suspended FreeRTOS task.
rtos_task_contextRead the saved register context of a blocked or suspended FreeRTOS task.
run_debug_loopwrite actionrun_to_functionwrite actionSet a breakpoint on a function by name, resume, and wait for it to be hit.
run_to_sourcewrite actionRun target until execution reaches a specific source file and line number.
set_breakpointSet a breakpoint, optionally with a condition.
set_breakpoints_for_function_rangeSet breakpoints on all ELF functions whose address falls between two symbols.
set_localwrite actionWrite an integer value to a local variable by name at the current PC.
source_stepwrite actionExecute instructions until the source line changes (source-level single step).
start_gdb_serverStart a pyOCD GDB server for the configured target.
start_jlink_gdb_serverStart a J-Link GDB server for the configured target.
step_n_instructionswrite actionExecute count assembly instructions, recording PC and symbol at each step.
step_outwrite actionRun until the current function returns (step out).
step_overwrite actionExecute one source line, stepping OVER function calls (bl/blx).
stop_gdb_serverStop the active pyOCD GDB server process if one is running.
stop_jlink_gdb_serverStop the active J-Link GDB server process if one is running.
svd_list_peripheralsList all peripherals in the loaded SVD (UART, SPI, I2C, GPIO, TIM, etc.).
svd_loadLoad a CMSIS-SVD file to enable peripheral register interpretation.
verify_flashVerify target flash contents against expected raw byte data.
watch_symbolPoll a symbol's value until it changes or timeout expires.
write_symbol_valuewrite actionWrite an integer value to a symbol (variable) by name in target memory.
Public scan report
scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it
- Code scan96 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 39 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How McuBuddy compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 75% of 48,255 servers
- Tools
- 100
- the typical server has 7
- Tools that change things
- 16%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 6
- more than 85% of 28,688 servers
What its tools let an agent do: 78 read · 1 create · 14 change · 7 run or deploy
Install McuBuddy in Claude Code, Cursor or VS Code
claude mcp add mcubuddy -- uvx McuBuddy
What the publisher says
From the McuBuddy repository's README, as published. We do not edit it. Read it on GitHub
McuBuddy — AI-Powered MCU and Embedded Firmware Debugging MCP Server
<!-- mcp-name: io.github.cunjun/mcubuddy -->
Languages: English | 中文
Extend AI from firmware analysis to real MCUs, closing the loop across diagnosis, code changes, build, flashing, and validation in verified environments.
McuBuddy is a Model Context Protocol (MCP) server for MCU board-level debugging. It exposes debug probes, Keil MDK projects, ELF/DWARF symbols, CPU and memory state, SVD peripheral registers, UART/RTT logs, FreeRTOS state, Flash operations, and GDB servers as structured tools that AI assistants can call.
It is designed for firmware development, board bring-up, fault isolation, debugging automation, and AI-assisted validation.
McuBuddy starts with 19 stable tools in the default toolset. Add only the domains a workflow needs with MCUBUDDYTOOLSETS=probe,diagnose (available domains: probe, diagnose, buildflash, rtos, logs, and experimental). The core profile is the only profile; startup toolset selection is explicit and immutable.
[!IMPORTANT]
Automation does not replace engineering responsibility. Humans remain responsible for goals and
acceptance criteria, wiring and power safety, high-risk operation approval, code review, and new
environment validation. Motors, relays, and other safety-related devices also require recovery
plans and independent protection.
Quick links: Quick Start · Project Guide · Tool Reference · Support Matrix
✨ Key Features
probes; control target execution; and inspect registers, memory, breakpoints, and watchpoints.
- Real-hardware debugging: Discover and connect to ST-Link, J-Link, CMSIS-DAP, and other
MDK through UV4.exe for builds or downloads, and feed the generated AXF/ELF into debugging.
- Keil project workflow: Discover .uvprojx / .uvproj files, select a target, invoke Keil
lines, local variables, and call stacks when investigating HardFaults, startup failures, stack overflows, and memory corruption.
- Source-level fault diagnosis: Use ELF/DWARF data to resolve addresses to functions, source
FreeRTOS tasks, task contexts, and stack usage.
- Peripheral and RTOS inspection: Decode peripheral registers through CMSIS-SVD and inspect
pyOCD/J-Link GDB server lifecycles.
- Logs and runtime observability: Read UART, RTT, and selected J-Link SWO logs, and manage
continue an investigation instead of guessing code changes from symptoms alone.
- Evidence-driven results: Return structured target, state, and validation evidence so AI can
configuration problems, tool failures, and insufficient evidence, including impact and the next safe check so unsupported paths are not debugged as firmware defects.
- Actionable hardware boundaries: Distinguish MCU limitations, firmware-inapplicable tools,
🏗️ How It Works
flowchart LR
AI["AI Client<br/>Codex / Claude Code"] --> MCP["McuBuddy<br/>MCP Server"]
MCP --> EB["Execution Boundary<br/>Serialized Session"]
EB --> TOOLS["Debugging Tools<br/>Diagnostics / Symbols / SVD / RTOS / Logs"]
TOOLS --> KEIL["Keil MDK / UV4.exe<br/>Build / Optional Download"]
TOOLS --> PROBE["Probe Backends<br/>pyOCD / J-Link / probe-rs"]
KEIL --> IMAGE["AXF / ELF / HEX / BIN"]
IMAGE --> TOOLS
PROBE --> BOARD["Real MCU Board"]MCP is not a protocol for invoking Keil. The AI calls McuBuddy through MCP; McuBuddy then uses Keil MDK through UV4.exe, pyOCD, J-Link, or another internal backend as required.
🚀 Quick Start
1. Prerequisites
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
McuBuddy: common questions
- Is McuBuddy MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the McuBuddy safety report
- How do I install McuBuddy?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does McuBuddy need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is McuBuddy maintained?
- The last commit was 79 days ago (2026-08-17). The latest release is v0.5.1.
- How does McuBuddy compare with other MCP servers?
- safety score 88/100 (higher than 75% of 48,255 servers); tools 100 (the typical server has 7); tools that change things 16% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.