Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
repositoryNoPath to the STM32Cube repository.
cubemx_homeNoPath to the STM32CubeMX installation directory. Required in the machine.json configuration file.
CUBEMX1_MACHINENoPath to the CubeMX configuration file. If not set, the server uses %USERPROFILE%\.cubemx1\machine.json.

Instructions

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

cubemx1 compiles a target JSON into a canonical STM32CubeMX 1.x .ioc offline, then CubeMX does the native generation. Flow: read resource cubemx1://protocol/target for the JSON contract, call cubemx1_ioc_build with the target, then cubemx1_ioc_generate on the written .ioc. build / import / probe_describe run offline; generate / check need a local CubeMX 1.x installation. ioc_check is for development and acceptance, not a required step for release use. Tool/transport contract: cubemx1://protocol/mcp.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
cubemx1_ioc_buildA

Compile a target JSON offline into a canonical .ioc that CubeMX loads directly. Does not start CubeMX and runs no command sequence. The target describes: device, pins and signals, peripheral modes and parameters, clock target frequencies or explicit RCC parameters, interrupts, DMA, middleware, RTOS scalar parameters, project name / output directory / toolchain. Unsupported or malformed fields are reported as unsupported/unknown/conflict and are never silently ignored.

cubemx1_ioc_checkA

[development/acceptance only, not a required step for release use] Hand the .ioc to CubeMX: load -> save as -> verify that every key the target requires is present with the same value, and scan the load log. Needs a CubeMX session; writes _roundtrip.ioc into save_dir. Normal project generation does not call it.

cubemx1_ioc_generateA

Hand the compiled .ioc to native CubeMX generation of a CMake project and check the artifacts: the startup file exists and is referenced by the project, and the target's numeric parameters appear in the generated code. Successful generation does not mean the project compiles, let alone runs on the board. Needs a CubeMX session and the firmware pack of the matching family.

cubemx1_ioc_importA

Import a .ioc into an advanced target JSON (cubemx1.ioc/2): understood objects go into advanced fields, unknown keys go into extensions.ioc and are reported one by one. Does not start CubeMX.

cubemx1_probe_describeA

Offline queries. kind=describe: device/IP definitions (modes, parameters, types and ranges, candidate values, owning RefMode and conditions, true/false/unknown under the current target), pin candidates. kind=boards/board: official ST boards (details include the seed base configuration and native BSP definitions); with board, queries and compilation share the same board context and board-level instances (instance name = board name) are queryable. kind=peripherals: every peripheral/middleware instance the device declares (with the IP type from its modes file). kind=pins: one IP's signals and their candidate pins in both directions, and with mode the leaf mode's required signals, candidate pins, must-be-explicit signals and conflicts; without mode it gives a per-mode summary. kind=clock: the device's clock topology as a graph, the upstream of one readout (view=upstream, all MUX branches and the fractional input kept), or the original clock-definition XML / one element fragment (view=raw). The clock views keep RAW facts separate from interpretation: every attribute, every condition, document order, all candidates of an ambiguous reference. Does not start CubeMX and does not solve any frequency.

cubemx1_statusA

Show the cubemx1 background process and session status. ioc_build does not need it; take a look before ioc_generate.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Target JSON protocolFull contract of the target JSON that cubemx1_ioc_build compiles: every section, required/optional fields, the cubemx1.ioc/1 vs cubemx1.ioc/2 difference, error kinds.
MCP transport and tool contractHow the host talks to this server (stdio JSON-RPC, methods, failure semantics) and what each tool promises.

TDQS

A3.8/5.0

Scored across 6 tools

Disambiguation4/5

The four .ioc tools form a clear pipeline: import converts .ioc -> target JSON, build converts target JSON -> .ioc, generate runs CubeMX project generation, and check does an acceptance round-trip. The main soft spot is check vs. generate (both involve CubeMX and touching .ioc files, distinguished mainly by the '[acceptance only]' tag) and the very broad probe_describe multiplexer, but descriptions keep them separable.

Naming Consistency3/5

All tools share the cubemx1_ prefix, but the suffix grammar is mixed: ioc_<verb> (ioc_check, ioc_generate, ioc_import, ioc_build) alongside a bare noun (status) and verb_verb (probe_describe). It reads fine in practice but is not a single predictable pattern.

Tool Count4/5

Six tools is a well-scoped surface for an offline .ioc/target-JSON toolchain, with no obviously redundant entries. Slight imbalance in that probe_describe absorbs five query kinds (describe/boards/peripherals/pins/clock) while others are single-purpose.

Completeness4/5

The set covers the full conversion lifecycle in both directions, project generation, acceptance verification, session status, and offline discovery of devices/boards/peripherals/pins/clocks. Gaps remain: no tool for editing or patching an existing target JSON (must be hand-authored), no cleanup/removal of generated artifacts, and nothing to compile or run the generated firmware.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues