jlink-mcp
Give AI hands to touch silicon.
An MCP server that lets LLMs debug embedded devices through SEGGER J-Link probes.
See it work
Real MCP tool calls against a real nRF52840-DK. Reproduce it yourself: npm run demo
Your firmware just crashed. One tool call:
> diagnose_crash
## Crash Diagnosis
### CPU State
Core: PC=0x000000B8 SP=0x2003FFA8 R0=0x0000000A R1=0x000007FF R2=0x00000001 ...
Status: XPSR=0x21000003 CONTROL=0x00000000 PRIMASK=0x00000000 ...
Stack: MSP=0x2003FFA8 PSP=0x00000000
⚠ CPU is in exception handler (IPSR=0x00000003)
### Fault Registers
CFSR=0x01000000 HFSR=0x40000000 DFSR=0x00000000 MMFAR=0xe000edf8 BFAR=0xe000edf8
### Decoded Faults
## UsageFault (UFSR):
- UNALIGNED: Unaligned memory access
## HardFault (HFSR):
- FORCED: Forced HardFault (escalated from configurable fault)
### Exception Stack Frame
R0 = 0x0000000A R1 = 0x000007FF
R12 = 0x00000000 LR = 0x000001F5
PC = 0x00000254 xPSR = 0x21000000
→ Faulting instruction at PC=0x00000254
### Recent Errors/Warnings from RTT
[WRN] sensor_drv: sample out of range, clamping seq=2
Fault decoded, exception frame unwound, faulting instruction named, and the
device's own log correlated — from one call, without a human reading a
datasheet to find out what bit 24 of CFSR means.
And it knows what the silicon is
Point it at your target's CMSIS-SVD file and peripheral registers stop being
hex:
> read_peripheral FICR
FICR @ 0x10000000
INFO.PART @ 0x10000100 = 0x00052840 (read-only)
[31:0] PART 0x52840 → N52840
INFO.RAM @ 0x1000010C = 0x00000100 (read-only)
[31:0] RAM 0x100 → K256
INFO.FLASH @ 0x10000110 = 0x00000400 (read-only)
[31:0] FLASH 0x400 → K1024
0x400 means 1024 KB of flash — but only if you know that, and an LLM guessing
at bit layouts is exactly the failure this avoids. The addresses come from the
vendor's own description, and the meanings from its enumerations.
Both transcripts are verbatim output from an nRF52840-DK in this project's
hardware test suite.
What is this?
jlink-mcp connects AI assistants (Claude, Copilot, etc.) to your embedded hardware via SEGGER J-Link debug probes using the Model Context Protocol.
Instead of manually typing J-Link commands, your AI assistant can: