mcp-serial
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_SERIAL_BAUD | No | Default baud for open_port. | 115200 |
| MCP_SERIAL_MAX_LINES | No | Capture buffer size per port. Output is captured in a bounded ring buffer so a chatty board can't exhaust memory. | 10000 |
| MCP_SERIAL_ALLOWED_DIR | No | Directory firmware files must live under. Firmware paths must resolve inside MCP_SERIAL_ALLOWED_DIR (default: the server's working directory). | cwd |
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
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_portsA | List serial ports with description, hardware id, VID/PID, and whether this server has them open. |
| open_portB | Open a serial port (or a pyserial URL such as loop://) and start capturing lines in the background. |
| close_portA | Close a port opened with open_port and stop capturing. |
| write_lineB | Send text plus a newline to an open port, e.g. a command for the firmware's CLI. |
| read_linesB | Return captured lines (oldest first, newest last) with sequence numbers. Use after_seq to fetch only output newer than your last read, grep for a regex filter (e.g. "error|warn"), and wait_seconds to block briefly for fresh output after a command. |
| clear_bufferB | Drop all captured lines for a port; sequence numbers keep increasing. |
| flash_stm32A | Flash a .bin to an STM32 over ST-Link with st-flash, then reset the target. Requires confirm=true. |
| flash_esp32A | Flash a .bin to an ESP32-family chip with esptool; closes any open session on the port first. Requires confirm=true. |
| reset_stm32B | Reset the connected STM32 target through ST-Link (st-flash reset). |
| probe_stlinkA | Show the connected ST-Link target: chip id, flash and SRAM size (st-info --probe). |
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 10 tools
Each tool maps to a distinct resource+action: port discovery (list_ports), ST-Link probing (probe_stlink), session control (open/close_port), I/O (write_line/read_lines/clear_buffer), and flashing/reset. The only minor overlap is reset_stm32 versus flash_stm32, which also resets the target, but descriptions keep them separable.
All names are snake_case with a leading verb (list_ports, open_port, read_lines, flash_esp32, reset_stm32), a consistent verb_noun pattern. The nouns shift between resources (port, buffer) and platform targets (stlink, stm32, esp32), which is a slight deviation but still predictable.
Ten tools is well within the ideal 3-15 range and each earns its place: discovery, session lifecycle, textual I/O, buffer management, and per-platform flashing/reset. No redundant or filler tools.
The surface covers the full serial workflow (list, open, read, write, clear, close) plus ST-Link/STM32/ESP32 flashing and STM32 probing/reset. Minor asymmetry: there is a flash_esp32 and reset_stm32 but no reset_esp32, and no way to send bytes without a newline.