Logo vun lauterbach-trace32-mcp

lauterbach-trace32-mcp

Communautéit
hsoffar

A Model Context Protocol (MCP) server that exposes

Editeurhsoffar
Repositorylauterbach-trace32-mcp
SproochPython
Forks
16
Stären
36
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    lauterbach-trace32-mcp stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    36 Stären an 16 Forks aus dem verlinkte Repository.

lauterbach-trace32-mcp

A Model Context Protocol (MCP) server that exposes Lauterbach TRACE32 debugger control as tools for AI assistants (Claude, GPT-4, etc.).

Once connected, your AI assistant can control a live TRACE32 session via natural language: set breakpoints, read registers, inspect memory, step through code, run PRACTICE scripts, and more.


Features

51 tools across 12 categories:

CategoryTools
Connectionconnect, disconnect, ping, get_state, get_message
Execution controlgo, break_, step, step_asm, step_hll, step_over, go_up, go_return
PRACTICErun_command, evaluate_function, run_practice_script
Memoryread_memory, read_memory_typed, write_memory_typed
Registersread_register, read_all_registers, write_register
Breakpointsset_breakpoint, list_breakpoints, delete_breakpoint
Variablesread_variable, write_variable
Symbolsquery_symbol_by_name, query_symbol_by_address
PRACTICE Macrosget_practice_macro, set_practice_macro
Composite / high-levelget_context, get_source_location, evaluate_expression, get_system_info, read_string, dump_memory_formatted, write_memory, backtrace, disassemble, set_breakpoint_at_symbol, run_until, snapshot, list_functions, list_global_variables, search_memory
Documentationlist_trace32_docs, search_trace32_docs
Peripheral (PER)list_per_files, load_per_file, per_read_register

MCP Resources:

  • trace32://docs/<filename> — TRACE32 PDF documentation with text extraction
  • trace32://hints — user-provided debugging tips

Structured error handling with actionable suggestions for every TRACE32 exception type.

Built-in server instructions teach the LLM TRACE32 concepts: target states, address classes, debug symbol requirements, common workflows, and useful PRACTICE functions.

Non-blocking Auto-connect startup — the server registers with the MCP client immediately and auto-connects to TRACE32 in the background. If TRACE32 is not running, the server stays available and you can connect later via the connect tool.


Prerequisites

  • Python 3.10 or later
  • Lauterbach TRACE32 with the Remote API enabled
  • lauterbach-trace32-rcl Python package (pyrcl) — install via pip:
    bash
    pip install lauterbach-trace32-rcl

Enable the TRACE32 Remote API

Add the following to your TRACE32 startup script (config.t32 or equivalent):

RCL=NETASSIST
PACKLEN=1024
PORT=20000

Restart TRACE32 after making this change.


Installation

From GitHub

bash
pip install git+https://github.com/hsoffar/lauterbach-trace32-mcp.git

From source (editable)

bash
git clone https://github.com/hsoffar/lauterbach-trace32-mcp.git
cd lauterbach-trace32-mcp
pip install -e .

Using uv

bash
uv tool install git+https://github.com/hsoffar/lauterbach-trace32-mcp.git

Usage

Run directly

bash
# Connect to TRACE32 on localhost:20000 (default)
lauterbachdebugger-mcp

# Custom host/port
lauterbachdebugger-mcp --host 192.168.1.100 --port 20000

# With TRACE32 installation path and user hints
lauterbachdebugger-mcp --t32-dir ~/t32 --hints ~/.trace32-hints.md

# Verbose logging
lauterbachdebugger-mcp -v

# Or via Python module
python -m lauterbachdebugger_mcp

CLI options

OptionShortEnv varDefaultDescription
--host-HT32_HOSTlocalhostTRACE32 hostname or IP
--port-pT32_PORT20000Remote API port
--protocolT32_PROTOCOLTCPTCP or UDP
--timeoutT32_TIMEOUT60.0Connection timeout (seconds)
--t32-dirT32SYS~/t32TRACE32 installation directory (C:\T32\ on Windows)
--hintsT32_HINTSHints file or directory (see AGENTS.md convention)
--cache-dirT32_CACHE_DIR~/.cache/lauterbach-t32-mcpPDF-to-text cache directory
--verbose-voffRepeat for more detail (-vv)

Client Configuration

Claude Code

bash
claude mcp add --transport stdio lauterbach-trace32 \
  --env T32_HOST=localhost \
  --env T32_PORT=20000 \
  --env T32SYS=~/t32 \
  --env T32_HINTS=/path/to/hints.md \
  -- lauterbachdebugger-mcp

Or using python -m (no PATH required):

bash
claude mcp add --transport stdio lauterbach-trace32 \
  --env T32_HOST=localhost \
  --env T32_PORT=20000 \
  -- python -m lauterbachdebugger_mcp

Claude Desktop

Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

json
{
  "mcpServers": {
    "lauterbach-trace32": {
      "command": "lauterbachdebugger-mcp",
      "env": {
        "T32_HOST": "localhost",
        "T32_PORT": "20000",
        "T32_PROTOCOL": "TCP",
        "T32SYS": "~/t32",
        "T32_HINTS": "/path/to/hints.md"
      }
    }
  }
}

VS Code / Cursor / Windsurf

Add to .vscode/mcp.json in your workspace (or user settings):

json
{
  "servers": {
    "lauterbach-trace32": {
      "type": "stdio",
      "command": "lauterbachdebugger-mcp",
      "env": {
        "T32_HOST": "localhost",
        "T32_PORT": "20000",
        "T32SYS": "~/t32",
        "T32_HINTS": "/path/to/hints.md"
      }
    }
  }
}

OpenAI Agents SDK (Codex)

python
from agents import Agent, MCPServerStdio
import asyncio

async def main():
    async with MCPServerStdio(
        command="lauterbachdebugger-mcp",
        env={"T32_HOST": "localhost", "T32_PORT": "20000"},
    ) as server:
        agent = Agent(name="debugger", mcp_servers=[server])
        # agent is now aware of all TRACE32 tools

asyncio.run(main())

Tool Reference

Connection

connect

Connect to a TRACE32 debugger. If a background auto-connect is still pending or has failed, cancels it and reconnects. Uses CLI defaults when parameters are omitted.

ParameterTypeDefaultDescription
nodestringlocalhostHostname or IP
portinteger20000Remote API port
protocolTCP|UDPTCPTransport protocol
timeoutnumber60.0Timeout in seconds

disconnect

Disconnect from the debugger and release resources.

ping

Verify the connection is alive.

get_state

Returns the current debug state as { state: int, state_name: string }.

ValueNameMeaning
0stoppedTarget stopped / not running
1runningTarget running
2haltedHalted at breakpoint
3background_runningRunning in background mode

get_message

Returns the last message shown in the TRACE32 message line as { text, type }.


Execution Control

All execution control tools return enriched responses with PC, function name, source file, and source line after the operation completes.

ToolDescription
goStart / resume execution
break_Halt execution
stepSingle step (HLL or ASM, context-dependent)
step_asmSingle assembly instruction step
step_hllSingle source-level (HLL) step
step_overStep over a function call
go_upRun until return from current function
go_returnImmediately return from current function

PRACTICE Commands & Scripts

run_command

Execute any TRACE32 PRACTICE command string.

run_command("SYStem.Up")
run_command("Data.dump 0x20000000")
run_command("Register.Set PC 0x0")

evaluate_function

Evaluate a PRACTICE function expression and return the result.

evaluate_function("STATE.RUN()")
evaluate_function("Register(PC)")
evaluate_function("Var.VALUE(myVar)")

run_practice_script

Run a CMM script file (blocking).

ParameterTypeRequiredDescription
script_pathstringyesPath and optional arguments, e.g. C:/init.cmm arg1
timeoutnumbernoSeconds to wait; omit to wait indefinitely

Memory

read_memory

Read raw bytes. Returns { address, length, hex, ascii }.

ParameterTypeDescription
addressstringe.g. 0x20000000 or D:0x1000 (with access class)
lengthintegerNumber of bytes

read_memory_typed

Read a typed scalar value.

ParameterTypeDescription
addressstringTarget address
typestringint8 uint8 int16 uint16 int32 uint32 int64 uint64 float double
byteorderstringlittle (default) or big

write_memory_typed

Write a typed scalar value. Same parameters as read_memory_typed plus value.


Registers

read_register

Read a single register by name. Returns { name, unit, core, value }.

ParameterTypeDescription
namestringe.g. PC, SP, LR, R0
coreintegerCore number (optional, for multi-core)

read_all_registers

Read all registers, optionally filtered by core and/or unit (CPU, FPU, VPU).

write_register

Write a value to a register.


Breakpoints

set_breakpoint

ParameterTypeDefaultDescription
addressstring—e.g. 0x08000100
typestringPROGRAMPROGRAM READ WRITE RW
implstringAUTOAUTO SOFT ONCHIP HARD MARK
sizeinteger—Size in bytes (optional)
coreinteger—Core (optional)
enabledbooleantrueWhether enabled

Returns enriched response with symbol resolution at the breakpoint address.

list_breakpoints

Returns a list of all currently set breakpoints with symbol info.

delete_breakpoint

Delete the breakpoint at the given address.


Variables

read_variable

Read a source-level variable by name. Requires debug symbols to be loaded.

read_variable("myGlobalVar")
read_variable("myModule\\myStaticVar")

write_variable

Write a value to a source-level variable. Accepts integer or float.


Symbols

query_symbol_by_name

Look up a function, variable, or label by name. Returns { name, path, address, size }.

query_symbol_by_address

Look up the symbol at a given target address.


PRACTICE Macros

get_practice_macro

Get the current value of a global PRACTICE macro variable (without the leading &).

set_practice_macro

Set the value of a global PRACTICE macro variable.


Composite / High-level Tools

These tools combine multiple TRACE32 operations into single, context-rich responses. All use graceful degradation — partial failures in sub-operations do not break the overall result.

get_context

Full CPU context snapshot: state, PC, SP, LR, current function, source location, and CPU name. Optional core parameter for multi-core targets.

get_source_location

Source file and line for an address (defaults to current PC).

evaluate_expression

Evaluate a C/C++ expression. Returns value, type, and hex representation. Supports format parameter: decimal, hex, or string.

get_system_info

Target system information: CPU name, family, endianness, power state, target state.

read_string

Read a null-terminated C string from target memory. Optional max_length (default 256).

dump_memory_formatted

Hex + ASCII memory dump (like hexdump). Optional length (default 256).

write_memory

Write raw bytes (hex string) to target memory.

backtrace

Walk the call stack and return frame information with source resolution. Optional depth (default 20).

disassemble

Disassemble instructions at an address (defaults to PC). Optional count (default 10).

set_breakpoint_at_symbol

Set a breakpoint by function or label name (e.g. main).

run_until

Run to an address or symbol with timeout. Uses temporary breakpoint. Optional timeout in seconds (default 10).

snapshot

Full state capture: context + backtrace + breakpoint list + system info. Optional include_registers (default false).

list_functions

Browse function symbols. Optional filter (wildcard), limit (default 100).

list_global_variables

Browse global variable symbols. Same parameters as list_functions.

search_memory

Search for a byte pattern in a memory range.

ParameterTypeDescription
start_addressstringStart of search range
end_addressstringEnd of search range
patternstringHex byte pattern, e.g. DEADBEEF

Documentation Tools

list_trace32_docs

List available TRACE32 PDF documentation files from the T32 installation. Optional category filter (e.g. debugger, rtos, practice).

search_trace32_docs

Search documentation filenames by keyword.


Peripheral Register Tools

list_per_files

List available .per (peripheral description) files from the T32 installation. Extracts title from ; @Title: comment in file headers. Optional filter for substring matching.

load_per_file

Load a PER file into TRACE32 via PER.Program command. Path can be absolute or relative to the T32 installation directory.

per_read_register

Read and decode a peripheral register value. Requires a PER file to be loaded first.

ParameterTypeDefaultDescription
addressstring—Register address
access_widthstringlongbyte, word, or long

MCP Resources

Documentation (trace32://docs/<filename>)

Each PDF in the T32 installation's pdf/ directory is exposed as an MCP resource. When read, the server extracts text using pdftotext if available, otherwise returns the file path.

User Hints (trace32://hints)

User-provided debugging tips loaded from --hints-dir and/or --hints-file. Hints are automatically embedded into the MCP server instructions at startup, so the LLM sees them immediately without any extra fetch. They are also available as an MCP resource (trace32://hints) for re-reading mid-session.

Configure hints via CLI flags or environment variables in your MCP client config (see examples below).

Hints file format

Create markdown files with your debugging tips:

markdown
# My TRACE32 Debugging Tips

## I2C Debugging
When debugging I2C on our custom board, always check the pull-up
resistor configuration first. Use PER.view with the I2C peripheral
file to verify SCL/SDA pin muxing.

## Flash Programming Workflow
1. Run SYStem.Up to connect
2. Load flash algorithm: FLASH.Create ...
3. Program: FLASH.Program ALL /Erase
4. Verify: Data.LOAD.ELF <file> /ComPare

Point the server at your hints with --hints-file or --hints-dir:

bash
lauterbachdebugger-mcp --hints-file ~/.trace32-hints.md
lauterbachdebugger-mcp --hints-dir ~/.trace32-hints/

Error Handling

The server provides structured error responses with actionable suggestions for every TRACE32 exception type:

ExceptionSuggestion
Not connectedCall the connect tool first
CommandErrorCheck command syntax
FunctionErrorFunction may not exist or target not halted
MemoryReadAccessErrorHalt target, check address/access class
MemoryWriteAccessErrorRegion may be read-only or protected
VariableErrorEnsure debug symbols loaded and target halted
SymbolErrorEnsure debug symbols loaded
RegisterErrorHalt target, check register name
ApiConnectionErrorConnection lost, try reconnecting
BreakpointErrorCheck address and breakpoint type

Development

bash
git clone https://github.com/hsoffar/lauterbach-trace32-mcp.git
cd lauterbach-trace32-mcp

# Install with dev dependencies
pip install -e ".[dev]"
# or with uv
uv sync --group dev

# Run tests
pytest

# Lint & type-check
ruff check src/
pyright src/

License

MIT — see LICENSE.

Installatioun

TypingMind
{
  "mcpServers": {
    "lauterbach-trace32-mcp": {
      "command": "lauterbachdebugger-mcp",
      "args": [],
      "env": {
        "T32_HOST": "<T32_HOST>",
        "T32_PORT": "<T32_PORT>"
      }
    }
  }
}

lauterbach-trace32-mcp MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal lauterbach-trace32-mcp verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

lauterbach-trace32-mcp als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu lauterbach-trace32-mcp an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "lauterbach-trace32-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu lauterbach-trace32-mcp. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu lauterbach-trace32-mcp.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat lauterbach-trace32-mcp?
lauterbach-trace32-mcp
Jo. Ech hunn et gelies.
Dat hunn ech mat lauterbach-trace32-mcp fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server lauterbach-trace32-mcp benotzt?

lauterbach-trace32-mcp ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech lauterbach-trace32-mcp MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir lauterbach-trace32-mcp mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat lauterbach-trace32-mcp MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann lauterbach-trace32-mcp verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech lauterbach-trace32-mcp MCP mat TypingMind?

lauterbach-trace32-mcp leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt lauterbach-trace32-mcp MCP an TypingMind zur Verfügung?

lauterbach-trace32-mcp stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir lauterbach-trace32-mcp MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann lauterbach-trace32-mcp eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇