vscode-cube-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ST_CUBEMX_EXE | No | Full path to the STM32CubeMX executable. Defaults to STM32CubeMX in PATH or common Windows installation locations. | STM32CubeMX |
| ST_CUBEMX_TIMEOUT | No | Timeout in seconds for the CubeMX subprocess. Default is 240. | 240 |
| ST_CUBEMX_ALLOWED_ROOTS | No | Allowed root directories for .ioc and generated paths, separated by os.pathsep (; on Windows). Defaults to the current working directory. | . |
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| cubemx_scriptA | 执行任意 CubeMX 脚本命令序列(逃生通道,原样传给 -q)。 常用命令示例: config load "C:/path/proj.ioc" set mode USART1 Asynchronous set pin PB13 GPIO_Output set gpio parameters PB13 GPIO_Label=LED config saveas "C:/path/proj.ioc" project generate |
| cubemx_loadA | 加载 .ioc 工程并回读关键配置(只读,不修改任何文件)。 参数: ioc: 工程 .ioc 文件绝对路径(须在允许目录内) |
| cubemx_configureA | 加载 .ioc,依次执行 set 命令,最后 saveas 写回原文件。 参数: ioc: 工程 .ioc 文件绝对路径(会被写回,先备份再调用) commands: 命令列表,如 ["set mode USART1 Asynchronous", "set pin PB13 GPIO_Output"] |
| cubemx_generateA | 加载 .ioc 并执行 project generate 生成 HAL 代码。 参数: ioc: 工程 .ioc 文件绝对路径 project_dir: 生成目标目录;留空则在 .ioc 所在目录生成。 强烈建议指向副本/测试目录,避免覆盖现有工程。 |
| cubemx_export_pinoutA | 加载 .ioc 并导出当前引脚配置 CSV(只读,CSV 写系统临时目录后读回)。 参数: ioc: 工程 .ioc 文件绝对路径 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool has a clear, distinct purpose: load reads config, configure applies changes, generate produces code, export_pinout exports CSV. However, cubemx_script is a catch-all escape hatch that can perform all of these operations, which creates some boundary ambiguity for agents deciding between the specific tools and the generic script runner.
All tool names follow the uniform pattern cubemx_<action>, using clear verbs like load, configure, generate, and export_pinout. The naming is perfectly consistent and predictable, with no mixed conventions or vague verbs.
The server has 5 tools, which is well within the ideal 3-15 range for a focused domain. Each tool addresses a distinct CubeMX workflow step, and the number feels appropriate without excess or deficiency.
The tool set covers the core CubeMX lifecycle: loading projects, modifying configuration, generating code, and exporting pinout. Minor gaps exist such as no dedicated tool for creating a new project from scratch or listing all settings, but these can be worked around via the catch-all script tool.