
Dbgprobe Mcp Server
io.github.es617由 GitHub 帳號 es617 發布v0.1.4更新於 Oct 24, 2026
Let AI agents interact with debug probes — connect, flash, read/write memory, and reset.
概覽
一個本機 MCP 伺服器,讓 AI 助理驅動 SEGGER J-Link 偵錯探針,對嵌入式目標進行燒錄、記憶體檢視、設定斷點與重置。
- 可以做什麼
- 列出探針並管理工作階段:連線、中斷連線、查看狀態、重置、暫停、繼續、單步、抹除以及向目標裝置燒錄韌體,可同時連接多個探針,各自擁有獨立工作階段。讀寫目標記憶體,設定、清除與列出斷點。掛載 ELF 檔以解析符號、依函式名稱設定斷點,並取得帶符號資訊的執行狀態。掛載 SVD 檔以依名稱讀寫周邊暫存器與欄位,支援列舉值解碼與批次欄位更新。啟動、停止、讀取與寫入 SEGGER RTT 通道,以串流方式取得目標日誌輸出。載入可提供自訂工具的 Python 外掛,並檢視每次工具呼叫的追蹤記錄。
- 適用情境
- 適合嵌入式工程師、創客、測試人員與研究人員,希望助理透過 J-Link 探針燒錄韌體、檢查暫存器與 RAM,並執行燒錄-重置-讀取的測試流程,而不必手動輸入 J-Link Commander 指令。
- 執行需求
- 以 PyPI 套件 dbgprobe-mcp-server(Python)透過 stdio 在本機執行。需要安裝 SEGGER J-Link 軟體包,JLinkExe 可自動偵測或透過 DBGPROBE_JLINK_PATH 指定,並需連接 J-Link 探針與目標板。選用環境變數可設定後端、介面、裝置型號、速度、日誌等級、外掛策略與工具名稱分隔符。OpenOCD 與 pyOCD 後端僅為規劃中。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Dbgprobe Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Debug Probe MCP Server
[MCP] [License: MIT] [Python] [Debug Probe]
A stateful debug probe Model Context Protocol (MCP) server for developer tooling and AI agents. Works out of the box with Claude Code, VS Code with Copilot, and any MCP-compatible runtime. Communicates over stdio and drives on-chip debug probes (J-Link first, OpenOCD and pyOCD planned) to flash, debug, and inspect embedded targets.
Example: Let Claude Code list attached J-Link probes, connect to your nRF52840, flash a new firmware, read memory, and reset the target — all conversationally.
Demo
Video walkthrough — connecting to a J-Link probe, flashing firmware, loading ELF and SVD for symbol-aware debugging, RTT logging, and breakpoints.
Why this exists
If you've ever typed J-Link Commander commands by hand, copy-pasted memory addresses between a datasheet and a terminal, re-flashed the same firmware 20 times during a debug session, and juggled multiple tool windows — this is for you.
You have a microcontroller on a debug probe. You want an AI agent to interact with it — connect, flash firmware, read/write memory, reset, halt, resume. This server makes that possible.
It gives any MCP-compatible agent a full set of debug probe tools. The agent calls these tools, gets structured JSON back, and reasons about what to do next — without you manually driving JLinkExe for every operation.
What agents can do with it:
- Flash and iterate — build firmware, flash it, reset, check behavior — all in one conversation
- Inspect memory — read peripheral registers, check RAM contents, verify flash writes
- Debug interactively — halt, step, set breakpoints, inspect state, resume
- Automate test flows — flash → reset → read output → validate
- Multi-probe setups — connect to multiple probes simultaneously, each with its own session
Who is this for?
- Embedded engineers — faster iteration: flash, debug, inspect memory conversationally
- Hobbyists and makers — interact with microcontrollers without learning JLinkExe command syntax
- QA and test engineers — automated flash-and-test sequences across multiple boards
- Researchers — systematic exploration of embedded systems, register inspection
Quickstart (Claude Code)
Then in Claude Code, try:
"List attached debug probes, connect to the J-Link, and read 16 bytes from address 0x20000000."
[Listing probes and connecting]
[Erasing and flashing firmware]
Supported backends
The server is backend-agnostic — tool names (dbgprobe.*) stay the same regardless of which probe you use.
J-Link requirements
Install the SEGGER J-Link Software Pack. The server auto-detects JLinkExe on PATH or in common install locations:
- macOS:
/Applications/SEGGER/JLink/ - Linux:
/opt/SEGGER/JLink/,/usr/bin/ - Windows:
C:\Program Files\SEGGER\JLink\
Or set DBGPROBE_JLINK_PATH to point to the executable directly.
This project is not affiliated with or sponsored by SEGGER. J-Link is used because it's widely available and well-supported.
Tools
See docs/tools.md for full schemas and examples.
Install (development)
MCP is a protocol — this server works with any MCP-compatible client. Below are setup instructions for the most common ones.
Add to Claude Code
Add to VS Code / Copilot
Add to your project's .vscode/mcp.json (or create it):
Adjust env to match your target — set DBGPROBE_JLINK_DEVICE to your chip, or remove it to specify the device at connect time.
Add to Cursor
Add to your project's .cursor/mcp.json (or create it). Cursor does not support dots in tool names, so DBGPROBE_MCP_TOOL_SEPARATOR must be set to _:
Environment variables
Server
J-Link backend
ELF Support
Attach an ELF file to a session to enable symbol-aware debugging:
- Symbol lookup — resolve function names to addresses and vice versa
- Breakpoints by name —
breakpoint.set(symbol="main")instead of raw addresses - Auto-enriched responses —
status,step, andhaltincludesymbol+symbol_offsetwhen an ELF is attached - Flash integration — flashing an
.elfauto-attaches it; flashing.hex/.binauto-reloads a previously attached ELF; sibling.elffiles are suggested via hints
The agent calls elf.attach, breakpoint.set(symbol="main"), go, then status — and gets back "halted at main+0" instead of a raw hex address.
[ELF symbol resolution — PC resolved to arch_cpu_idle+18]
[Breakpoint hit at main — symbol-aware debugging]
SVD Support
Attach an SVD (System View Description) file to a session to enable register-level peripheral access:
- Named register reads —
svd.read("GPIO.OUT")returns the raw value and all decoded fields with enum names - Field-level reads —
svd.read("GPIO.PIN_CNF[3].PULL")returns the field value and enum name ("PullUp") - Safe field writes —
svd.set_field("GPIO.PIN_CNF[3].PULL", "PullUp")does read-modify-write - Batch field updates —
svd.update_fields("GPIO.PIN_CNF[3]", {"DIR": "Output", "PULL": "PullUp"})— one read, one write - Raw register writes —
svd.write("GPIO.OUT", 0x01)— full register, no RMW - Discovery — list peripherals, registers, fields; describe with enums
- Auto-decode on mem.read — when an SVD is attached and
mem.readhits a known register address, the response includes decoded fields
The agent calls svd.attach, svd.read("GPIO.PIN_CNF[3]"), then svd.set_field("GPIO.PIN_CNF[3].PULL", "PullUp") — and gets back decoded field values instead of raw hex.
[SVD attached — 84 peripherals, 2332 registers]
RTT (Real-Time Transfer)
Start, stop, read, and write to SEGGER RTT channels. The agent can stream target log output and send data to the device — useful for debugging firmware that prints over RTT instead of UART.
[RTT streaming Zephyr boot log from target]
For repetitive flows — read device ID, run a self-test sequence, validate calibration — you can package them as plugins: Python modules that expose custom tools the agent can call directly. Enable with DBGPROBE_MCP_PLUGINS=all. See the nrf52_info example.
Tracing
Every tool call is traced to .dbgprobe_mcp/traces/trace.jsonl and an in-memory ring buffer (last 2000 events). Tracing is on by default — set DBGPROBE_MCP_TRACE=0 to disable.
Use dbgprobe.trace.status and dbgprobe.trace.tail to inspect the trace without reading the file directly.
Try without an agent
You can test the server interactively using the MCP Inspector:
Roadmap / TODO
- OpenOCD backend — support ST-Link, CMSIS-DAP, and other probes via OpenOCD subprocess
- pyOCD backend — native Python probe access via pyOCD library
- Multi-core support — target specific cores on multi-core SoCs
- Cortex-A/R support — ARM-mode breakpoints (
kind=4); currently Thumb-only (Cortex-M)
Known limitations
- Single-client only. The server handles one MCP session at a time (stdio transport).
- RTT channel 0 only. RTT support is limited to channel 0 (terminal). Multi-channel RTT is a future enhancement.
- Flash clears breakpoints. Flashing new firmware invalidates breakpoints (the code at those addresses may have changed). The session stays alive but breakpoints are cleared.
- Cortex-M only. Breakpoints use Thumb-mode (
kind=2). Cortex-A/R targets (ARM-mode,kind=4) are not yet supported. - Instruction-level step only.
dbgprobe.stepsingle-steps one CPU instruction. Source-level stepping (step into/over/out) is not supported.
Safety
This server connects an AI agent to real debug hardware. That's the point — and it means the stakes are higher than pure-software tools.
Plugins execute arbitrary code. When plugins are enabled, the agent can create and run Python code on your machine with full server privileges. Review agent-generated plugins before loading them.
Writes affect real hardware. A bad memory write or flash operation can brick a device, wipe calibration data, or trigger unintended behavior. Consider what the agent can reach.
Use tool approval deliberately. When your MCP client prompts you to approve a tool call, consider whether you want to allow it once or always.
This software is provided as-is under the MIT License. You are responsible for what the agent does with your hardware.
License
This project is licensed under the MIT License — see LICENSE for details.
來源:README.md,提交 738f888
工具
0版本歷史
1- v0.1.4最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分

