Skip to main content
Glama
brovk2008

STM32Cube-MCP

by brovk2008

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": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
stm32_detect_installationA

Auto-detects the STM32CubeIDE installation path and all bundled toolchains:

  • Base IDE directory and detected version

  • stm32cubeide executable and console launcher

  • headless-build script

  • STM32_Programmer_CLI executable

  • ST-LINK_gdbserver executable

  • OpenOCD executable

  • GNU ARM toolchain (arm-none-eabi-gcc, gdb, size, objcopy)

stm32_get_system_statusB

Checks the real-time operational status of STM32CubeIDE on the host system:

  • Whether the IDE GUI is currently running

  • PIDs, memory usage, and runtime of STM32 processes

  • Open STM32CubeIDE windows and dialog titles

  • Connected debug probes (ST-LINK, DFU, COM ports)

stm32_list_connected_probesA

Scans for all connected STM32 hardware interfaces and debug probes:

  • ST-LINK probes with serial numbers and firmware versions

  • STM32 devices in DFU (USB bootloader) mode

  • J-Link adapters

  • Available serial / UART COM ports

stm32_get_target_infoB

Connects to the physical STM32 microcontroller and retrieves hardware device info:

  • Device ID (e.g. 0x423 for STM32F401, 0x410 for STM32F103)

  • Device name and core architecture

  • Flash memory size

  • Connection status

stm32_launch_ideA

Opens/launches the STM32CubeIDE desktop application.

Args: workspace_path: Optional path to open a specific Eclipse workspace directory. project_path: Optional path to open a specific STM32 project. file_to_open: Optional path to a specific source file (e.g. main.c) to edit. clean: If True, passes -clean to refresh Eclipse OSGi bundles.

stm32_close_ideA

Closes running STM32CubeIDE instances.

Args: force: If True, forcefully terminates the processes. Otherwise closes gracefully.

stm32_focus_ide_windowA

Brings the STM32CubeIDE main window to the foreground and restores it if minimized.

stm32_get_ide_windowsA

Lists all open STM32CubeIDE windows, dialogs, coordinates, and window titles.

stm32_send_ide_shortcutA

Sends Eclipse keyboard shortcuts directly to the STM32CubeIDE window.

Supported actions:

  • 'build': Build active project (Ctrl+B / Cmd+B)

  • 'debug': Start debug session (F11)

  • 'run': Run target (Ctrl+F11)

  • 'step_into': Debug step into (F5)

  • 'step_over': Debug step over (F6)

  • 'step_return': Debug step return (F7)

  • 'resume': Debug resume execution (F8)

  • 'terminate': Stop/terminate debug (Ctrl+F2)

  • 'save_all': Save all open files (Ctrl+Shift+S)

  • 'open_resource': Open resource dialog (Ctrl+Shift+R)

  • 'quick_access': Focus Quick Access bar (Ctrl+3)

stm32_capture_ide_screenshotA

Captures a screenshot of the STM32CubeIDE window or desktop. Returns dimensions, base64 PNG data, and optionally saves to local file.

stm32_list_projectsA

Recursively scans a workspace or root directory and discovers all STM32 projects. Returns project names, paths, detected target MCUs, and whether .ioc files exist.

stm32_create_projectA

Scaffolds a new, ready-to-build STM32 project:

  • .project: Eclipse CDT project definition

  • .ioc: STM32CubeMX configuration file

  • Core/Src/main.c: Standard embedded main entry point with LED blink loop

  • Core/Inc/main.h: Embedded header file

  • STM32_FLASH.ld: Linker script for Flash & RAM section mappings

  • Makefile: Standalone GNU ARM build script

stm32_import_projectC

Imports an existing STM32Cube project into an Eclipse workspace headlessly.

Args: workspace_path: Path to the target workspace folder. project_dir: Path to the project root folder containing .project.

stm32_remove_projectB

Removes a project from the headless Eclipse workspace.

stm32_parse_iocA

Parses an STM32CubeMX .ioc file and returns:

  • MCU Target name & Family (e.g. STM32F4, STM32G4)

  • CPU core type (Cortex-M4, Cortex-M7, etc.)

  • System clock frequency in Hz

  • Configured GPIO pins, labels, and modes

  • Enabled IPs (USART, SPI, I2C, CAN, ADC, FreeRTOS, etc.)

stm32_update_iocA

Updates or inserts a configuration property in an STM32CubeMX .ioc file (e.g. key='RCC.SYSCLKFreq_VALUE', value='84000000').

stm32_build_projectA

Executes a headless build of a project in an STM32CubeIDE workspace using headless-build.

Args: workspace_path: Path to the Eclipse workspace folder. project_name: Specific project name to build (or None for all projects). configuration: Build configuration ('Debug' or 'Release'). clean_first: If True, performs a clean build (-cleanBuild). no_indexer: Disables Eclipse indexer during build for speed.

stm32_clean_projectC

Cleans build artifacts for a project or workspace headlessly.

stm32_get_build_artifactsB

Inspects built binaries (.elf, .hex, .bin, .map) in the project output directory. Uses arm-none-eabi-size to analyze text, data, bss sections, and calculates total Flash and RAM usage.

stm32_flash_firmwareA

Flashes firmware (.elf, .hex, or .bin) onto the target STM32 microcontroller.

Args: file_path: Path to compiled binary (.elf, .hex, .bin). address: Flash start address (required for raw .bin files, e.g. '0x08000000'). verify: Verify flash write after programming. reset: Reset target MCU after programming. port: Debug interface ('SWD', 'JTAG', 'URT', 'USB1'). freq_khz: Debug probe clock frequency in kHz. start_run: Start firmware execution immediately.

stm32_erase_flashA

Erases target flash memory.

Args: mode: 'all' for full chip mass erase, or 'sectors' with start_address and end_address. start_address: Start address (e.g. '0x08000000') for sector erase. end_address: End address (e.g. '0x08004000') for sector erase. port: Connection port ('SWD', 'JTAG', 'URT').

stm32_reset_targetA

Triggers a target MCU reset via debug probe.

Args: hard_reset: If True, pulses the hardware NRST pin (-hardRst). Otherwise software system reset. port: Connection port ('SWD', 'JTAG').

stm32_read_memoryA

Reads 32-bit words from target memory address (registers, RAM, or Flash).

Args: address: Target memory hex address (e.g. '0x08000000' or '0x40020000'). size: Number of 32-bit words to read. port: Connection interface ('SWD', 'JTAG').

stm32_write_memoryB

Writes a 32-bit word directly to a target memory address or peripheral register.

Args: address: Target address (e.g. '0x20000000'). value: Hex value to write (e.g. '0x12345678'). port: Connection interface ('SWD', 'JTAG').

stm32_read_option_bytesB

Reads device option bytes (Read Out Protection RDP, Brownout Reset BOR, Watchdog, Boot).

stm32_write_option_bytesB

Modifies hardware option bytes (e.g. options=['RDP=0xAA', 'BOR_LEV=0']).

stm32_dump_flash_to_fileB

Reads flash memory contents from the target MCU and dumps them to a local file.

stm32_start_gdb_serverA

Starts the bundled ST-LINK_gdbserver as a background process listening on specified TCP port.

Args: port: GDB TCP port (default: 61234). probe_index: ST-Link probe index to bind. verify: Verify flash write during GDB load. persistent: Keep server active between disconnects (-p).

stm32_start_openocdC

Starts OpenOCD with specified configuration scripts.

stm32_stop_gdb_serverA

Stops all running ST-LINK_gdbserver or OpenOCD processes.

stm32_run_gdb_scriptA

Executes an automated GDB batch session against target MCU using arm-none-eabi-gdb.

Args: commands: List of GDB commands (e.g. ['monitor reset halt', 'info registers', 'bt']). elf_file: Optional path to compiled .elf file with debug symbols. remote_port: Port of active GDB server (connects to localhost:). timeout_sec: Maximum execution timeout in seconds.

stm32_list_serial_portsA

Lists all available UART / COM serial ports on the host system with hardware descriptions.

stm32_read_serialB

Listens and captures incoming serial output from target UART (e.g. printf output or RTOS telemetry).

Args: port: Port name (e.g. 'COM3' or '/dev/ttyUSB0'). baudrate: Baud rate (default: 115200). timeout_sec: Listening window in seconds. max_bytes: Maximum bytes to read.

stm32_write_serialB

Sends data or AT/terminal commands to target MCU over serial port.

Args: port: Port name (e.g. 'COM3' or '/dev/ttyUSB0'). data: String to send. baudrate: Baud rate (default: 115200). append_newline: If True, appends CRLF (\r\n).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 34 tools

Disambiguation4/5

Most tools target a distinct resource and action, but a few overlaps exist: stm32_get_system_status includes connected debug probes and COM ports, which also appear in stm32_list_connected_probes and stm32_list_serial_ports. Additionally, stm32_start_openocd and stm32_start_gdb_server both start debug servers, with stm32_stop_gdb_server stopping both.

Naming Consistency5/5

All tools follow the consistent stm32_<verb>_<object> pattern with snake_case throughout, e.g. list_projects, create_project, read_memory, and write_serial. Even longer names like dump_flash_to_file and start_gdb_server fit the same predictable convention.

Tool Count2/5

At 34 tools, the server exceeds the 25-tool threshold and feels heavy for an MCP surface. The IDE-window automation cluster, serial-port listing, and debug-server controls could reasonably be consolidated without losing core functionality.

Completeness4/5

The tool set covers the full embedded workflow: project creation/import/build/flash, memory access, option bytes, serial I/O, GDB server control, and IDE automation. Minor gaps remain such as CubeMX code generation and project rename/configuration management, but agents can work around them.

Maintenance

ActivityMaintained
ResponsivenessNo issues