Serial MCP Server logo

Serial MCP Server

Connects AI agents to RS232/UART devices for serial I/O, hardware control, protocol specs, tracing, and plugins.

Install Serial MCP Server

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

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "serial-mcp-server": {
      "command": "uvx",
      "args": [
        "serial-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx serial-mcp-server

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 4d ago.

Overview

The serial-mcp-server MCP server gives AI agents stateful access to serial devices through stdio and pyserial. It can discover ports, manage connections, exchange text or binary data, control DTR/RTS lines, and flush buffers. Protocol specs and optional plugins let agents work with device-specific commands instead of only raw bytes. Reach for it when developing firmware, debugging embedded hardware, automating serial tests, or exploring an unfamiliar device.

Use cases

  • Debug firmware through a conversational serial session
  • Automate device reset and command-response test flows
  • Explore an unknown serial protocol
  • Create reusable device plugins
  • Run hardware smoke tests in development or CI

Key features

  • Serial port discovery and stateful connections
  • Text, hexadecimal, and base64 I/O
  • Line-oriented and delimiter-based reads
  • DTR and RTS control for reset or boot flows
  • Protocol specs and device plugins
  • Tracing and optional PTY mirroring

Security & health

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

ActiveLast checked 1d ago

Recent health check succeeded.

5/5 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · serial-mcp-server (PyPI)

Adoption & maintenance

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

GitHub stars26Stargazers on the source repository.
Last commit7mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Serial MCP Server works

What serial-mcp-server does

The serial-mcp-server MCP server exposes serial-device operations to MCP-compatible AI clients. It is intended for RS232 and UART workflows on macOS, Windows, and Linux, using pyserial for the underlying connection layer. Communication with the MCP client takes place over stdio.

Agents can scan for available ports, open and close connections, inspect connection state, and exchange data. Read and write operations support text, hexadecimal, and base64 representations. Line-based operations cover reading a line or collecting data until a delimiter. Buffer flushing and DTR/RTS controls support workflows such as resetting a board or entering a boot mode.

How it works

The server maintains connection state so an agent can perform a sequence of operations against an open port. A typical flow is to list ports, open one with the required serial settings, toggle a control line if needed, send a command, and read the response. Connection options include baud rate, parity, stop bits, and encoding.

Protocol specs provide a higher-level description of a device. Markdown files can document connection settings, message formats, commands, and multi-step procedures. After a spec is registered and attached, the agent has information about expected commands and responses rather than treating every exchange as unexplained bytes.

Plugins add device-specific tools above the raw serial layer. They can represent operations such as reading a value or uploading firmware, and the server can load or reload approved plugins. PTY mirroring can also expose a session to tools such as screen, minicom, or custom scripts.

Setup and configuration

Install the package with pip install serial-mcp-server, then register the serial_mcp command with an MCP client. The repository also documents editable installation with pip install -e . or uv pip install -e .. The serial-mcp-server MCP server can be registered with Claude Code, configured in VS Code or Copilot through .vscode/mcp.json, or added to Cursor through .cursor/mcp.json.

No environment variable is required for the basic server. Optional settings include SERIAL_MCP_MAX_CONNECTIONS for the connection limit, SERIAL_MCP_PLUGINS for enabling all or selected plugins, and SERIAL_MCP_LOG_LEVEL for stderr logging. Tracing is enabled by default and can be controlled with SERIAL_MCP_TRACE, SERIAL_MCP_TRACE_PAYLOADS, and SERIAL_MCP_TRACE_MAX_BYTES.

Cursor users should set SERIAL_MCP_TOOL_SEPARATOR to _, because that client does not accept dots in tool names. SERIAL_MCP_MIRROR enables PTY mirroring with off, ro, or rw; mirroring is supported on macOS and Linux.

Tools and capabilities

The documented tool groups include:

  • Serial core: port listing, open and close, status, reads, writes, line reads, delimiter reads, flushing, and DTR/RTS control.
  • Introspection: listing active connections.
  • Protocol specs: creating templates, registering, listing, attaching, retrieving, reading, and searching specs.
  • Tracing: checking trace status and viewing recent trace entries.
  • Plugins: generating templates, listing, reloading, and loading plugins.

The serial-mcp-server MCP server supports a progression from raw byte exchange to documented protocols and reusable device operations. Agents can use these layers for conversational debugging, repeatable test sequences, hardware smoke tests, and device exploration.

Limitations and notes

Plugin use is disabled unless enabled through configuration, either for all plugins or for named plugins. PTY mirroring is not available on Windows according to the documented platform support. The server communicates over stdio, so the MCP client must support that transport and the host must have access to the target serial device.

Trace payloads are omitted by default; enabling payload tracing includes write data and applies the configured maximum length. The default maximum simultaneous connection count is 10, and the default tool-name separator is a period unless changed for client compatibility.

Reviews

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

Frequently Asked Questions about Serial MCP Server

serial-mcp-server is an MCP server that connects AI agents to RS232 and UART devices through stdio and pyserial. Its main tools list ports, open and close connections, read and write data, perform line-based I/O, control DTR and RTS, manage protocol specs, and load device plugins for higher-level operations.

Install it with `pip install serial-mcp-server`, then register the `serial_mcp` command with your MCP client. For development, use an editable install with `pip install -e .` or `uv pip install -e .`.

Yes, serial-mcp-server works with Cursor through a project `.cursor/mcp.json` configuration. Set `SERIAL_MCP_TOOL_SEPARATOR` to `_` because Cursor does not support dots in tool names.

Set `SERIAL_MCP_PLUGINS=all` to allow all plugins or provide a comma-separated list of plugin names. Plugins are disabled when the variable is unset.

Yes, PTY mirroring is available with `SERIAL_MCP_MIRROR=ro` or `rw`, and it is disabled with `off`. The documented mirror support applies to macOS and Linux.

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 Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/serial-mcp-server?style=directory)](https://allmcps.com/mcp/serial-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/serial-mcp-server"><img src="https://allmcps.com/api/badge/serial-mcp-server?style=directory" alt="Serial MCP Server on AllMCPs" /></a>