Skip to main content
Glama
phryniszak

stm32-stlink-mcp

by phryniszak

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_probesA

Lists connected ST-LINK probes via STM32_Programmer_CLI. Returns an empty list (not an error) if none are attached.

debug_connectA

Starts a debug session: spawns ST-LINK_gdbserver and arm-none-eabi-gdb (MI2), loads ELF symbols, and connects via target extended-remote.

debug_disconnectA

Cleanly tears down a debug session's gdb and ST-LINK_gdbserver child processes.

debug_session_statusA

Reports the status of one debug session (by id), or lists all active sessions if id is omitted.

flash_standaloneA

One-shot flash via STM32_Programmer_CLI — no debug session required. Fails with DEVICE_BUSY if a debug session is already open on the same probe (it holds exclusive USB access); disconnect first, or use flash_load_in_session instead.

flash_load_in_sessionA

Reflashes the currently loaded ELF via gdb's load (MI: -target-download) inside an already-open debug session. No USB conflict — ST-LINK_gdbserver retains ownership of the probe throughout.

debug_runA

Resumes (continues) the target and waits for it to stop again (e.g. a breakpoint), up to a timeout.

debug_haltB

Interrupts the running target.

debug_resetA

Resets the target via ST-LINK_gdbserver's monitor reset command, optionally resuming afterward.

debug_stepB

Steps the target: 'over' (next line, step over calls), 'into' (step into calls), or 'out' (finish the current function).

breakpoint_setB

Sets a breakpoint by file:line (e.g. main.c:42), symbol name (e.g. main), or address (e.g. *0x08000200).

breakpoint_clearA

Deletes a previously set breakpoint by its number.

breakpoint_listA

Lists breakpoints currently tracked on a session (those set via breakpoint_set).

memory_readA

Reads raw bytes from target memory at an address or symbol-address expression (e.g. '&my_global').

memory_writeA

Writes raw bytes to target RAM/registers at an address. Blocked for addresses inside the flash window (use flash_standalone / flash_load_in_session for flash) unless STMCP_ALLOW_FLASH_ADDRESS_WRITE is set.

register_readA

Reads named core registers (default: all general-purpose + sp/lr/pc/xpsr) via gdb MI.

register_writeB

Writes a value to a named core register via gdb's -gdb-set $<register>=<value>.

read_fault_registersA

One-call dump of Cortex-M SCB fault registers (CFSR/HFSR/MMFAR/BFAR/SHCSR/CPUID/ICSR) plus PC/SP/LR, with CFSR/HFSR bits decoded to flag names. Raw evidence only — no root-cause interpretation.

evaluate_expressionB

Symbol-aware expression evaluation in the current frame via gdb's -data-evaluate-expression — reads globals/locals by name, struct/array member access, pointer dereference, arithmetic, etc.

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/phryniszak/stmcp'

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