stm32c0-mcp
This MCP server manages bare-metal STM32C011 firmware projects with four tools:
scaffold_project: Generates a minimal project skeleton (linker script, startup code, blinky main.c) for a specified target part (default STM32C011F6Ux), with project name and force overwrite options.
build: Configures and compiles the project using CMake, Ninja, and arm-none-eabi-gcc; returns build status, compiler output, paths to ELF/BIN/HEX files, and flash/RAM usage. Supports clean builds and custom build directory.
flash: Programs firmware (.elf/.bin/.hex) to the device over SWD via ST-LINK using STM32_Programmer_CLI; options for target part, erase mode, verify, reset mode, SWD frequency, and probe serial number for multi-probe setups.
list_probes: Lists serial numbers of connected ST-LINK probes to identify targets.
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., "@stm32c0-mcpscaffold a new blinky project in ./my-project"
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.
stm32c0-mcp
MCP server + CLI for scaffolding, building, and flashing bare-metal STM32C011
firmware, driving the STM32CubeCLT command-line toolchain
(/opt/ST/STM32CubeCLT_1.22.0 by default — override with STM32CUBECLT_ROOT).
Targets the STM32C011 family (default part: STM32C011F6Ux, matching the
STM32C0116-DK Discovery kit). No HAL/CMSIS pack dependency — scaffolded
projects are genuinely bare-metal (hand-written vector table, linker script,
and a GPIO-register blinky).
Setup
pyenv local 3.10.0
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"Related MCP server: Embedded xLink MCP
CLI usage
.venv/bin/stm32c0 scaffold /path/to/project [--project-name NAME] [--part STM32C011F6Ux] [--force]
.venv/bin/stm32c0 build /path/to/project [--clean]
.venv/bin/stm32c0 flash /path/to/project/build/firmware.elf [--serial-number SN] [--shared]
.venv/bin/stm32c0 list-probes [--shared]Multiple probes
STM32_Programmer_CLI's direct USB path only ever sees a single ST-LINK: with
two connected it finds one and rejects the other with Error: Serial number not found, which looks like a hardware fault but isn't. Pass --shared to
route through ST-LINK server, which sees them all:
.venv/bin/stm32c0 list-probes --shared # every probe's serial
.venv/bin/stm32c0 flash fw.elf --serial-number SN --shared # target one of themST-LINK server is started automatically when --shared is used. It ships with
STM32CubeIDE rather than STM32CubeCLT (expected at /usr/local/bin/stlink-server,
override with STLINK_SERVER), so --shared is opt-in: shared connections fail
outright where that server isn't installed. --shared listings report serial
numbers only, without firmware versions.
MCP server
.venv/bin/stm32c0-mcpExposes scaffold_project, build, flash, and list_probes as MCP tools.
See docs/registration.md for wiring it into Claude Code.
Tests
.venv/bin/pytest -vtests/test_build_smoke.py requires no hardware. tests/test_flash_hardware.py
is skipped automatically unless an ST-LINK probe is connected.
Layout
src/stm32c0_mcp/— package:parts.py(device memory-map table),config.py(toolchain discovery),stlink_server.py(ST-LINK server discovery/startup for multi-probe access),scaffold.py/build.py/flash.py/probes.py(drivers),mcp_server.py/cli.py(thin wrappers),templates/bare_metal/(project skeleton templates).examples/blinky/— a committed, buildable instance of the scaffolded project; doubles as the smoke-test fixture.
Available Tools
4 toolsbuildA
Configure (if needed) and build an STM32C011 project with CMake+Ninja+arm-none-eabi-gcc. Returns success, compiler stdout/stderr, and the built .elf/.bin/.hex paths plus arm-none-eabi-size flash/RAM usage.
| Name | Required | Description | Default |
|---|---|---|---|
| clean | No | ||
| build_dir | No | build | |
| project_dir | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses return values (success, compiler output, binary paths, flash/RAM usage) and notes that it may run configuration ('Configure (if needed)'). However, it does not mention side effects like creating build artifacts, cleaning behavior of the 'clean' parameter, or whether it modifies project files. With no annotations provided, the description carries the full burden and falls short of full transparency.
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 long, front-loaded with the action and toolchain, and every clause adds information. It efficiently covers purpose and output without repetition or fluff.
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 build tool with three parameters and no output schema, the description plus schema provides adequate context. It explains what the tool returns (which is otherwise unknown) and that configuration may occur. Missing parameter explanations are the main gap, but the overall tool complexity is low enough that an agent can likely invoke it correctly.
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 0%, so the description must compensate by explaining parameters, but it does not. 'clean', 'build_dir', and 'project_dir' are not described. While the tool's purpose gives some context, the description does not add meaning to these parameters beyond their names and defaults in 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: 'Configure (if needed) and build an STM32C011 project with CMake+Ninja+arm-none-eabi-gcc.' It provides a specific verb (build), a resource (STM32C011 project), and the toolchain, distinguishing it from siblings like scaffold_project, flash, and list_probes.
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 a compiled project is needed, but it does not explicitly contrast with alternatives (e.g., 'use scaffold_project to create a project' or 'use flash to upload'). No when-not-to-use criteria are given. The purpose is clear enough for an agent to infer, but explicit guidance is absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
flashA
Flash a .elf/.bin/.hex to an STM32C011 over SWD via ST-LINK using STM32_Programmer_CLI. Set serial_number to target one probe among several.
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | STM32C011F6Ux | |
| erase | No | all | |
| verify | No | ||
| file_path | Yes | ||
| reset_mode | No | rst | |
| frequency_khz | No | ||
| serial_number | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral transparency on its own. It discloses the underlying tool (STM32_Programmer_CLI) and the flashing mechanism, but does not mention side effects like erasing existing firmware, verification behavior, or failure modes. This is a moderate disclosure.
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: the first delivers the core functionality, the second adds a practical tip about probe selection. No redundant words.
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 tool has no annotations and no output schema, so the description must provide complete operational context. It gives the target, interface, and tool, but omits prerequisites, output/return behavior, and how to discover serial numbers (e.g., via list_probes). It is adequate but not rich.
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 0%, so the description is the only source of parameter meaning. It explains serial_number's purpose and the accepted file extensions for file_path, but leaves erase, verify, reset_mode, frequency_khz, and part undocumented. This is insufficient for a 7-parameter tool.
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 specifies the action (Flash), the target (STM32C011), the interface (SWD via ST-LINK), and the accepted file formats (.elf/.bin/.hex), distinguishing it from sibling tools like build and list_probes.
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?
It provides clear context that this tool is for flashing firmware to an STM32C011, and the serial_number tip addresses multi-probe environments. However, it does not explicitly state when to use it over alternatives or when not to use it, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_probesA
List connected ST-LINK probes (serial numbers) for multi-probe setups.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description indicates a read-only listing action with 'List' and specifies that it returns serial numbers. However, with no annotations, the description carries the full burden for behavioral disclosure and doesn't explicitly state that it has no side effects or mention any prerequisites (e.g., ST-LINK drivers).
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, well-structured sentence with no redundant information. It is front-loaded with the action and resource.
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 zero-parameter listing tool, the description is adequately complete: it states the purpose, the output (serial numbers), and the motivating scenario (multi-probe setups). It doesn't explain how the output integrates with sibling tools, but that's not essential for invoking this tool correctly.
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?
No parameters are defined, making schema coverage trivially 100%. The description adds no parameter details, but none are needed; the baseline for zero-parameter tools is high, and the description adds context about what the output contains.
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 ('List'), identifies the resource ('connected ST-LINK probes'), and adds key details ('serial numbers' and 'multi-probe setups'). This clearly distinguishes it from sibling tools like scaffold_project, build, and flash.
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 'for multi-probe setups' provides clear context for when this tool is useful: when multiple debug probes are connected and identification is needed. It doesn't explicitly mention exclusions or alternatives, but given the sibling tools are unrelated actions, the usage intent is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scaffold_projectA
Create a minimal bare-metal CMake/Ninja STM32C011 project skeleton (linker script, startup code, one blinky main.c) at project_dir. Does not overwrite an existing non-empty directory unless force=True.
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | STM32C011F6Ux | |
| force | No | ||
| project_dir | Yes | ||
| project_name | No | firmware |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the key safety behavior: it will not overwrite a non-empty directory without force=True. It also states what files will be created. It does not mention side effects like permissions or success output, but the critical destructive behavior is covered.
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 clean sentences: the first states the action and output, the second states the safety condition. No filler or repetition of schema defaults. Every word adds value.
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 scaffolding tool with four parameters and no output schema, the description provides a concise list of artifacts and the overwrite rule. It does not describe the resulting directory hierarchy or the effects of project_name/part, but the core purpose and key edge case are sufficiently covered.
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 0%, so the description must compensate. It explains project_dir as the target location and force as the overwrite toggle, but it does not clarify project_name or part (beyond the STM32C011 default). This partially bridges the gap but leaves half the parameters without additional semantic context.
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 ('Create') and names a precise resource ('minimal bare-metal CMake/Ninja STM32C011 project skeleton') with concrete contents (linker script, startup code, blinky main.c). This clearly distinguishes it from sibling tools (build, flash, list_probes) as the project-scaffolding operation.
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 establishes the context (use when creating a new project skeleton) and includes an important usage condition ('Does not overwrite an existing non-empty directory unless force=True'). It does not explicitly name alternatives or exclusions, but the distinct scaffolding purpose and the sibling list make the intended use obvious.
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. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
build - First observed
flash - First observed
list_probes - First observed
scaffold_project
TDQS
Each tool targets a distinct step in the development workflow: scaffold, build, flash, and discover probes. There is no overlap in purpose; even list_probes clearly supports the flash tool.
All tool names follow a consistent verb_noun pattern: scaffold_project, build, flash, list_probes. The pattern is clear and predictable.
Four tools is well-scoped for the server's purpose of creating, building, and flashing STM32C011 projects. Each tool is necessary and there are no redundant additions.
The set covers the full lifecycle from project scaffolding through building and flashing. Probe listing addresses multi-probe setups, leaving no obvious dead ends for the stated workflow.
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 Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Related MCP Servers
- AlicenseAqualityBmaintenanceStateful 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.4110MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for embedded debugging based on probe-rs, providing 22 tools for ARM Cortex-M and RISC-V microcontrollers, including connection, memory operations, breakpoints, flash programming, and RTT communication.2MIT
- AlicenseNot gradedqualityCmaintenanceA local stdio MCP server for embedded firmware automation that exposes tools to build, flash, reset devices, and capture serial logs through a device configuration file.1MIT
- AlicenseAqualityBmaintenanceMCP server that wraps STM32CubeMX CLI to let AI load .ioc projects, modify pin/peripheral configurations, generate HAL code, and export pinout tables.52MIT
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/praderppp/token-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server