jlink_mcp AGENTS.md

jlink_mcp AGENTS.md is an instructions file for Codex, OpenCode from cyj0920/jlink_mcp. It costs 2,567 tokens per session, scanned A, original, MIT.

Project instructions for jlink_mcp, an MCP server that connects an AI assistant to a J-Link hardware debugger for embedded devices.

In plain words
What is it for?
Working with embedded hardware through SWD or JTAG, including memory, Flash, debugging, registers, RTT data, and GDB Server support.
Why use it?
They explain the project structure, tools, technology choices, and development commands so changes can follow the repository's rules.

Instructions file for CodexOpenCode

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/cyj0920/jlink_mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/cyj0920/jlink_mcp

Made for: Codex, OpenCode.

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 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cyj0920/jlink_mcp/agents-md.svg)](https://agentmods.dev/instructions/cyj0920/jlink_mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/cyj0920/jlink_mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/cyj0920/jlink_mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,567 This file is loaded in full into every session.
When invoked 2,567 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.02567 $0.02567
Opus 5 $0.01283 $0.01283
Sonnet 5 $0.00513 $0.00513
Haiku 4.5 $0.00257 $0.00257

Measured 4d ago against content hash bb9f7f880d7f, 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 AGENTS.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 4d 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.

AGENTS.md · 341 lines

How it starts

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

项目概述 / Project Overview

JLink MCP 是一个基于 Model Context Protocol (MCP) 的 J-Link 调试器服务器,允许 AI 助手通过标准化接口与 J-Link 硬件调试器交互。

核心功能:

  • 设备连接管理(SWD/JTAG)
  • 内存读写操作
  • Flash 编程(擦除/烧录/校验)
  • 调试控制(暂停/运行/单步/断点)
  • SVD 寄存器解析
  • RTT 实时数据传输
  • GDB Server 支持

项目结构 / Project Structure

jlink_mcp/
├── src/jlink_mcp/           # 源代码
│   ├── server.py            # MCP 服务器主入口
│   ├── jlink_manager.py     # JLink 设备管理器(单例)
│   ├── svd_manager.py       # SVD 文件管理器(单例)
│   ├── config_manager.py    # 配置管理器(单例)
│   ├── device_patch_manager.py  # 设备补丁管理器
│   ├── gdb_server.py        # GDB Server 管理
│   ├── exceptions.py        # 自定义异常和错误码
│   ├── utils.py             # 工具函数
│   ├── models/              # Pydantic 数据模型
│   │   ├── base.py          # 基础响应模型
│   │   ├── device.py        # 设备相关模型
│   │   ├── operations.py    # 操作相关模型
│   │   └── svd.py           # SVD 解析模型
│   ├── plugins/             # 设备补丁插件
│   │   └── flagchip_patch.py # Flagchip 设备补丁
│   └── tools/               # MCP 工具函数
│       ├── connection.py    # 连接管理
│       ├── device_info.py   # 设备信息
│       ├── memory.py        # 内存操作
│       ├── flash.py         # Flash 操作
│       ├── debug.py         # 调试控制
│       ├── rtt.py           # RTT 日志
│       ├── svd.py           # SVD 寄存器
│       └── guidance.py      # 使用指南
├── tests/                   # 测试目录
│   ├── unit/                # 单元测试
│   ├── mock/                # Mock 测试
│   └── performance/         # 性能测试
├── docs/                    # 文档
├── pyproject.toml           # 项目配置
└── pytest.ini               # 测试配置

技术栈 / Tech Stack

  • Python: 3.10+
  • MCP SDK: mcp>=1.26.0
  • JLink 库: pylink-square>=2.0.0
  • 数据验证: Pydantic>=2.12.0
  • 测试: pytest>=8.0.0, pytest-asyncio, pytest-benchmark

开发命令 / Development Commands

安装

# 开发模式安装
pip install -e .

# 使用 UV 安装(推荐)
pip install uv
uv pip install -e .

# 安装开发依赖
pip install -e ".[dev]"

运行

# 启动 MCP 服务器
python -m jlink_mcp

# 或直接运行
jlink-mcp

测试

Read the full file on GitHub · 341 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. 4d ago First seen · 341 lines · 2,567 tokens per session scan A bb9f7f880d7f

Subscribe to this mod's changes

jlink_mcp AGENTS.md is an instructions file published in the GitHub repository cyj0920/jlink_mcp (33 stars, last pushed 4mo ago), licensed MIT. It adds 2,567 tokens to every session, about $0.0128 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-09-01.