About mcp-rs232
mcp-rs232 is an MCP server for accessing RS232 serial ports. It exposes port discovery, connection management, configuration, and hex-encoded data transfer for users working with serial devices.
Key features
- 01List available serial ports
- 02Open and close serial connections
- 03Read and write hex-encoded data
- 04Retrieve port configuration
- 05Expose port details as resources
Use cases
- 01Find available serial ports
- 02Open a connection to a serial device
- 03Read data from or send data to a port
- 04Check a port's current configuration
MCP support
Exposes serial port listings and individual port details as resources, with tools for port discovery, connection control, configuration, and data transfer.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
6Saved tool list · updated 3w ago
This tool takes no parameters.
Details
From the project READMEmcp-rs232
An MCP server that exposes RS232 serial port connectivity
mcp-name: io.github.daedalus/mcp-rs232
Install
pip install mcp-rs232
Usage
from mcp_rs232 import list_ports, open_port, close_port, read_port, write_port
# List available ports
ports = list_ports()
print(ports)
# Open a port
open_port("COM1", baud_rate=9600)
# Write data (hex encoded)
write_port("COM1", "48656c6c6f") # "Hello"
# Read data (returns hex encoded)
data = read_port("COM1")
# Close the port
close_port("COM1")
CLI
mcp-rs232 --help
API
Resources
serial://ports- Lists all available serial ports with their detailsserial://port/{port_name}- Get details about a specific port
Tools
list_ports_tool()- Returns list of available serial portsopen_port(port, baud_rate, ...)- Opens a serial connectionclose_port(port)- Closes a serial connectionread_port(port, size, timeout)- Reads data from port (hex encoded)write_port(port, data)- Writes hex-encoded data to portget_port_config(port)- Returns current port configuration
Development
git clone https://github.com/daedalus/mcp-rs232.git
cd mcp-rs232
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.