← Back to ProbeCodex

Documentation

Learn how to set up and use ProbeCodex for AI-powered embedded debugging.

Getting Started

ProbeCodex is an MCP (Model Context Protocol) server that enables AI assistants to debug embedded systems. It connects your AI coding assistant to hardware debug probes, allowing natural language debugging of ARM Cortex-M microcontrollers.

Prerequisites

  • An MCP-compatible AI assistant (Claude Desktop, Cursor, VS Code with MCP support, or CLI tools)
  • A supported debug probe (J-Link, ST-LINK, CMSIS-DAP, etc.)
  • OpenOCD or PyOCD installed on your system
  • Node.js 20+ (for running the MCP server)

Quick Start

# 1. Download ProbeCodex MCP from the customer portal
→ Visit /portal/downloads
# 2. Configure your AI assistant (see MCP Client Configuration below)
# 3. Activate your license via MCP tool or CLI
MCP: license.activate(license_key: "YOUR_LICENSE_KEY")
CLI: probecodex-mcp --activate YOUR_LICENSE_KEY

Quick Install

One command downloads ProbeCodex, configures your AI client, and runs the agent setup wizard.

🍎🐧 macOS / Linux

curl -fsSL https://probecodex.com/install.sh | bash

Works on macOS (ARM & Intel) and Linux (x64). Requires sudo for install.

🪟 Windows (PowerShell)

irm https://probecodex.com/install.ps1 | iex

Run in PowerShell. Admin recommended for service installation.

Auto-Configures Your AI Client

The installer detects and configures these MCP-compatible clients (preserving your existing MCP servers):

Claude DesktopCursorCline (VS Code)Continue (VS Code)Zed

Manual Installation

macOS

# Double-click the .pkg installer
probecodex-macos-arm64.pkg
# Binaries installed to /usr/local/bin/

Signed & notarized .pkg installer for Apple Silicon (arm64) and Intel (x64). No Gatekeeper warnings.

Linux

tar -xzf probecodex-linux-x64.tar.gz
sudo mv probecodex-*/probecodex-* /usr/local/bin/

x64 binary. Works on Ubuntu, Debian, Fedora, and other distributions.

Windows

# Extract ZIP to Program Files
probecodex-agent.exe install

Extract ZIP and run agent installer as Administrator.

Debug Server Required

ProbeCodex connects to your target through OpenOCD or PyOCD. Install one of these before using ProbeCodex:

OpenOCD:brew install openocd
PyOCD:pip install pyocd

Configuration

ProbeCodex uses a configuration file (.mcp.json) to store settings. Place this file in your project root directory.

Example Configuration

{
  "gdb": {
    "host": "127.0.0.1",
    "port": 3333
  },
  "elf": "./build/firmware.elf",
  "svd": "./STM32F4xx.svd",
  "telemetry": {
    "enabled": true,
    "endpoint": "https://telemetry.probecodex.com"
  },
  "rtos": {
    "type": "freertos",
    "auto_detect": true
  }
}

Configuration Options

OptionDescriptionDefault
gdb.hostGDB server host address127.0.0.1
gdb.portGDB server port3333
elfPath to ELF file with debug symbols-
svdPath to SVD file for peripheral definitions-
telemetry.enabledEnable session telemetrytrue

MCP Client Configuration

Configure your AI assistant to use ProbeCodex MCP as an MCP server. Add the following to your MCP client configuration.

Claude Desktop (macOS)

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "probecodex": {
      "command": "/usr/local/bin/probecodex-mcp",
      "args": [],
      "env": {}
    }
  }
}

Cursor / VS Code

Edit .cursor/mcp.json or .vscode/mcp.json in your project:

{
  "mcpServers": {
    "probecodex": {
      "command": "/usr/local/bin/probecodex-mcp",
      "args": []
    }
  }
}

Windows Configuration

{
  "mcpServers": {
    "probecodex": {
      "command": "C:\\Program Files\\ProbeCodex\\probecodex-mcp.exe",
      "args": []
    }
  }
}

Linux Configuration

{
  "mcpServers": {
    "probecodex": {
      "command": "/usr/local/bin/probecodex-mcp",
      "args": []
    }
  }
}

Tip: After installing via the .pkg (macOS) or extracting the archive, binaries are in /usr/local/bin/.

MCP Tools Reference

ProbeCodex exposes 90+ debugging tools through the MCP protocol. Tools are organized by category.

🔌 Target Connection & Control

target_connect

Connect to debug server (OpenOCD/PyOCD)

target_connect_auto

Auto-detect and connect to target

target_start_openocd

Start OpenOCD with config

target_start_pyocd

Start PyOCD server

target_stop_openocd

Stop OpenOCD server

target_detect_hardware

Detect connected debug probes

target_detect_backend

Detect best debug backend

target_check_port

Check if port is in use

target_check_server_installed

Check if OpenOCD/PyOCD is installed

target_install_server

Install debug server

target_detect_openocd_variant

Detect OpenOCD variant (stock/Nuvoton)

target_check_elf_alignment

Check ELF load address alignment

Core Debug Control

core_halt

Halt CPU execution

core_run

Resume CPU execution

core_reset

Reset the CPU

📊 Memory & Registers

mem_read

Read memory at address

regs_read

Read all CPU registers

regs_read_named

Read peripheral register (via SVD)

💾 Flashing & Verification

target_flash_hex

Flash HEX/ELF to target

target_flash_hex_auto

Flash with auto-detection

target_flash_incremental

Flash only changed pages

target_verify

Verify flash contents

target_mass_erase

Erase entire flash

target_crc32_range

CRC32 of memory range

target_verify_crc_sections

Verify sections via CRC

target_write_symbol_u32

Write 32-bit value to symbol

🧵 RTOS / FreeRTOS

rtos_list_tasks

List all FreeRTOS tasks

rtos_snapshot_tasks

Detailed task snapshot with stacks

rtos_heap

Get heap information

rtos_heap_stats

Heap statistics and fragmentation

rtos_snapshot_queues

Queue fill levels

rtos_list_tasks_walk

Walk task list manually

rtos_configure_offsets

Configure TCB offsets

rtos_auto_configure_offsets

Auto-detect TCB offsets

rtos_derive_tcb_offsets

Derive offsets from ELF

rtos_threads_openocd

Get threads via OpenOCD

🗂️ SVD & Symbols

svd_load

Load SVD peripheral definitions

symbols_from_map

Get symbols from map file

symbols_nm_list

List symbols from ELF

symbols_nm_find

Find symbol in ELF

📡 Tracing (ITM/SWO)

trace_itm_enable_openocd

Enable ITM via OpenOCD

trace_itm_write_marker

Write marker to ITM

trace_itm_tail_start

Start tailing ITM file

trace_itm_tail_read

Read ITM output

trace_itm_tail_stop

Stop ITM tailing

RTT (Real-Time Transfer)

rtt_start

Start RTT session

rtt_read

Read RTT output

rtt_stop

Stop RTT session

rtt_setup_openocd

Setup RTT via OpenOCD

🔧 Debug Utilities

openocd_exec

Execute raw OpenOCD command

bt_current

Get current backtrace

board_load

Load board configuration

config_reload

Reload configuration file

🖥️ Events & Display

events_start_stream

Start event streaming

events_poll

Poll for events

events_stop_stream

Stop event streaming

epd_screen_capture

Capture e-paper display

🔑 License Management

license_activate

Activate license key

license_deactivate

Deactivate license

license_status

Check activation status

license_verify

Verify license validity

license_features

List available features

license_info

Detailed license info

🛠️ MCP Server

mcp_init

Initialize MCP server

mcp_version

Get MCP version info

mcp_check_updates

Check for updates

mcp_update

Update MCP server

mcp_cleanup_stale_processes

Clean up stale processes

📈 Telemetry (Opt-In)

Telemetry is opt-in only. When enabled, anonymized usage data helps improve ProbeCodex. No source code, file paths, or sensitive data is ever transmitted.

telemetry_enable

Enable telemetry

telemetry_disable

Disable telemetry

telemetry_status

Get telemetry status

telemetry_set_correlation_id

Set session correlation ID

What Data is Collected?

From MCP Server (via RSP Proxy)

The RSP (Remote Serial Protocol) proxy captures debug session metrics:

  • Tool call events (which tools used, duration, success/error)
  • GDB command statistics (command types, response times)
  • Hardware context (chip family, debug probe type - no serial numbers)
  • Session duration and connection events
  • RTOS detection (FreeRTOS version if detected)
From Agent

Agent operations send usage metrics:

  • Test execution events (test plan, duration, pass/fail counts)
  • MCP test results (tools tested, success rate)
  • Device sharing events (share start/stop, duration)
  • VPN connection events (connect/disconnect, duration)
  • Token usage for AI tests (for cost estimation)
Never Collected
  • Source code or file contents
  • Full file paths (only chip/board names extracted)
  • Memory contents or register values
  • Personal information or credentials
  • Debug probe serial numbers

💻 System

system_check_disk_space

Check available disk space

system_installation_info

Get installation info

emulator_check_qemu_installed

Check if QEMU is installed

emulator_install_qemu

Install QEMU emulator

🐛 Support & Bug Sessions

support_create_ticket

Create support ticket

support_start_bug_session

Start bug reproduction session

support_end_bug_session

End bug session and submit

support_list_bug_sessions

List all bug sessions

support_verify_bug_fix

Verify a bug fix

support_confirm_fix

Confirm bug is fixed

🔄 RSP Proxy

rsp_proxy_start

Start RSP proxy

rsp_proxy_stop

Stop RSP proxy

rsp_proxy_status

Get proxy status

🔗 Hardware Sharing (Team/Enterprise)

hardware_list_devices

List local & remote devices

hardware_share_device

Share device with team

hardware_connect_device

Connect to remote device

hardware_book_slot

Book time slot for device

hardware_status

Get sharing status

hardware_my_bookings

View your bookings

🤖 Agent / Test Automation

agent_get_role

Get agent role

agent_opt_in_testing

Opt in/out of automated testing

agent_get_pending_tests

Get pending tests

agent_run_test

Run a specific test

Supported Hardware

Beta Notice: Hardware compatibility is being confirmed during beta. If you encounter issues with any listed hardware, please report it so we can improve support.

Debug Probes

  • SEGGER J-Link (all models)
  • ST-LINK V2/V3
  • CMSIS-DAP compatible probes
  • Black Magic Probe
  • DAPLink
  • Raspberry Pi Debug Probe
  • Nuvoton Nu-Link-Pro

Target MCUs

  • ARM Cortex-M0/M0+/M3/M4/M7/M33
  • STM32 (all families)
  • Nordic nRF52/nRF53
  • NXP LPC/Kinetis/i.MX RT
  • Microchip SAM
  • Nuvoton M48x/M46x

Adding Custom Probes

Have a debug probe that isn't detected? Add its USB Vendor ID (VID) and Product ID (PID) to a config file:

# File: ~/.probecodex/custom-probes.json
{
  "customProbes": [
    {
      "vendorId": "1234",
      "productIds": ["5678"],
      "type": "cmsis-dap",
      "name": "My Custom Probe"
    }
  ]
}

Fields:

  • vendorId - USB VID (hex, no "0x" prefix)
  • productIds - Array of PIDs to match (optional)
  • type - One of: jlink, stlink, nulink, cmsis-dap, custom
  • name - Display name for the probe

Find VID/PID:

# macOS: system_profiler SPUSBDataType
# Linux: lsusb
# Windows: Get-PnpDevice -Class USB

Adding Custom Targets

Need to debug an MCU that isn't in the built-in list? Add it via a config file or MCP tool:

# File: ~/.probecodex/custom-targets.json
{
  "customTargets": [
    {
      "id": "my_mcu",
      "target": "stm32f4x",
      "flashBase": "0x08000000",
      "notes": "My custom board"
    }
  ]
}

Fields:

  • id - Lookup key (case-insensitive, partial match)
  • target - OpenOCD target config name (e.g., stm32f4x, numicroM4)
  • flashBase - Flash base address hex string (optional)
  • openocd - Custom OpenOCD binary path (optional)

Full custom targets documentation →

FreeRTOS Debugging

ProbeCodex has built-in support for FreeRTOS task inspection, heap analysis, and queue monitoring.

Available RTOS Tools

rtos_list_tasks

List all tasks with state, priority, and stack

rtos_snapshot_tasks

Detailed snapshot with high-water mark

rtos_heap_stats

Heap usage and fragmentation analysis

rtos_snapshot_queues

Queue fill levels and waiting tasks

FreeRTOS Configuration

For full RTOS debugging support, enable these options in your FreeRTOSConfig.h:

#define configUSE_TRACE_FACILITY           1
#define INCLUDE_uxTaskGetStackHighWaterMark 1
#define configQUEUE_REGISTRY_SIZE          16

RTT (Real-Time Transfer)

RTT provides high-speed bidirectional communication with your target without affecting real-time behavior. ProbeCodex supports RTT through both J-Link and OpenOCD.

SEGGER RTT Firmware

To use RTT, you need to include the SEGGER RTT firmware in your project. Download the RTT implementation from SEGGER:

📦

SEGGER RTT Package

Contains SEGGER_RTT.c, SEGGER_RTT.h, and configuration files for your project.

Download from SEGGER

J-Link RTT

With J-Link probes, RTT is natively supported. ProbeCodex can start and read RTT output:

rtt_start

Start RTT session with J-Link

rtt_read

Read RTT output from target

rtt_stop

Stop RTT session

OpenOCD RTT

OpenOCD also supports RTT. Use these tools to configure and read RTT via OpenOCD:

rtt_setup_openocd

Configure RTT control block search

openocd_exec

Execute OpenOCD RTT commands

OpenOCD RTT Setup

To enable RTT in OpenOCD, add these commands to your OpenOCD configuration or run them via telnet:

rtt setup 0x20000000 0x10000 "SEGGER RTT"
rtt start
rtt server start 9090 0

Replace 0x20000000 with your RAM start address and 0x10000 with your RAM size.

Adding RTT to Your Project

Include these files from the SEGGER RTT package in your project:

RTT/
├── SEGGER_RTT.c          # RTT implementation
├── SEGGER_RTT.h          # RTT header
├── SEGGER_RTT_Conf.h     # Configuration (buffers, etc.)
└── SEGGER_RTT_printf.c   # Optional printf support

Then use RTT in your code:

#include "SEGGER_RTT.h"

// Print to RTT channel 0
SEGGER_RTT_printf(0, "Hello from RTT!\n");

// Write binary data
SEGGER_RTT_Write(0, data, sizeof(data));

Troubleshooting

"Connection refused" when connecting to target

Ensure OpenOCD or PyOCD is running before connecting:

openocd -f interface/stlink.cfg -f target/stm32f4x.cfg

Verify the GDB port (default 3333) matches your configuration.

"License not activated" error

Activate your license via MCP tool or CLI:

MCP: license_activate(license_key: "YOUR_LICENSE_KEY")CLI: probecodex-mcp --activate YOUR_LICENSE_KEY

Check license status with license_status. If issues persist, check your internet connection or contact support.

RTOS tasks not detected

Ensure your ELF file is loaded and contains FreeRTOS symbols:

target_connect(elf: "./build/firmware.elf")

Enable configUSE_TRACE_FACILITY in FreeRTOSConfig.h and rebuild.

CLI Reference

CommandDescription
--activate KEYActivate license with the provided key
--deactivateDeactivate license on this machine
--check-updateCheck for available updates
serveStart the MCP server (stdio mode)
--versionShow version information
--helpShow help message

Agent One-Click Install

The ProbeCodex Agent has a fully automated one-click installer that handles authentication, VPN setup, dependencies, and system service configuration.

Installation Phases

[1/7]
Pre-flight Checks
Node.js 20+, disk space, connectivity
[2/7]
Authentication
OAuth browser or token input
[3/7]
VPN Configuration
WireGuard config from server
[4/7]
Installing Deps
WireGuard, wstunnel, OpenOCD
[5/7]
Creating Config
~/.probecodex/ directory
[6/7]
System Service
Auto-start on boot
[7/7]
Verification
Agent API + VPN + hardware check

Main Command

probecodex-agent install

Install Options

OptionDescription
--no-vpnSkip VPN configuration
--no-serviceSkip auto-start service setup
--headlessToken input mode (no browser)
--token=XXXProvide authentication token directly

Platform Installation

macOS (Apple Silicon & Intel)

# Download and run the .pkg installer from the portal
# Double-click: probecodex-macos-arm64.pkg (or macos-x64.pkg)
# Binaries are installed to /usr/local/bin/

# One-click install (handles auth, VPN, dependencies, service)
probecodex-agent install

Service location: ~/Library/LaunchAgents/com.probecodex.agent.plist

Dependencies (auto-installed via Homebrew):

  • brew install wireguard-tools
  • brew install wstunnel

🐧 Linux (Ubuntu/Debian/Fedora)

# Extract the archive from the portal
tar -xzf probecodex-linux-x64.tar.gz
sudo mv probecodex-linux-x64/probecodex-* /usr/local/bin/

# One-click install (handles auth, VPN, dependencies, service)
probecodex-agent install

Service location: ~/.config/systemd/user/probecodex-agent.service

Dependencies (auto-installed):

DistroPackage ManagerWireGuard Command
Ubuntu/Debianaptapt install wireguard-tools
Fedoradnfdnf install wireguard-tools
Archpacmanpacman -S wireguard-tools

🪟 Windows

# Download binary (PowerShell)
Invoke-WebRequest -Uri "https://droidtech.ai/downloads/probecodex-agent/latest/probecodex-agent-win-x64.exe" -OutFile "probecodex-agent.exe"

# Move to Program Files
New-Item -ItemType Directory -Force -Path "C:\Program Files\ProbeCodex"
Move-Item probecodex-agent.exe "C:\Program Files\ProbeCodex\"

# One-click install (run as Administrator)
& "C:\Program Files\ProbeCodex\probecodex-agent.exe" install

Service: Windows Task Scheduler (ProbeCodexAgent task, runs on logon)

Dependencies (auto-installed via winget or choco):

Componentwingetchoco
WireGuardwinget install WireGuard.WireGuardchoco install wireguard
wstunnelwinget install erebe.wstunnelchoco install wstunnel
OpenOCDwinget install openocdchoco install openocd

Manual Service Commands:

# Create scheduled task
schtasks /create /tn "ProbeCodexAgent" /tr "C:\Program Files\ProbeCodex\probecodex-agent.exe start" /sc onlogon /rl highest

# Start/Stop
schtasks /run /tn "ProbeCodexAgent"
schtasks /end /tn "ProbeCodexAgent"

# Remove
schtasks /delete /tn "ProbeCodexAgent" /f

What Gets Created

LocationContents
~/.probecodex/Config directory
~/.probecodex/auth.jsonJWT authentication token
~/.probecodex/agent.config.jsonAgent configuration
~/.probecodex/wg0.confWireGuard VPN config
~/.probecodex/logs/Agent logs

VPN Requirements by License

License TierVPN Required?
Free / TrialOptional (--no-vpn allowed)
Personal / ProOptional
Team / EnterpriseMandatory (required for device sharing)

VPN Configuration

The installer automatically retrieves your WireGuard VPN configuration during phase [3/7]. No manual setup is required.

Need manual access? You can also download your ProbecodexVPN.conf from Portal → Team Settings for troubleshooting or manual WireGuard setup.

Agent CLI (Test Automation)

The ProbeCodex Agent is a standalone daemon that provides three powerful automation modes: autonomous AI-powered testing, MCP server validation, and hardware device sharing over VPN.

Prerequisites & Important Notes

  • Close MCP clients first: Before running the Agent, close any AI assistants or IDEs using the MCP server (Claude Code, Cursor, Windsurf, etc.). The MCP server and Agent can conflict when competing for hardware resources (GDB, OpenOCD).
  • OpenOCD availability: Ensure OpenOCD is installed and not already running on port 3333. The Agent manages OpenOCD automatically.
  • API key for AI tests: Autonomous testing uses Claude AI and requires your own Anthropic API key (BYOK model). Requires Team or Enterprise license.
  • Telemetry: If you've opted in to telemetry, MCP test results are sent to the backend for quality monitoring.

License Availability

FeatureBasicProTeamEnterprise
MCP Test
Device Sharing (Remote OpenOCD)
Autonomous AI Testing

Agent Modes

🧪

Autonomous Test

AI-powered automated testing using Claude. Runs soak tests or regression tests on your hardware, analyzes results, and reports anomalies.

🔧

MCP Test

Validates that MCP tools are working correctly. Tests tool execution, parameter handling, and error responses.

🔗

Device Sharing

Share local debug probes with remote team members over secure VPN. Enables remote debugging without physical access.

1. Autonomous Test Mode

Runs automated AI-powered tests on your embedded target. The Agent uses Claude AI to analyze register values, memory, heap usage, and other metrics to detect anomalies.

Available Test Plans

PlanDescription
soak-testLong-running stability test. Monitors heap, tasks, and registers over time to detect memory leaks or drift.
stress-testPush hardware to limits. Rapid checks to detect failures under load.
regressionRegression testing. Compares current behavior against expected baselines to catch regressions.

Usage

# Set your Anthropic API key (required for AI analysis)
export ANTHROPIC_API_KEY=sk-ant-api03-xxxx...
# Run a soak test for 10 minutes, checking every 30 seconds
probecodex-agent test --plan=soak-test --duration=10m --interval=30s
# Run stress test for 2 minutes with rapid checks
probecodex-agent test --plan=stress-test --duration=2m --interval=30s
# Run regression test for 5 minutes
probecodex-agent test --plan=regression --duration=5m --interval=20s
# Run with Slack alerts
probecodex-agent test --plan=soak-test --duration=1h --alert-slack=https://hooks.slack.com/...

Parameters

ParameterDescription
--plan=NAMETest plan to run: soak-test, stress-test, or regression
--duration=TIMEHow long to run (e.g., 1m, 10m, 1h)
--interval=TIMETime between checks (e.g., 20s, 30s, 1m)
--prompt-file=PATHRun custom test from a prompt file
--api-key=KEYAnthropic API key (or set ANTHROPIC_API_KEY env var)
--model=MODELClaude model to use (default: claude-sonnet-4-20250514)
--alert-slack=URLSend alerts to Slack webhook URL
--alert-email=ADDRSend alerts via email
--alert-teams=URLSend alerts to Microsoft Teams webhook URL

2. MCP Test Mode

Tests the MCP server tools to ensure they're working correctly. Useful for validating your setup or after updates.

# Test MCP tools
probecodex-agent mcp test

3. Device Sharing Mode

Share your local debug probes with team members over secure VPN. This allows remote developers to debug hardware they don't have physical access to.

Starting the Agent

# Start the agent in foreground (see devices and status)
probecodex-agent start --foreground
# Start as background daemon
probecodex-agent start
# Check agent status
probecodex-agent status
# Stop the agent
probecodex-agent stop

Sharing a Device

Once the agent is running and connected to VPN, use MCP tools to share devices:

# List detected devices
hardware.list_devices
# Share a device with the team
hardware.share_device(device_id: "usb:1234:5678")
# Stop sharing
hardware.stop_sharing(device_id: "usb:1234:5678")

Connecting to Remote Device

Team members can connect to shared devices:

# List available remote devices
hardware.list_devices
# Connect to a remote device
hardware.connect_device(device_id: "remote:uuid")
# Disconnect when done
hardware.disconnect_device(device_id: "remote:uuid")

Agent CLI Commands

CommandDescription
agent startStart the agent daemon
agent start --foregroundStart in foreground (see output)
agent stopStop the agent daemon
agent statusShow agent status and connected devices
agent test --plan=NAMERun autonomous test with specified plan
agent mcp testRun MCP tools validation test

Need More Help?

Can't find what you're looking for? Our AI support can answer questions about ProbeCodex instantly.

© 2026 Droidtech 42 AI Labs AB, Org.nr 559534-0745, Stockholm. All rights reserved.