jlink-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jlink-mcphalt the CPU and dump the core registers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
jlink-mcp
An MCP server that drives a SEGGER J-Link probe to debug microcontrollers: flash firmware, halt and resume the CPU, and read or write memory and core registers.
Built for use with pi and any other MCP client.
Status
The core debugging surface is implemented and the server runs end to end. What has been verified on real hardware:
jlink_status— confirmed against a J-Link V11 (S/N 941000024), reads serial number, firmware, hardware version, VTref, target current and pin states.Error paths — invalid commands and unresponsive targets produce structured, actionable tool errors rather than hangs.
Not yet verified against a live MCU, because no target board was available while this was written: flash programming, memory access and register reads exercise the same command path but have not been confirmed on silicon. Treat them as untested until you point the server at a board.
Related MCP server: dbgprobe-mcp-server
Requirements
Node.js 18 or newer.
SEGGER J-Link software installed (
JLink.exeon Windows,JLinkExeelsewhere).
Path resolution order: the JLINK_PATH environment variable, then a scan of C:\Program Files\SEGGER, C:\Program Files (x86)\SEGGER, /opt/SEGGER and /usr/local/SEGGER (including versioned JLink_V* directories, newest first).
Build
npm install
npm run buildVerify the server boots and talks to the probe:
npm run smokeThe smoke test lists the registered tools, calls jlink_status (which needs only the probe, not an MCU) and checks that a failing command surfaces as a clean error.
Configuration
All settings are environment variables; every one can also be overridden per tool call.
Variable | Default | Purpose |
| auto-detected | Full path to |
| none | Default MCU name, e.g. |
|
|
|
|
| Interface speed in kHz. |
| none | Probe serial number, for setups with several probes. |
|
| Per-invocation timeout. Raise it for large flash images. |
|
| Hard cap on captured J-Link output per invocation. |
The default timeout is deliberately below the 60 s request timeout most MCP clients apply, so a stuck operation returns a diagnosable error instead of the client giving up first.
Tools
Tool | Target needed | Purpose |
| no | Probe serial number, firmware, VTref, pin states. Start here. |
| yes | Establish a debug connection and report state. |
| yes | Halt the CPU. |
| yes | Resume the CPU. |
| yes | Reset, optionally halting after N ms. |
| yes | Single step N instructions and report PC. |
| yes | Read memory or peripheral registers at 8/16/32-bit width. |
| yes | Write values, then read back and report mismatches. |
| yes | Halt and dump core registers. |
| yes | Chip erase, or erase an address range. |
| yes | Program |
| optional | Escape hatch: run arbitrary J-Link Commander commands. |
| no | Static list of supported commands, for use with |
Addresses are hexadecimal by default — both 0x20000000 and 20000000 mean the same thing; pass a JSON number for decimal.
Using it from pi
pi's MCP gateway installs servers by URL, so a stdio server needs a small bridge. Any stdio-to-HTTP proxy works, for example:
npx -y supergateway --stdio "node dist/index.js" --port 8321 --ssethen install http://localhost:8321/sse through the gateway. Run the bridge with JLINK_DEVICE and friends set in its environment.
If your MCP client supports stdio servers directly, point it at node dist/index.js with no bridge and no arguments.
Design notes
J-Link Commander is driven in script mode, one fresh process per tool call, rather than as a long-lived interactive session. Three behaviours of J-Link 7.52 on Windows forced this:
Piped stdout is block-buffered. When stdout is not a console, output is held until the buffer fills or the process exits. An interactive session that waits for the
J-Link>prompt never receives it, so prompt-based synchronisation is impossible.Reading stdin at EOF spins forever. If a script finishes and J-Link then reads stdin, it loops printing
Unknown command— hundreds of megabytes in seconds. Every generated script therefore ends with anexitterminator so EOF is never reached, andexit-family commands are stripped from caller input so our terminator always stays last.Script files must use CRLF line endings. A LF-only script is mis-parsed.
Because each call is a fresh process, each one reconnects to the target (roughly a second). Target state that lives in silicon — halted or running — persists across calls, but nothing else does. The compensating benefit is that no session can be left in a broken state by a crashed call.
Safety rails around the J-Link process:
Hard timeout, then the process tree is killed (
taskkill /T /Fon Windows).Output capped in memory; the process is killed if it exceeds the cap.
A detector kills the process early if J-Link asks an interactive question it can never receive an answer to.
Temporary script files are always cleaned up.
Known limitations
A wrong device name fails slowly, and can fail silently. J-Link retries a failing connection for a long time, which shows up as a timeout; separately, it may substitute a different device from its own list instead of rejecting an unknown name. Confirm the device name independently.
No persistent session, so each tool call pays a connection round trip.
verifyon flash is only supported for.bin(verifybin);.hex/.elfimages rely on J-Link's own load verification.Register writes are not exposed as a dedicated tool — use
jlink_execwithw4 <reg>, <value>.The device database (
JLinkDevices.xml) is deliberately not used for pre-validation: it holds only ~241 supplementary devices, so it lacks common parts such asSTM32F407VGand would reject valid names.
Roadmap
RTT: read and stream
SEGGER_RTToutput, forprintf-style debugging without a UART.SWO: ITM trace and
printfover the SWO pin.GDB Server management, for stepping through code with a real debugger in parallel.
A persistent session, if a way to force line-buffered output on Windows turns up.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Run commands and read/write files on your servers over Termalin's keyless tunnels (hosted MCP).
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Manage repositories, users, releases, and automate GitHub workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI to directly control SEGGER J-Link embedded debug probes via the Model Context Protocol for debugging and firmware management. Users can perform tasks like reading registers, analyzing memory, flashing firmware, and tracking RTT logs using natural language commands.211MIT
- AlicenseAqualityCmaintenanceStateful MCP server for driving debug probes (J-Link) to flash, debug, and inspect embedded targets. Enables AI agents to perform flash, memory, breakpoint, and ELF/SVD-aware operations conversationally.4110MIT
- AlicenseAqualityDmaintenanceEnables AI assistants like Claude to directly debug microcontrollers via JLink, supporting breakpoints, single-step, memory/register access, variable inspection, RTT logging, and firmware flashing.255MIT
- AlicenseAqualityDmaintenanceEnables LLMs to interact with embedded devices by reading and writing Segger RTT data through a J-Link debugger.91MIT