jlink-mcp CLAUDE.md

jlink-mcp CLAUDE.md is an instructions file for coding agents from Klievan/jlink-mcp. It costs 1,162 tokens per session, scanned A, original, MIT.

A set of instructions for a server and VS Code extension that let an AI agent work with SEGGER J-Link hardware debug probes. These probes connect to embedded devices to inspect memory, registers, crashes, and logs.

In plain words
What is it for?
It is for developing and testing embedded-device debugging tools, including register and memory access, crash diagnosis, and RTT log streaming.
Why use it?
It defines build and test rules that catch cases where a tool appears successful but silently returns missing or empty debugging data.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/klievan/jlink-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/Klievan/jlink-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jlink-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/klievan/jlink-mcp/claude-md.svg)](https://agentmods.dev/instructions/klievan/jlink-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/klievan/jlink-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/klievan/jlink-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,162 This file is loaded in full into every session.
When invoked 1,162 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01162 $0.01162
Opus 5 $0.00581 $0.00581
Sonnet 5 $0.00232 $0.00232
Haiku 4.5 $0.00116 $0.00116

Measured 5d ago against content hash a4a0090b1272, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

jlink-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

VSCode extension and standalone MCP server for SEGGER J-Link debug probes. Enables LLM-driven embedded debugging with 47 tools, RTT log streaming, and telnet proxy.

Building

npm install
npm run compile

Testing

npm test          # unit tier: ~187 tests, seconds, no hardware
npm run test:hil  # hardware tier: needs HIL=1 and a real probe; skips otherwise

Two tiers, with a deliberate flow between them. The hardware tier captures raw probe output (JLINK_MCP_LOG_RAW=1); test/golden/promote.js extracts it into test/golden/; the unit tier replays those real transcripts. So a format regression is caught in seconds on any machine, and the slow hardware run only gates merges.

Assert on parsed content, never on success === true. Every bug this project has shipped reported success while silently losing data — diagnose_crash saying "no faults detected" during real crashes, every GDB-routed tool returning empty output while the server reported itself healthy. A suite that checks the call did not error would have passed on all of them.

Do not derive tool behaviour by reasoning. J-Link parses mem's length as bare hex, rreg rejects the register names it prints as valid, GDB emits a prompt before any command is sent. Each of those cost a hardware round because it was reasoned about rather than checked. reference_jlink_gdb_quirks in memory lists the ones already paid for.

Reading a running target is impossible, not slow. The J-Link GDB Server is a synchronous remote. Use withTargetHalted() in HIL tests — the harness throws if you forget, because remembering did not work three times running.

Hardware runs on a self-hosted runner with an nRF52840-DK. Two fixtures: fixture.hex is hand-assembled with exact known instruction addresses (S1-S3 assert against them); rtt-fixture.hex is compiled C with RTT, a command channel, symbols and fault injection (S6-S7). Rebuild the latter with test/hil/fixture/build-rtt-fixture.sh — CI never builds it, so a toolchain difference cannot change what the tests run against.

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 110 lines · 1,162 tokens per session scan A a4a0090b1272

Subscribe to this mod's changes

jlink-mcp CLAUDE.md is an instructions file published in the GitHub repository Klievan/jlink-mcp (28 stars, last pushed 7d ago), licensed MIT. It adds 1,162 tokens to every session, about $0.0058 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.