
Serial MCP
io.github.qarnetPublished by GitHub account qarnetv0.9.3Updated Oct 24, 2026
MCP server for serial port communication. 25 tools, resources, prompts, and stdio/HTTP transports.
Overview
Lets an assistant open, read, write, and parse serial ports for UART and USB-serial embedded devices.
- What you can do
- Provides 25 tools for serial port work: discovery (list_ports, list_connections), connection lifecycle (open, close, reconnect, reconfigure), and I/O (read, write, transact, capture_boot, flush). An always-on ring buffer captures received bytes, and framing and parsers cover line, delimiter, length-prefixed, start/end, SLIP, COBS, AT, JSON, shell, NMEA-0183, and Modbus ASCII, with checksum validation. Device profiles persist learned settings, and logs can be exported as JSONL.
- When to use it
- Useful when an assistant must talk directly to microcontrollers, Arduino or STM32 boards, or other embedded targets over a serial link, including bootloader resets and boot banner capture. It fits command/response exchanges, unsolicited data reads, and protocol-aware parsing rather than a plain serial monitor.
- Requirements
- Runs as a local process on the user's machine (desktop only) over stdio, or over HTTP with --transport=http. Install via Cargo, Nix, or a prebuilt binary per platform. On Linux, the user must be in the dialout group for port access. No accounts, API keys, or environment variables are declared.
Installation
In SourceWeft
- Open Serial MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
- Install the server. See Install for Cargo, Nix, and prebuilt binary options.
- Connect an agent. Follow the agent configuration guide, or use the example below.
- Discover devices. Call
list_ports()and inspectprofile_matches. The result shows what a bareopenwould reuse. - 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. - Talk to the device. Use
transact()for command and response exchanges. Useread()for buffered or unsolicited data. Usewrite()for send-only operations.
Capabilities
Tool catalog (25 tools)
Resources and prompts
Install
Cargo (all platforms)
Nix
Prebuilt binary
No toolchain is required. Each release publishes one binary per platform. The
latest/download URLs resolve to the newest release.
On Linux, add your user to the dialout group for port access:
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)
Core workflow
Use this sequence for common work: discover, open, talk, verify the learned profile, then use advanced tools when needed.
- Call
list_ports(). Itsprofile_matchesentries correspond toports.selectedmeans a bareopenreusesselected_profile.ambiguousmeans equal-ranked profiles requireopen_profile.duplicate,ineligible, andnonemean a bare open starts fresh or transient.
- Call bare
open(port=...). The result includes theprofilebinding. The binding reports its name, source, confidence, persistence, generated flag, revision, and dirty state. - Use
transact(data=..., match=..., timeout_ms=...)to write and await a response in one call. Useread()for buffered or unsolicited data. - After
reconfigure,set_flow_control, or connection-modeconfigure, inspectprofile_persistence. It reportspersisted,not_needed,transient, orfailed. Also inspect the updatedprofilebinding. - 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:
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
Transports and options
CLI options
The profile store is one TOML file shared by every session. Use --profiles-path
for an isolated store. See Device profiles.
Persistent capture
export_log writes portable .jsonl filenames into the --capture-dir root.
It never accepts arbitrary paths and never overwrites files. See Persistent
capture.
MCP compatibility
serial-mcp supports MCP 2025-11-25. This version uses the legacy session
lifecycle.
It also supports MCP 2026-07-28. This version uses modern discovery and
stateless requests with SEP-2549 cache fields. Both stdio and HTTP transports
support the port allowlist.
CI runs official conformance checks and Inspector interoperability checks. The
validation tools come from the committed npm lockfile. CI installs them with
npm ci --ignore-scripts. It runs them as local binaries, never through npx.
An actual historical rmcp 1.7.0 client tests backward compatibility over HTTP
and stdio. Run the complete local and CI version gate with:
Development
Before pushing or opening a pull request, run cargo fmt --all. CI runs
cargo fmt --all -- --check once in standalone Ubuntu format job first.
Formatting failures block dependent expensive Nix, build/test/Clippy, and MCP
conformance jobs.
Production-path real-PTY fixture tests run on Linux. macOS and Windows run normal Rust build/test/clippy plus controlled-backend coverage.
Documentation and status
The product backlog tracks planned and in-progress work, and the documentation index links user guides, reference contracts, and reports. Report issues and feature requests on the tracker.
- CHANGELOG.md
- AGENTS.md, contributor guidelines
MCP registry
The package is available on the MCP Registry as:
mcp-name: io.github.qarnet/serial-mcp
License
MIT. See LICENSE.
Source: README.md at commit a76f02f
Tools
0Version history
1- v0.9.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts