Skip to content
MCP server

stlink-mcp

MCP server that lets coding agents flash, run and inspect STM32 boards over ST-LINK

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, macOS, Windows
Runs
Locally
Version
0.9.0
Listing updated
today

Similar MCP servers

About stlink-mcp

stlink-mcp is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Most debugging tools report what they were told, not what happened. This server is built on the opposite rule: a tool says it succeeded only after checking that the requested thing really occurred. Every result carries a status of verified, unverified or failed, plus the observation that backs it, such as console output from the board's own serial port or the program counter seen inside the new image.

It runs locally next to the board and drives the STM32CubeCLT command line tools already installed. Variables and peripheral registers are read by name from your ELF and ST's SVD files without halting the program, and every result states whether the call halted or reset the target. Single-stepping, memory writes and RTT are deliberately left out, with other projects suggested for those.

The README marks it alpha. Three device IDs were measured on hardware (STM32F407, H743 and N657) and others are seeded at run time from ST's own device databases, labelled as such.

Install

Run in a terminal

claude mcp add stlink-mcp -- uvx stlink-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "stlink-mcp": {
      "command": "uvx",
      "args": [
        "stlink-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "stlink-mcp": {
      "command": "uvx",
      "args": [
        "stlink-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "stlink-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "stlink-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "stlink-mcp": {
      "command": "uvx",
      "args": [
        "stlink-mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "stlink-mcp": {
      "command": "uvx",
      "args": [
        "stlink-mcp"
      ]
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • STLINK_MCP_CLT_ROOTSTM32CubeCLT (or STM32CubeIDE) install directory, when it is not in a standard place
  • STLINK_MCP_BOARDSTOML file describing boards this project has not characterised; defaults to ~/.config/stlink-mcp/boards.toml if it exists
  • STLINK_MCP_NO_VENDOR_SEEDSet to anything to run on measured and user-stated data only, with no seeding from ST's device databases
  • STLINK_MCP_CONSOLESerial console per probe, SERIAL=/dev/ttyUSB0, comma-separated for several; for a console that is not the probe's own
  • STLINK_MCP_CONSOLE_BAUDConsole baud rate
  • STLINK_MCP_GDB_PORTFirst GDB server port; each probe's server takes this port and the next

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

run_firmware
Loads an image and reports success only when its console output or program counter confirms it ran.
flash_firmware
Programs the target; on devices not yet measured it needs a .bin and an address.
board_state
Reports board state, including SRAM addresses it declines to choose between.
sample_values
Watches values while the program runs.

What it does

Verified results
Each result is verified, unverified or failed, with the evidence named.
Run and flash firmware
Loads an image and confirms it by console output or program counter.
Non-halting reads
Reads variables and peripheral registers by name without stopping the program.
Halt and reset reporting
Every call says whether it halted or reset the target.
Board state check
Reports the board's state and refuses to guess ambiguous SRAM layouts.
Sixteen agent-shaped tools
Run-to-point style calls return call stack, registers and stop reason in one result.

Good for

  • Let an agent run the edit, build, load and observe loop on an STM32 board
  • Check that a new firmware image really started after flashing
  • Read peripheral registers by name while the program runs
  • Catch cases where ST's tools report success without effect

Pricing

Open source

stlink-mcp FAQ

What does it need installed?

STM32CubeCLT, or STM32CubeIDE for the same three tools, found automatically in standard locations or via STLINK_MCP_CLT_ROOT.

Does it support single-stepping?

No. The README says an agent gets more from one call that runs to a chosen point, and points to other projects for stepping or RTT.

Which boards are measured?

Device IDs 0x413 (STM32F407), 0x450 (STM32H743) and 0x486 (STM32N657) are measured on hardware; others are seeded from ST's databases.

What is its maturity?

Alpha, version 0.9.0, and any of the API may change before 1.0.

Is stlink-mcp free?

Yes. stlink-mcp is open source, so you can use and self-host it for free.

How do I add stlink-mcp to Claude Code?

Run this command in your terminal: claude mcp add stlink-mcp -- uvx stlink-mcp

What are the best alternatives to stlink-mcp?

The closest alternatives to stlink-mcp are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers