Skip to main content
Glama
ForeverJin

MCP Server for Segger RTT via J-Link

by ForeverJin

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JLINK_SPEEDNoSWD speed in kHz4000
RTT_CHANNELNoDefault RTT channel0
JLINK_DEVICENoTarget device nameHC32L19x
JLINK_SERIALNoJ-Link serial number
RTT_POLL_INTERVAL_MSNoPoll interval in ms10
RTT_RING_BUFFER_SIZENoRing buffer entries100

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
jlink_connectA

Connect to J-Link debugger and start RTT monitoring. Must be called before reading or writing RTT data.

jlink_disconnectA

Disconnect from J-Link debugger and stop RTT monitoring.

rtt_readB

Read accumulated RTT data from the ring buffer. Data is continuously collected by the background monitor thread. Use this to get output from the target device.

rtt_read_logA

Read the tail of the complete RTT log file. This is an independent broadcast sink (not drained by other clients), so it returns the full RTT output even while another client (e.g. the VSCode extension) is streaming via rtt_read. Prefer this over rtt_read when another consumer is active.

rtt_read_rawA

Read new bytes from the broadcast log starting at a byte offset. Non-draining and multi-consumer safe: ideal for a continuous monitor that must coexist with other readers without stealing their data. Pass the returned next_offset as 'offset' on the next call; if the log rotated (next_offset > file size), pass offset=0. Returns JSON: {"data": "...", "next_offset": N}.

rtt_writeA

Write data to RTT down-buffer (host -> device). The target device must be running RTT with a down-buffer listener.

rtt_list_devicesA

List available J-Link debuggers connected to the host.

jlink_statusA

Get current J-Link connection status and RTT buffer information.

rtt_clearA

Clear the RTT ring buffer. This does not clear the actual RTT buffers on the device.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ForeverJin/rtt_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server