Serial MCP — Claude Code MCP server: what it does, how to install
Connects AI coding assistants to microcontrollers through UART and USB serial ports. Useful for debugging STM32 or Arduino boards directly inside your agent chat.
Open on GitHubWhat Serial MCP does
This server bridges AI agents with hardware devices via serial ports. An always-on ring buffer stores incoming bytes so unsolicited traffic remains intact between calls. The suite includes 25 tools for opening connections, running patterned request-response sequences with transact, and controlling hardware lines. Supported decoders handle formats such as COBS, SLIP, delimiter-based lines, and protocols like Modbus ASCII or NMEA-0183.
The tool tracks hardware settings automatically. When a board connects, the server attaches persistent configuration profiles across sessions. For firmware restarts, capture_boot pulses DTR or RTS lines to record bootloader output without saving temporary files to disk.
On Linux systems, port access fails immediately unless your user account belongs to the dialout group. The default serial configuration uses 115200 baud with 8-N-1 framing.
What it helps with
- interact with microcontrollers using AT commands and structured responses
- capture reboot logs from Arduino boards via automated DTR reset
- decode incoming sensor streams formatted with NMEA or COBS
- scan connected USB serial interfaces and manage connection profiles
Example prompts for the agent
- List all available serial interfaces and detect connected boards
- Open
/dev/ttyUSB0at 115200 baud and capture the startup sequence - Send
AT+CSQtoCOM4and return the response onceOKarrives
How to install Serial MCP
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Serial MCP
How to install Serial MCP in Claude Code?
Build the binary by running cargo install serial-mcp or fetch a prebuilt executable from GitHub releases. Next, register serial-mcp under mcpServers in your configuration, optionally supplying --allowlist to restrict device access.
What does Serial MCP do?
It provides 25 tools to interact with serial ports, microcontrollers, and embedded hardware. The server captures input in a background buffer, handles protocol decoding, and toggles hardware control pins.
What system permissions are required on Linux?
You must add your user to the device group using sudo usermod -aG dialout $USER. Skipping this step blocks read and write permissions for /dev/ttyUSB and /dev/ttyACM interfaces.