serial-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@serial-mcp List available serial ports"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ serial-mcp
MCP server for serial port communication. Provides tools to open, read, write, and manage serial ports through the Model Context Protocol.
๐ค Written by and for AI.
โจ Features
๐ List available serial ports on the system
โ๏ธ Open ports with configurable baud rate, parity, stop bits, and flow control
๐ Read data by byte count, terminator character, or duration
โ๏ธ Write string or hex data
๐ฅ Send BREAK signals
๐ Monitor port status and control line states
Related MCP server: serial-mcp
๐ฆ Prerequisites
Python 3.10+
uv package manager
๐ Installation
Via PyPI
uvx serial-mcp@latestLocal Clone
git clone https://github.com/davidalo/serial-mcp.git
cd serial-mcp
uvx --from "$(pwd)" serial-mcp๐ Integration
Via PyPI
# Claude Code
claude mcp add serial -- uvx serial-mcp@latest
# Codex CLI
codex mcp add serial -- uvx serial-mcp@latestLocal Clone
git clone https://github.com/davidalo/serial-mcp.git
cd serial-mcp
# Claude Code
claude mcp add serial -- uvx --from "$(pwd)" serial-mcp
# Codex CLI
codex mcp add serial -- uvx --from "$(pwd)" serial-mcp๐ ๏ธ Tools
Tool | Description |
| List available system serial ports |
| Open a serial port with configuration (baud rate, parity, stop bits, etc.) |
| Close an open port |
| Write string or hex data to a port |
| Read N bytes with timeout |
| Read until a terminator character |
| Read continuously for N seconds |
| Send a BREAK signal |
| Get port status and control line states |
| List all currently managed ports |
๐งช Testing with Virtual Ports
Use socat to create virtual serial port pairs for testing:
# Create virtual port pair
socat -d -d pty,raw,echo=0,link=/tmp/ttyV0 pty,raw,echo=0,link=/tmp/ttyV1Then open /tmp/ttyV0 with the MCP server and /tmp/ttyV1 with another terminal program to test communication.
๐ License
MIT
Available Tools
10 toolsclose_portB
Close an open serial port.
The port_id is the identifier returned when the port was opened.
Inputs: port_id (required).
get_port_statusA
Get the current status of a managed serial port.
Returns configuration, buffer status, and control line states.
Inputs: port_id (required).
list_open_portsB
List all currently open/managed serial ports.
Returns information about each port that has been opened through this MCP server.
Inputs: no named parameters.
list_portsA
List all available serial ports on the system.
Returns information about each port including device path, description, manufacturer, and hardware IDs.
Inputs: no named parameters.
open_portA
Open a serial port with the specified configuration.
Returns a port_id that must be used for all subsequent operations on this port.
Inputs: port (required), baud_rate, data_bits, parity, +4 more.
read_bytesB
Read a specific number of bytes from the serial port.
Reads up to num_bytes, returning early if timeout is reached.
Inputs: port_id (required), num_bytes (required), timeout, encoding.
read_for_durationB
Read all data from serial port for a specified duration.
Continuously reads data for the specified time period, collecting all received bytes.
Inputs: port_id (required), duration (required), max_bytes, encoding.
read_untilA
Read from serial port until a terminator string is received.
Useful for reading line-based protocols (terminator='\n').
Inputs: port_id (required), terminator, timeout, max_bytes, +1 more.
send_breakA
Send a BREAK signal on the serial port.
A BREAK is a special signal where the TX line is held low for a specified duration, used for various protocols.
Inputs: port_id (required), duration.
write_dataB
Write data to an open serial port.
Data can be a regular string (encoded with the specified encoding) or a hex string if hex_mode is True.
Inputs: port_id (required), data (required), encoding, hex_mode.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose. The three read functions (read_bytes, read_for_duration, read_until) are differentiated by reading mode, and all other tools serve unique roles in port management. No overlap.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., close_port, list_open_ports, send_break). The naming is predictable and easy to interpret.
10 tools is well-scoped for a serial port management server. The set covers opening, closing, reading (three variants), writing, status, port listing, and special signals without being excessive.
The tool set covers core serial operations (open/close, read/write, status, break signal). Minor gaps exist, such as buffer flushing or control line manipulation, but these are not critical for typical use.
Maintenance
Related MCP Connectors
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
MCP server for manus documentation, generated by doc2mcp.
The official MCP Server for the Mux API
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for seamless integration with peripheral devices connected to your computer. Control, monitor, and manage hardware devices through a unified API.5MIT
- AlicenseBqualityBmaintenanceMCP server that lets LLMs talk to serial devices: microcontrollers, routers, modems, embedded Linux, anything with a UART.2446 PyPI7MIT
- AlicenseNot gradedqualityDmaintenanceA professional MCP server for serial port communication, enabling AI assistants to list, connect, send/receive data, and manage serial connections with embedded systems, IoT devices, and hardware debugging hardware.2MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for serial ports โ non-blocking reads, DTR/RTS, streaming subscriptions, port allowlist.21MIT