MCP server for serial port communication
Project description
Serial MCP Server
A Model Context Protocol (MCP) server for serial port communication, enabling LLMs to interact with hardware devices via serial connections.
Features
- List available serial ports
- Open/close serial port connections
- Read and write data to serial ports
- Control serial signals (DTR, RTS, CTS, DSR, DCD)
- Support for custom baud rates, data bits, stop bits, and parity
- JSON and Markdown output formats
Installation
# Install from PyPI (when published)
pip install serial-mcp-new
Usage
Running the Server
# Run with stdio transport (default, for local use)
serial-mcp
Config in Claude Code
"mcpServers": {
"ssh-mcp": {
"command": "C:\\Users\\DELL\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\Scripts\\serial-mcp.exe",
"args": [],
"env": {}
}
},
Available Tools
| Tool | Description |
|---|---|
serial_list_ports |
List all available serial ports |
serial_open |
Open a serial port connection |
serial_close |
Close a serial port connection |
serial_write |
Write data to a serial port |
serial_read |
Read data from a serial port |
serial_set_signals |
Set control signal states |
serial_get_signals |
Read current signal states |
serial_list_connections |
List all active connections |
Example Workflow
-
List available ports:
serial_list_ports() -
Open a connection:
serial_open(port="COM3", baud_rate=115200) -
Write data:
serial_write(connection_id="conn_1", data="Hello, device!") -
Read response:
serial_read(connection_id="conn_1", timeout=2.0) -
Close when done:
serial_close(connection_id="conn_1")
Dependencies
- Python 3.10+
- mcp >= 1.6.1
- pyserial >= 3.5
- pydantic >= 2.0.0
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
serial_mcp_new-1.0.1.tar.gz
(9.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file serial_mcp_new-1.0.1.tar.gz.
File metadata
- Download URL: serial_mcp_new-1.0.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f86183ec5136dee21ac00eb00e2fdcd3da62e33d15d7dd20948a0c0ccb4bdba8
|
|
| MD5 |
5eb2364ce8752c9461d9a9d2aa405452
|
|
| BLAKE2b-256 |
39b51b02921a98f3c184aae99769b9060062d6c3fb6915ec1da76304a3186e36
|
File details
Details for the file serial_mcp_new-1.0.1-py3-none-any.whl.
File metadata
- Download URL: serial_mcp_new-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e616f3bcd8a528bcb2b588194574d988f58363469abbd526e1580e24051b8a3c
|
|
| MD5 |
4ad6b6fae37be679695cb67c1c900374
|
|
| BLAKE2b-256 |
3a7ed2c7d503a397ab8a50f65889c0c195e85c6ce2518c9296e4808268aa33ed
|