stm32cubemx-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stm32cubemx-mcpplan changes to enable SPI1 on my current .ioc file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
STM32CubeMX MCP
stm32cubemx-mcp is a local Model Context Protocol server that helps AI agents
turn structured embedded-system requirements into safe, testable STM32CubeMX
workflows.
Project documentation and user-facing text use ASD-STE100 Technical English.
The agent analyzes datasheets, schematics, board photos, and user requirements.
This server supplies the deterministic execution layer. It inspects the local
toolchain and .ioc files. It validates paths and configuration state. It will
also control CubeMX generation and builds.
The project is in early development. The current tools inspect, plan,
validate, and apply.ioc changes. The tools can generate a new
STM32CubeIDE project. They can also preview regeneration of an existing
project. CMake output and builds are the next implementation milestones.
Current MCP tools
cubemx_environmentdiscovers CubeMX, CubeIDE, Python, CMake, and Ninja.cubemx_list_iocfinds.iocfiles beneath an allowed directory.cubemx_inspect_iocreturns structured MCU, project, peripheral, pin, clock, and version information without changing the file.cubemx_plan_ioc_changespreviews pin, peripheral, parameter, and project changes. It returns a content hash and a unified text difference. It does not write the.iocfile.cubemx_apply_ioc_changesapplies an approved plan. It checks the source hash. It creates a backup. It replaces the source file with one atomic operation.cubemx_validate_iocruns a CubeMX load and save test on a staged copy. It checks the required IOC settings after the CubeMX save operation.cubemx_generate_projectgenerates a new STM32CubeIDE project. It validates the source IOC file. It generates files in a temporary directory. It moves a complete project to a new output directory.cubemx_plan_regenerationregenerates a temporary copy of an existing STM32CubeIDE project. It returns added, modified, and deleted files. It does not change the source project.
Related MCP server: Swarm Orchestrator
Intended workflow
flowchart LR
A["User inputs: requirements, datasheets, schematics"] --> B["AI agent: hardware intent"]
B --> C["MCP: inspect and resolve constraints"]
C --> D["MCP: plan and preview IOC changes"]
D --> E["MCP: transactional apply"]
E --> F["CubeMX CLI: validate and generate"]
F --> G["CubeIDE or CMake: build"]
G --> H["Structured diagnostics for the agent"]CubeMX's supported CLI loads MCUs, boards, and .ioc configurations and can
generate STM32CubeIDE or CMake projects. It does not expose the complete
pin/peripheral editor as a command API. For that reason, this project treats
.ioc changes as version-aware transactions and uses CubeMX as the validation
and generation authority.
See Architecture for the safety model and planned tool contract.
Codex plugin
This repository is an unofficial Codex plugin marketplace. Install the Python MCP command first:
pipx install git+https://github.com/Wafleem/stm32cubemx_mcp.gitThen add the marketplace and plugin:
codex plugin marketplace add Wafleem/stm32cubemx_mcp
codex plugin add stm32cubemx-mcp@wafleem-stm32Start a new Codex task after installation. Use /mcp to confirm that the
stm32cubemx server is connected. The plugin source is in
plugins/stm32cubemx-mcp.
Requirements
Python 3.11 or newer
STM32CubeMX for generation and validation features
STM32CubeIDE and/or a CMake ARM toolchain for build features
Windows is the first development platform. macOS on Apple silicon is a target platform and is represented in the platform abstraction and CI matrix.
Development setup
py -3.11 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -e ".[dev]"
pytestOn macOS:
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
pytestRun the stdio server with:
stm32cubemx-mcpMCP hosts should launch the server using an absolute Python or executable path. Nothing except MCP protocol messages may be written to stdout; application logs go to stderr.
Configuration
Environment variable | Purpose |
| Explicit CubeMX launcher path |
| OS-path-separated project roots the MCP may read or change |
| Maximum |
| Maximum project file count; defaults to 20,000 |
| Maximum project size; defaults to 500 MiB |
| Maximum CubeMX operation time; defaults to 120 seconds |
| Permit an explicit validation bypass; defaults to false |
When CUBEMX_MCP_ALLOWED_ROOTS is unset, access is restricted to the process's
current working directory. This default is deliberately narrow.
References
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceStateful MCP server for driving debug probes (J-Link) to flash, debug, and inspect embedded targets. Enables AI agents to perform flash, memory, breakpoint, and ELF/SVD-aware operations conversationally.Last updated418MIT
- Alicense-qualityCmaintenanceAn MCP server that extends AI coding assistants with deterministic, algorithmic capabilities such as code analysis, fault localization, and formal verification, enabling an autonomous engineering team within the IDE.Last updatedMIT
- Alicense-qualityBmaintenanceMCP server for simulating firmware on virtual microcontroller instances, allowing AI agents to upload, run, and read UART output from supported boards such as STM32 and Nordic.Last updated14MIT
- Alicense-qualityAmaintenanceMCP server for Agentic Hardware-in-the-Loop testing, enabling AI agents to probe, flash, reset, and validate embedded firmware on real hardware via bounded MCP tools.Last updated9Apache 2.0
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Wafleem/stm32cubemx_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server