Skip to main content
Glama

TRACE32 MCP Server

An MCP server that wraps Lauterbach TRACE32's public remote API (RCL) via the official lauterbach-trace32-rcl (PyRCL) package. It lets an AI agent (e.g. GitHub Copilot agent mode) drive TRACE32 PowerView for three MVP use cases:

  • Debugging — read/write memory, registers and variables; run control (go / break / step); breakpoints

  • Resource inspection — connection/run state, CPU, memory & register snapshots, PRACTICE function evaluation

  • Script execution & flash — run PRACTICE .cmm scripts, including SW target flash

Prerequisites

  • Python 3.9+

  • TRACE32 PowerView already running with the remote API (RCL) enabled. Add this to your config.t32 (blank line before/after each block):

    RCL=NETTCP
    PORT=20000

    Sanity-check it works before wiring up MCP:

    t32rem localhost PRINT VERSION.SOFTWARE()

Related MCP server: jlink-mcp

Install

pip install -e .

Configuration (environment variables)

Variable

Default

Description

T32_NODE

localhost

PowerView host

T32_PORT

20000

RCL port

T32_PROTOCOL

TCP

TCP (recommended) or UDP

T32_PACKLEN

1024

UDP packet length (ignored for TCP)

T32_TIMEOUT

10

Connection/request timeout (s)

T32_ALLOW_WRITE

false

Enables t32_write_memory, t32_write_register, t32_run_command, t32_run_script

T32_ALLOW_FLASH

false

Enables t32_flash

Safety guards

All read and debug-control tools are always available. Destructive operations are OFF by default and must be explicitly enabled:

  • T32_ALLOW_WRITE=true → memory/register writes, arbitrary command passthrough, script execution

  • T32_ALLOW_FLASH=true → flash programming (independent of T32_ALLOW_WRITE)

When a guard is closed, the tool returns an error explaining which flag to set — it never silently touches the target.

Register with GitHub Copilot (VS Code)

Workspace file .vscode/mcp.json is included. Adjust the env values (host/port, and the guard flags when you intend to write/flash), then start the server from the MCP view or the MCP: List Servers command. You can also run it standalone:

python -m trace32_mcp

Tools

Tool

Guard

Purpose

t32_status

—

Connection, run state, CPU, software build

t32_read_memory

—

Read N bytes → hex

t32_read_register / t32_list_registers

—

Read register(s)

t32_read_variable

—

Read an HLL variable/symbol

t32_eval

—

Evaluate a PRACTICE function expression

t32_go / t32_break / t32_step

—

Run control

t32_set_breakpoint / t32_clear_breakpoint / t32_list_breakpoints

—

Breakpoints

t32_write_memory / t32_write_register

ALLOW_WRITE

Write memory/register

t32_run_command

ALLOW_WRITE

Arbitrary TRACE32 command

t32_run_script

ALLOW_WRITE

Run a PRACTICE .cmm (DO)

t32_flash

ALLOW_FLASH

Program target flash via a flash .cmm

Tests

pytest

Unit tests mock PyRCL, so no running TRACE32 is required. For end-to-end checks, the TRACE32 Instruction Set Simulator can stand in for real hardware.

Roadmap (post-MVP)

Trace/CTS inspection, symbol/source browsing, multicore selection, call stack, peripheral register views, structured variable trees, multi-instance routing.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables AI agents to debug embedded systems by providing a comprehensive interface for GDB operations across multiple architectures like ARM and x86. It supports remote debugging via gdbserver or QEMU, allowing for detailed inspection of memory, registers, stack frames, and variables.
    31
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants like Claude to directly debug microcontrollers via JLink, supporting breakpoints, single-step, memory/register access, variable inspection, RTT logging, and firmware flashing.
    25
    6
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables AI assistants to debug embedded devices via SEGGER J-Link probes, including reading memory, flashing firmware, streaming RTT logs, and diagnosing crashes.
    47
    81 npm
    35
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server bridging Lauterbach TRACE32 debuggers to AI agents for autonomous debugging, providing 47 tools for execution control, breakpoints, memory, registers, variables, and symbol inspection.
    100
    12
    MIT