stm32-mcp
Provides integration with the STMicroelectronics STM32 toolchain, enabling headless creation, configuration, code generation, building, cleaning, and flashing of STM32 firmware projects via CubeMX, CubeIDE, and STM32 Programmer CLI.
Click on "Deploy 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., "@stm32-mcp@stm32-mcp build the firmware in my project directory"
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.
STM32 Model Context Protocol (MCP) Server
An open-source Model Context Protocol (MCP) server that drives the official STMicroelectronics STM32 toolchain from the command line. Designed specifically for AI coding assistants—including Claude Code and Google Antigravity—enabling autonomous, reliable, and headless embedded firmware development.
Key Features
100% Headless Operation: Never launches or drives a GUI. Interacts exclusively via:
STM32CubeMXscript mode (config load,project generate,exit)stm32cubeidec.exeEclipse CDT headless builderSTM32_Programmer_CLI.exefor hardware flashing and verificationarm-none-eabi-gccandarm-none-eabi-sizefor compilation and memory analysis
Structured Compiler Diagnostics: Parses GCC outputs into typed error/warning/note objects with precise file, line, and column coordinates. Never floods context windows with megabytes of unparsed build logs.
Safety Gates: Destructive actions (
stm32_cleanandstm32_flash) require explicit confirmation (confirm: true), preventing accidental code loss or unwanted board programming.Strict User-Code Boundaries:
stm32_patch_user_codeenforces paired, non-nested, uncorrupted/* USER CODE BEGIN */and/* USER CODE END */blocks, ensuring CubeMX regeneration never erases user logic.Zero Credential Handling: Does not handle or store ST logins or scrape downloads. If a target MCU firmware package is missing, the tool returns a clear, actionable message directing the developer to download it manually from st.com.
Enforced ASCII Path Validation: ST's legacy CLI tools fail abruptly on Windows paths containing Cyrillic, spaces, or Unicode characters. This server intercepts and rejects non-ASCII paths immediately with diagnostic guidance before invoking external tools.
Related MCP server: stm32-mcp
Supported Environments
Operating Systems: Windows 10/11, macOS, Linux
AI Clients:
Claude Code (
.claude-plugin/plugin.json)Google Antigravity (
antigravity/mcp_config.json)Any MCP-compliant client (Cursor, Zed, etc.)
Tool Reference
The MCP server exposes 9 dedicated tools covering the entire embedded development lifecycle:
Tool | Parameters | Description |
|
| Checks discovery status of CubeIDE, CubeMX, Programmer CLI, GCC, and installed HAL firmware packages. |
|
| Initializes a complete STM32 project ( |
|
| Inspects and parses an existing |
|
| Idempotently updates GPIO functions, peripheral pin assignments, and labels in the |
|
| Executes CubeMX in headless script mode to generate HAL drivers and peripheral initialization code. |
|
| Safely inserts or replaces code inside matching |
|
| Builds the project headlessly using CubeIDE, extracting structured diagnostics and Flash/RAM memory sizes. |
|
| Cleans build artifacts ( |
|
| Flashes the compiled binary to hardware via ST-LINK ( |
Installation & Setup
Prerequisites
Node.js: >= 20.0.0
STM32CubeIDE: Recommended version 1.15.0 to 1.19.0 (installed at default path
C:\ST\STM32CubeIDE_*or/opt/st/stm32cubeide).STM32Cube MCU Packages: Download desired target families (e.g.
STM32Cube_FW_F1_V1.8.6) from st.com and extract into~/STM32Cube/Repository.
Build from Source
git clone https://github.com/irrumi/stm32-mcp.git
cd stm32-mcp
npm install
npm run build
npm testAI Client Configuration
Claude Code
Add the plugin manifest to your project or Claude Code configuration:
{
"mcpServers": {
"stm32": {
"command": "node",
"args": ["<PATH_TO_PLUGIN>/dist/index.js"]
}
}
}Google Antigravity
Reference the included antigravity/mcp_config.json:
{
"mcpServers": {
"stm32": {
"command": "node",
"args": ["C:/path/to/stm32-mcp/dist/index.js"]
}
}
}Load the skills/stm32-firmware/SKILL.md skill into your Antigravity skills repository:
# Windows PowerShell
Copy-Item -Recurse -Path ".\skills\stm32-firmware" -Destination "$HOME\.gemini\antigravity\skills\"Worked Walkthrough: Blinky on STM32F103 (Blue Pill)
1. Verify Environment
// Prompt: "Check STM32 toolchain health"
// Tool called: stm32_doctor
{}Response: Reports paths to stm32cubeidec.exe, STM32CubeMX.jar, STM32_Programmer_CLI.exe, arm-none-eabi-gcc, and confirms STM32Cube_FW_F1 package is present.
2. Create Project
// Prompt: "Create a new STM32F103C8 project called blinky-f103"
// Tool called: stm32_create_project
{
"name": "blinky-f103",
"mcu": "STM32F103C8Tx",
"path": "C:/projects/stm32/blinky-f103",
"debug": "swd"
}3. Assign Pin Configurations
// Prompt: "Configure PC13 as an output for the onboard LED"
// Tool called: stm32_configure_pins
{
"iocPath": "C:/projects/stm32/blinky-f103/blinky-f103.ioc",
"pins": [
{ "pin": "PC13", "mode": "GPIO_Output", "label": "LED_STATUS" }
]
}4. Headless Code Generation
// Prompt: "Generate HAL code with CubeMX"
// Tool called: stm32_generate_code
{
"projectDir": "C:/projects/stm32/blinky-f103"
}5. Insert Application Code
// Prompt: "Add non-blocking blink logic using HAL_GetTick() inside while loop"
// Tool called: stm32_patch_user_code
{
"filePath": "C:/projects/stm32/blinky-f103/Core/Src/main.c",
"marker": "WHILE",
"mode": "replace",
"content": " static uint32_t last_tick = 0;\n if (HAL_GetTick() - last_tick >= 500) {\n last_tick = HAL_GetTick();\n HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);\n }"
}6. Headless Compilation & Memory Analysis
// Prompt: "Build the Debug configuration"
// Tool called: stm32_build
{
"projectDir": "C:/projects/stm32/blinky-f103",
"configuration": "Debug"
}Structured Output:
{
"success": true,
"summary": "Build finished successfully with 0 errors and 0 warnings.",
"diagnostics": [],
"memoryUsage": {
"flashBytes": 3844,
"ramBytes": 1580,
"text": 3824,
"data": 20,
"bss": 1560
}
}7. Program Target Hardware
// Prompt: "Flash the firmware to my connected Blue Pill"
// Tool called: stm32_flash
{
"projectDir": "C:/projects/stm32/blinky-f103",
"verify": true,
"reset": true,
"confirm": true
}Architecture & Security Considerations
Process Execution: All external commands are executed using
child_process.spawnwith explicit argument arrays andshell: false. Shell interpolation is strictly prohibited.Path Sanitization: All incoming file and directory paths are validated against ASCII character sets before any filesystem or process operation.
Non-Destructive Regeneration: Code injection checks BEGIN/END balance, marker matching, duplicate detection, and nesting protection.
License
MIT © irrumi
Available Tools
9 toolsstm32_buildA
Headless build. Returns structured diagnostics: {severity, file, line, column, message} parsed out of the GCC output, plus a short summary and the flash/RAM usage from the size output. Do not dump raw logs into the model context.
| Name | Required | Description | Default |
|---|---|---|---|
| clean | No | Whether to perform clean build | |
| projectPath | Yes | Path to STM32 project directory | |
| configuration | No | Build configuration name (default: Debug) | Debug |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It clearly states the tool is headless, parses GCC output into structured diagnostics, returns a summary and flash/RAM usage from size output, and warns against raw log dumping. This gives the agent accurate expectations for execution and output.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no wasted words. 'Headless build' is front-loaded, followed by the return contract and a direct handling instruction. Every sentence contributes meaningful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The schema fully documents all three parameters, and the description supplies the return format, including diagnostics structure, summary, and size usage. Since there is no output schema, the explicit return details are especially valuable. Nothing critical for correct invocation is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so projectPath, clean, and configuration are already fully documented in the input schema. The description adds no parameter-specific meaning beyond the overall build behavior, so it meets the baseline but does not enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with 'Headless build', identifying a clear action and the STM32 project context, then explains what the tool returns: structured diagnostics, summary, and flash/RAM usage. It doesn't explicitly distinguish itself from sibling tools like stm32_clean or stm32_flash, but the core purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it: for headless builds where structured diagnostics are desired, and it explicitly tells the agent not to dump raw logs into model context. However, it doesn't contrast this tool with siblings such as stm32_clean or stm32_flash, so alternative selection is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_cleanA
Clean build artifacts. Flashing hardware and deleting files require an explicit confirm: true argument. Default is refuse.
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must pass true to confirm deletion of build folders | |
| projectPath | Yes | Path to STM32 project directory |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. It clearly reveals that deleting files requires confirm:true and that the default is refusal, which is essential for a destructive operation. The mention of 'flashing hardware' is slightly out of scope for a clean tool, but the core deletion behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded with the primary purpose. The second sentence is slightly muddied by referencing 'flashing hardware' in a clean tool, but overall it is compact and readable with no significant redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool with full schema coverage, the description plus schema is sufficient to invoke it correctly. It does not describe output or side effects beyond deletion, but the lack of an output schema makes that less critical. The main missing piece is explicit usage context, which is already scored separately.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so projectPath and confirm are already documented. The description adds that the default is 'refuse,' which merely mirrors the schema's default:false. It does not meaningfully extend parameter understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the action and target clearly: 'Clean build artifacts.' It is specific enough to distinguish from siblings like stm32_build and stm32_flash, though it does not explicitly name alternatives. It stops short of a 5 because the differentiation is implicit rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: this tool is for removing build artifacts, and the confirm warning signals that deletion requires explicit consent. However, there is no explicit when-to-use guidance or comparison with alternatives, leaving the agent to infer the appropriate context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_configure_pinsA
Patches pin config in an existing .ioc and regenerates. Idempotent.
| Name | Required | Description | Default |
|---|---|---|---|
| pins | Yes | List of pin configurations to apply or update | |
| projectPath | Yes | Path to project folder or .ioc file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and discloses the two most important behaviors: it mutates a file ('patches') and triggers a regeneration side effect. 'Idempotent' adds material safety context—re-running with the same inputs yields consistent results. It doesn't specify overwrite behavior or prerequisites, but it goes well beyond a bare 'configure pins' statement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences front-load the action ('Patches pin config in an existing .ioc') and place the idempotency note second. There is zero filler—'Patches,' 'existing .ioc,' 'regenerates,' and 'Idempotent' each carry distinct, necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The core invocation contract is present—what it patches, where, and that it regenerates—sufficient for a 2-parameter call. However, with no output schema and no annotations, gaps remain: return behavior, whether regeneration implies a build, and conflict/error handling for pin modes are all undisclosed. Adequate for basic invocation, but thin for a mutating tool with side effects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with both projectPath and pins described in the schema, so the baseline is 3. The description confirms projectPath points to an existing .ioc but adds no detail on pin naming conventions, mode values, or label usage for the nested objects, which remain undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'patches' with a precise resource ('pin config in an existing .ioc') and discloses the regeneration side effect. This clearly distinguishes it from siblings like stm32_create_project (which would not target an existing .ioc) and stm32_patch_user_code (which targets user code, not pin config).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'existing .ioc' implies this tool is for modifying already-created projects rather than initial setup, pointing away from stm32_create_project and stm32_generate_code. However, it never explicitly states when to prefer this tool over alternatives or what conditions exclude it, leaving routing mostly to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_create_projectA
Args: name, mcu (e.g. STM32F103C8Tx), path, pins[] ({pin, mode, label}), clock ({hse_hz, sysclk_hz} or a named preset), debug (swd/jtag/none). Writes a valid .ioc and generates the CubeIDE project.
| Name | Required | Description | Default |
|---|---|---|---|
| mcu | Yes | MCU part number (e.g. STM32F103C8Tx) | |
| name | Yes | Project name (e.g. blinky) | |
| path | Yes | Destination directory path for the project | |
| pins | No | Pin configurations | |
| clock | No | Clock settings | |
| debug | No | Debug interface | swd |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions that it 'writes' and 'generates' files, but does not disclose potential side effects such as overwriting existing projects, whether it is destructive, or any other state changes. This is insufficient for a tool that creates project files.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, fitting in two sentences, and is well-structured with the argument list first followed by the action. No unnecessary words or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, nested objects, enum), the description provides a sufficient high-level overview of inputs and outputs. It lacks details about presets (e.g., what clock presets are available) and does not mention return values or error cases, but these are not critical for a creation tool and are not specified in the schema either.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides full coverage (100%) with descriptions for each parameter. The description adds minor structural detail (e.g., pins[] format and clock object fields) but does not significantly enhance understanding beyond the schema. Baseline of 3 applies due to high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool's function: 'Writes a valid .ioc and generates the CubeIDE project.' It lists all arguments in a structured way and distinguishes itself from sibling tools like stm32_configure_pins or stm32_generate_code by focusing on project creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when creating a new project but does not explicitly state when to use it versus alternatives (e.g., when to use stm32_configure_pins instead). It lacks explicit guidance on context or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_doctorA
Reports resolved paths, versions, installed FW packages, and every problem found (missing package, non-ASCII home path, missing ST-LINK driver). Run this first; every other tool should suggest it on failure.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It presents the operation as a reporting/diagnostic action and enumerates concrete output categories, including problem types such as missing packages and non-ASCII home paths. It does not explicitly state 'does not modify anything,' but 'Reports' strongly implies a non-mutating health check, which is sufficient for a zero-parameter tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no filler. The first sentence front-loads exactly what the tool reports, and the second sentence gives crisp operational guidance. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless diagnostic tool with no output schema, the description is nearly complete: it lists the categories of information returned and when to run it. It leaves minor gaps such as the exact return format or how problems are represented, but an agent can reliably invoke and interpret this tool with the given information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so there are no parameter semantics to clarify. Per the baseline for 0-parameter tools, a score of 4 is appropriate; the description does not need to compensate for undocumented arguments because none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Reports' and clearly identifies the resource: the STM32 development environment's resolved paths, versions, installed firmware packages, and detected problems. It is unmistakably distinct from the sibling tools, which create, configure, generate, patch, build, clean, flash, or read projects.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage guidance: 'Run this first' and 'every other tool should suggest it on failure.' This tells the agent exactly when to invoke this tool relative to all alternatives, which is strong usage guidance for a diagnostic entry point.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_flashC
STM32_Programmer_CLI -c port=SWD -w -rst. Requires confirm: true. Default is refuse.
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Programmer interface port (default: SWD) | SWD |
| reset | No | Whether to reset target device after flashing | |
| confirm | No | Must pass true to confirm flashing to target hardware | |
| elfPath | Yes | Path to .elf binary or project folder containing Debug/*.elf |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does disclose a safety behavior: 'Default is refuse' and confirm must be true, and it exposes a reset flag (-rst). However, it does not mention that flashing overwrites target memory or other potentially destructive side effects, which is a notable gap for a hardware-programming tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely compact, conveying the operation and a key safety requirement in two short sentences. However, the command-line snippet is not front-loaded with a plain-language purpose statement, making it less accessible. Still, there is no wasted content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's destructive potential and the presence of many sibling tools, the description is incomplete. It omits prerequisites, side effects, when to invoke it in the workflow, and what happens on success or failure. The confirmation gate is helpful but does not compensate for the missing context around a hardware write operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers 100% of parameters with descriptions and defaults, so the baseline is 3. The description adds minimal semantic value: it maps port/elf/reset to command-line flags but does not explain parameters beyond what the schema already states. No extra meaning is provided for 'confirm' beyond repeating its importance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a command-line invocation ('STM32_Programmer_CLI -c port=SWD -w <elf> -rst') which implies writing an ELF to a target, but it does not explicitly state 'flash' or 'program' in natural language. It is specific to STM32 but may be opaque to an agent unfamiliar with STM32_Programmer_CLI flags, so it is more vague than clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions 'Requires confirm: true' as a necessary condition, but gives no guidance on when to use this tool versus siblings like stm32_build or stm32_generate_code. There is no mention of prerequisites (e.g., a built ELF) or use cases where flashing is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_generate_codeA
Runs CubeMX config load + project generate on an existing .ioc.
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to project directory or .ioc file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states 'generate' which implies file writing, but does not disclose potential overwriting or other side effects. It is neither fully transparent nor misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no redundancy or irrelevant content. It is well-structured and front-loads the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description is complete enough. It specifies the prerequisite (existing .ioc) and the action, though it does not explain post-generation behavior. This is acceptable given the simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides a description for the sole parameter, projectPath, indicating it can be a directory or .ioc file. Since schema coverage is 100%, the baseline is 3; the tool description adds no extra semantic beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: loading CubeMX config and generating the project. It specifies the target (an existing .ioc file) and distinguishes it from siblings like creating a new project or configuring pins.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when an existing .ioc file is present) and differentiates from creation tools. It does not explicitly mention alternatives, but the context of sibling tools and the direct wording make the usage clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_patch_user_codeA
Args: file, section (e.g. PD, 2, WHILE, 4), content, mode (replace/append). Writes only between /* USER CODE BEGIN x / and / USER CODE END x */. Must fail loudly if the markers are missing or unbalanced, and must never touch generated init functions.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Relative or absolute path to C/C++ source file | |
| mode | No | Mode: replace or append | replace |
| content | Yes | Code content to insert between markers | |
| section | Yes | Section tag identifier (e.g. 0, 1, 2, WHILE, PV, PD, Includes) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description goes well beyond the schema by disclosing that writes are strictly confined to marked regions, that it must fail loudly on missing/unbalanced markers, and that generated init functions must never be touched. Since no annotations are provided, this behavioral disclosure is especially valuable for an agent deciding whether the operation is safe.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and information-dense: it lists the arguments, states the exact write boundary, and specifies failure and safety constraints in only two sentences. Every sentence earns its place with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential invocation details, marker behavior, and failure constraints for a moderately complex patching tool. It does not describe return values or handling of non-existent files, but for a write-oriented tool with no output schema these are minor gaps given the strong behavioral guarantees provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds value by giving concrete section examples (PD, 2, WHILE, 4), clarifying the mode options, and tying the content parameter to insertion between markers, which enriches the otherwise minimal schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool writes content only between USER CODE BEGIN/END markers, giving a specific verb and resource. This distinguishes it from sibling tools like stm32_generate_code and stm32_flash, which perform broader generation or flashing operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied: use this tool to safely modify user-editable sections in STM32-generated files. However, it does not explicitly name alternatives or state when not to use it, such as when regenerating code or modifying generated initialization logic.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stm32_read_projectA
Summarises an existing project: MCU, clock tree, configured pins, enabled peripherals, whether FreeRTOS is on. Reads the .ioc, not the generated code.
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to STM32 project directory or .ioc file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden, and it does so well: 'summarises' and 'reads' convey a non-mutating, read-only operation, and the source-of-truth scope (.ioc vs generated code) is explicit. It does not disclose failure behavior for invalid paths or missing .ioc files, but for a simple inspection tool these omissions are minor.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences of roughly 25 words total, with the action and output list front-loaded and the scope clarification second. Every clause earns its place; there is no filler, repetition, or redundant restating of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity tool with one parameter, no enums, and no output schema, the description is nearly complete: it states the action, the input, the data source, and the content of the summary, which partially compensates for the missing output schema. It omits edge-case behavior (missing .ioc, invalid project) and exact return format, but nothing essential to a correct first invocation is absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameter is fully documented structurally. The description adds only marginal nuance — 'existing project' implies a precondition that the path must already point to a real project, and 'Reads the .ioc' reinforces the schema's .ioc-file option. This is a small addition over the baseline set by complete schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Summarises') against a specific resource ('an existing project') and enumerates the exact deliverables: MCU, clock tree, configured pins, enabled peripherals, FreeRTOS status. It further distinguishes itself from siblings by scoping the input source to the .ioc file, making it clearly the inspection tool among create/configure/generate/build/flash peers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The clause 'Reads the .ioc, not the generated code' gives a clear when-not boundary and implies this is the inspect-before-modifying step in the STM32 workflow. It does not explicitly name alternative tools for inspecting generated code, so it falls short of full sibling routing, but the context is strong enough for an agent to place it correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v1.0.0- First observed
stm32_build - First observed
stm32_clean - First observed
stm32_configure_pins - First observed
stm32_create_project - First observed
stm32_doctor - First observed
stm32_flash - First observed
stm32_generate_code - First observed
stm32_patch_user_code - First observed
stm32_read_project
TDQS
Scored across 9 tools
Each tool maps to a distinct lifecycle phase: diagnose, create, configure pins, generate, patch user code, build, clean, flash, and read project state. Even create_project and generate_code are clearly separated by whether an .ioc already exists, so an agent can select appropriately.
All tools share a consistent stm32_ prefix and use snake_case, with the majority following verb_noun pattern (create_project, configure_pins, generate_code, patch_user_code, read_project). The stm32_doctor name is the main deviation, since it is noun-like rather than verb_object, but it remains recognizable and consistent with the set's style.
The set has 9 tools, which is well within the ideal range and matches the server's stated purpose of covering an STM32 project workflow from diagnostics through flashing. Each tool has a clear role and none feel redundant or superficial.
The tool surface covers the main project lifecycle well: create, configure, generate, patch, build, clean, flash, and read state. A minor gap is that clock or peripheral configuration cannot be changed after project creation except through existing pin configuration, and there is no explicit erase/reset tool, but these are workable limitations.
Maintenance
Related MCP Connectors
Run, build, and validate firmware on virtual hardware from your AI agent. Hardware knowledge corpus.
- alloyOAuthai.usealloy
Connect Claude, Cursor, Codex, and other AI tools to your robotics mission data.
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
Your AI Agent's Infrastructure Layer. Connect Claude, Copilot, Codex, or ChatGPT to 200+ managed open source services. Start databases, pipelines, and applications through natural language.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with STM32 development boards via J-Link debugger using RTT communication, supporting connection, logging, memory operations, and firmware flashing through natural language.121MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to build, flash, and communicate with STM32 hardware over SWD and serial, including multi-board management, live memory monitoring, and hardware sequences.25MIT
- FlicenseAqualityCmaintenanceEnables AI assistants to flash firmware, program memory, modify option bytes, erase chips, reset boards, and capture SWO printf traces for STM32 microcontrollers via STM32CubeCLT.12-
- AlicenseNot gradedqualityCmaintenanceAn MCP server that lets AI coding agents drive the full STM32 development loop—code generation, build, flash, debug, serial monitoring, and fault diagnosis—end to end via CubeIDE, CubeMX, CubeProgrammer, OpenOCD, and GDB.1MIT