serial-mcp 0.4.2

MCP server for serial port communication. 13 tools (open/read/read_line/write/wait_for/subscribe/...), resources, prompts, task cancellation, stdio + streamable-HTTP transports.
Documentation

Serial MCP Server

GitHub Release crates.io Rust License

An MCP server that lets AI assistants drive serial ports: open, read, write, wait for prompts, stream RX bytes, toggle DTR/RTS, send BREAK.

Be sure to ask your agent to give honest feedback on the tool after they finish using it. Always looking for ways to improve serial-mcp :)

MCP 2025-11-25 compliant · resource change notifications · port allowlist · stdio + HTTP transports

What It Does

Exposes serial ports as MCP tools so agents like Claude can interact with embedded devices, Arduino boards, STM32 microcontrollers, and any UART/USB-serial hardware — all through natural language.

13 tools — list_ports, get_version, open, close, read, read_line, write, flush, set_dtr_rts, send_break, wait_for, subscribe, unsubscribe
3 resources — serial://ports, serial://connections, serial://connections/{id}
2 prompt templates — diagnose_port, interactive_terminal

Install

Via cargo

cargo install serial-mcp

Pre-built binaries are available on the releases page.

Via Nix

nix profile install github:qarnet/serial-mcp

Linux users: add yourself to the dialout group for port access: sudo usermod -aG dialout $USER

Wire Up Your Agent

→ Agent configuration guide — Claude Code, Claude Desktop, Cursor, VS Code, Zed, opencode, Codex, Hermes, HTTP transport

{
  "mcpServers": {
    "serial": {
      "type": "stdio",
      "command": "serial-mcp",
      "args": ["--allowlist=/dev/ttyACM*,/dev/ttyUSB*"]
    }
  }
}

Transports

Mode How to activate Use case
stdio default Desktop agents
HTTP serial-mcp --transport=http Remote debugging, headless

Run serial-mcp --help for all options.

Development

cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --all -- --check

Documentation

License

MIT. See LICENSE.