About Rttsh
Rttsh is an MCP server published by z3oya in the IoT category: a host-side, scriptable command-line terminal for Segger-RTT; Also the AI-ready command line for embedded validation. Conduid read 8 tools from its source: connect, disconnect, expect, get_status, list_devices, mem_read and 2 more. No package is published for it, so it installs from a source checkout.
The repository has 57 stars and 2 forks, and its last commit was on 17 Oct 2026. The latest release is v0.3.6 (3 Oct 2026): Seventh release on the 0.3.x line: the script command moves to a native Lua 5.4 engine and the scripting API gets its first major expansion - expect returns captures, an… It follows v0.3.5 (1 Oct 2026), and the 5 most recent releases go back to v0.3.2 (25 Sep 2026). Its topics include agent-skill, automation, debug, debugger, debugging and embedded.
Install
git clone https://github.com/z3oya/rttshTools (8)
connectConnect to a target over J-Link, attach RTT and take the single-instance target lock. Exactly one session exists at a time; every other tool fails until connect succeeds.disconnectDisconnect from the target and release the target lock.expectWait until the target output contains pattern (literal text), returning everything from the last consumed position through the match end. On timeout the error names the buffer tail - narrow the pattern or rtt_read first.get_statusReport the current session state: whether a target is connected, its chip, and whether the core is halted.list_devicesSearch the J-Link device database for valid chip names (substring filter). Run this before connect when unsure of the exact name.mem_readRead target memory over J-Link and return a hexdump. address is hex (0x-prefixed); width is 8, 16 or 32 bits (default 32, wider widths need an aligned address); count is the number of width units.rtt_readRead target output: everything received but not yet consumed - returned immediately when output is pending, otherwise waits up to the timeout for the first bytes. Consuming - the next rtt_read or expect starts after this text. Returns "(no output)" when the target was quiet.sendWrite one line of text to the target's RTT down channel (a newline is appended).Security checks
6 checks have not been run yet.