J-Link MCP

v0.8.0
io.github.Klievan/jlink-mcp Checked 5 hours ago Published 1 month ago

Debug embedded firmware on real hardware: J-Link probes, Cortex-M faults, RTT logs, GDB.

Values you need

VariableWhat it is
JLINK_DEVICErequired Target device name, exactly as J-Link spells it (e.g. nRF52840_XXAA, STM32F407VG). Use the search_devices tool to find it.
JLINK_SERIALoptional Serial number of a specific probe, when more than one is attached.
SVD_PATHoptional CMSIS-SVD file for the target. Without it, peripheral reads are undecoded hex.
JLINK_RTT_ADDRoptional Address of the firmware's _SEGGER_RTT symbol. Lets RTT survive a reset or flash.

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add jlink-mcp -e 'JLINK_DEVICE=<JLINK_DEVICE>' -- npx -y jlink-mcp@0.8.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "jlink-mcp": {
      "args": [
        "-y",
        "jlink-mcp@0.8.0"
      ],
      "command": "npx",
      "env": {
        "JLINK_DEVICE": "<JLINK_DEVICE>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "jlink-mcp": {
      "args": [
        "-y",
        "jlink-mcp@0.8.0"
      ],
      "command": "npx",
      "env": {
        "JLINK_DEVICE": "<JLINK_DEVICE>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "JLINK_DEVICE",
      "id": "jlink-device",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "jlink-mcp": {
      "args": [
        "-y",
        "jlink-mcp@0.8.0"
      ],
      "command": "npx",
      "env": {
        "JLINK_DEVICE": "${input:jlink-device}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.jlink-mcp]
command = "npx"
args = ["-y", "jlink-mcp@0.8.0"]
env = { "JLINK_DEVICE" = "<JLINK_DEVICE>" }

For AI agents

  1. Ask the user for: JLINK_DEVICE. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: list_devices, check_setup, set_svd_path, set_rtt_address, search_devices, set_device, set_serial_number, start_debug_session, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json