Serial MCP logo

Serial MCP

MCP server for serial port communication. 12 tools, resources, prompts, and stdio/HTTP transports.

Install Serial MCP

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for Serial MCP, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

6/6 checks healthy over the last 51d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars13Stargazers on the source repository.
Last commit11d agoMost recent push to the default branch.

From the project README

serial-mcp for UART and USB serial access

GitHub Release crates.io Rust License

serial-mcp is an MCP server for direct access to serial ports. It reads, writes, and streams UART or USB-serial data to microcontrollers, Arduino boards, STM32 chips, and other embedded targets. Reads use timeouts and pattern matching instead of blocking on a serial monitor.

The server provides always-on RX capture. It decodes TX and RX frames using line, delimiter, length-prefixed, start/end, SLIP, and COBS formats. It provides AT, JSON, shell, NMEA-0183, and Modbus ASCII parsers.

Protocol presets provide checksum validation. The server also supports auto-reconnect, event logging, DTR/RTS, BREAK, and flow control. MCP clients can use these features with serial bootloaders, resets, and embedded boards.

Quick start

  1. Install the server. See Install for Cargo, Nix, and prebuilt binary options.
  2. Connect an agent. Follow the agent configuration guide, or use the example below.
  3. Discover devices. Call list_ports() and inspect profile_matches. The result shows what a bare open would reuse.
  4. Open a port. Call open(port=...) with only the port. Baud defaults to 115200/8-N-1. The server reuses the most recently used high-confidence profile for a known device. It creates a durable generated profile for a new device.
  5. Talk to the device. Use transact() for command and response exchanges. Use read() for buffered or unsolicited data. Use write() for send-only operations.

Capabilities

AreaWhat it provides
RX modelAn always-on ring buffer captures bytes from open to close. read returns buffered bytes immediately. It can also wait, match, and replay history.
Framing and parsingBoth directions support line, delimiter, length-prefixed, start/end, SLIP, and COBS framing. Parsers include AT, JSON, shell, NMEA-0183, and Modbus ASCII.
Protocol presetsSeven presets are available. They are at_command, slip, json_lines, cobs, ndjson, nmea0183, and modbus_ascii. Checksum validation is included.
Device profilesThe server creates automatic profile sessions. High-confidence devices get durable generated profiles. Learned settings persist across sessions.
Boot capturecapture_boot handles Arduino auto-reset, power-cycle banners, and boot prompts in one atomic call.
ReliabilityRing wrap is reported through bytes_lost. Encoding fallback is lossless. The server also supports auto-reconnect and reports partial failures.
OperationsEvent logging supports persistent JSONL capture through export_log. The server also provides port allowlisting and stdio and HTTP transports.

Tool catalog (25 tools)

GroupTools
Discoverylist_ports, list_connections
Connection lifecycleopen, close, reconnect, get_status, reconfigure
I/Oread, write, transact, capture_boot, flush
Line controlset_dtr_rts, set_flow_control, send_break
Profiles & configlist_profiles, open_profile, save_profile, delete_profile, configure, rollback_profile
Logs & captureget_log, clear_log, export_log
Utilitycompute_checksum

Resources and prompts

KindItems
Resources (5)serial://ports, serial://connections (static); serial://connections/{id}, serial://connections/{id}/raw, serial://connections/{id}/log (templates)
Prompts (2)diagnose_port, interactive_terminal

Install

Cargo (all platforms)

bash
cargo install serial-mcp

Nix

bash
nix profile install github:qarnet/serial-mcp

Prebuilt binary

No toolchain is required. Each release publishes one binary per platform. The latest/download URLs resolve to the newest release.

PlatformCommand
Linux x86_64curl -L https://github.com/qarnet/serial-mcp/releases/latest/download/serial-mcp-x86_64-linux -o serial-mcp && sudo install -m 755 serial-mcp /usr/local/bin/
Linux ARM64Same command with the serial-mcp-aarch64-linux asset
macOS (Apple Silicon)Same command with the serial-mcp-aarch64-macos asset
Windows (x86_64)Download serial-mcp-x86_64-windows.exe and place it on your PATH

On Linux, add your user to the dialout group for port access:

bash
sudo usermod -aG dialout $USER

Connect an agent

For client-specific setup, see the agent configuration guide. It covers Claude Code CLI, Claude Desktop, Cursor, VS Code, Zed, opencode, Codex, Hermes, and HTTP transport.

Quick example (Claude Code, Linux/macOS)
config.json
{
  "mcpServers": {
    "serial": {
      "type": "stdio",
      "command": "serial-mcp",
      "args": ["--allowlist=/dev/ttyACM*,/dev/ttyUSB*"]
    }
  }
}

Core workflow

Use this sequence for common work: discover, open, talk, verify the learned profile, then use advanced tools when needed.

  1. Call list_ports(). Its profile_matches entries correspond to ports.
    • selected means a bare open reuses selected_profile.
    • ambiguous means equal-ranked profiles require open_profile.
    • duplicate, ineligible, and none mean a bare open starts fresh or transient.
  2. Call bare open(port=...). The result includes the profile binding. The binding reports its name, source, confidence, persistence, generated flag, revision, and dirty state.
  3. Use transact(data=..., match=..., timeout_ms=...) to write and await a response in one call. Use read() for buffered or unsolicited data.
  4. After reconfigure, set_flow_control, or connection-mode configure, inspect profile_persistence. It reports persisted, not_needed, transient, or failed. Also inspect the updated profile binding.
  5. Call close(). A clean close retries a dirty binding as a safety measure.

For boot and reset capture, call capture_boot. It handles Arduino auto-reset, power-cycle banners, and boot prompts.

The call purges unread OS input. It marks the RX live edge. It can pulse DTR/RTS, with guaranteed release. It captures only post-mark bytes on a private cursor. The result is bounded in memory and does not write a file. See RX and reading for the from cursor model. See Device profiles for profile behavior.

Protocols

The protocol field supplies framing and parser defaults for both directions. NMEA and Modbus ASCII presets validate checksums:

PresetWire nameFraming / parser
AT commandsat_commandLine (CR) + AT parser
SLIPslipRFC 1055 byte stuffing
JSON linesjson_linesLine + JSON-lines parser
COBScobsConsistent Overhead Byte Stuffing
NDJSONndjsonLine + JSON-lines parser, skips blank lines
NMEA-0183nmea0183Start/end $/! + NMEA parser, *XX checksum
Modbus ASCIImodbus_asciiStart/end : + Modbus ASCII parser, LRC

Field precedence is explicit call field, call-time preset, connection default, then connection preset. The Protocol guide documents this order, checksum behavior, and the framing and parser reference.

Key concepts and guides

GuideWhat it covers
RX and readingRing buffer and shared cursor. Tagged from forms. Timeouts, silence, and matching. Ring wrap and bytes_lost. Encoding fallback, flow control, capture_boot, and subscriptions.
Device profilesprofile_matches outcomes and identity rules. Generated and reused selection. Learning, revision CAS, rollback, and deletion guards.
Persistent captureThe export_log contract. Quotas, portable filenames, atomicity, and failure semantics.
Agent configurationClient setup. HTTP transport. Troubleshooting.
Protocol guideFraming and parsers. Presets and precedence. Checksum behavior.
Documentation indexUser and development guides

Transports and options

ModeHow to activateUse case
stdiodefaultDesktop agents
HTTP--transport=httpRemote and headless use
CLI options
Code
serial-mcp [OPTIONS]

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Serial MCP

Serial MCP is an MCP server that provides direct UART and USB-serial access for reading, writing, and streaming data to embedded devices. It supports stdio and HTTP transports, always-on receive capture, framed and parsed protocols, device profiles, reconnect behavior, logging, line control, and boot-capture workflows.

Install Serial MCP with Cargo by running `cargo install serial-mcp`. The project also documents Nix and prebuilt binary installation options.

Call `list_ports()` to discover available ports, then call `open(port=...)` to connect. Opening with only the port uses 115200/8-N-1 by default and can reuse a high-confidence profile for a known device.

Serial MCP supports line, delimiter, length-prefixed, start/end, SLIP, and COBS framing. Its parsers include AT, JSON, shell, NMEA-0183, and Modbus ASCII, while protocol presets provide checksum validation.

Yes, Serial MCP provides `capture_boot` for Arduino auto-reset, power-cycle banners, and boot prompts in one atomic call. It also supports auto-reconnect, always-on receive capture, ring-buffer history, and reports lost bytes through `bytes_lost`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSerial MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/serial-mcp?style=directory)](https://allmcps.com/mcp/serial-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/serial-mcp"><img src="https://allmcps.com/api/badge/serial-mcp?style=directory" alt="Serial MCP on AllMCPs" /></a>