pyserial-mcp
v0.8.0MCP server for serial device communication
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_serial_ports
List available serial ports and USB metadata.
serial_force_release
Terminate the process holding a serial port. Destructive.
| Parameter | Type | Description |
|---|---|---|
port * | string |
serial_open
Open a serial session. Close it with serial_close when finished.
| Parameter | Type | Description |
|---|---|---|
baud_rate | integer | |
data_bits | integer | |
inactivity_timeout | number | |
parity | string | |
port | ||
stop_bits | number | |
timeout | number |
serial_close
Close a serial session and release its port.
| Parameter | Type | Description |
|---|---|---|
session_id |
serial_change_settings
Change settings on an open serial session.
| Parameter | Type | Description |
|---|---|---|
baud_rate | ||
data_bits | ||
parity | ||
session_id | ||
stop_bits |
serial_execute
Open 8N1, run one text command, and always close.
| Parameter | Type | Description |
|---|---|---|
data * | string | |
append_newline | boolean | |
baud_rate | integer | |
encoding | string | |
expect | ||
max_output_bytes | integer | |
port | ||
timeout | number |
serial_command
Send text and collect output until a regex matches, timeout, or silence.
| Parameter | Type | Description |
|---|---|---|
data * | string | |
append_newline | boolean | |
encoding | string | |
expect | ||
max_output_bytes | integer | |
respond | ||
respond_hex | ||
session_id | ||
timeout | number |
serial_wait_for
Wait for a regex in incoming output, optionally responding on match.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | |
encoding | string | |
max_output_bytes | integer | |
respond | ||
respond_hex | ||
session_id | ||
timeout | number |
serial_write
Write text without waiting for a response.
| Parameter | Type | Description |
|---|---|---|
data * | string | |
append_newline | boolean | |
encoding | string | |
session_id |
serial_read
Consume buffered text, returning the newest bytes up to the output limit.
| Parameter | Type | Description |
|---|---|---|
encoding | string | |
max_output_bytes | integer | |
session_id | ||
timeout | number |
serial_read_since
Read history without consuming it, returning the newest bytes up to the limit.
| Parameter | Type | Description |
|---|---|---|
encoding | string | |
max_output_bytes | integer | |
session_id | ||
since |
serial_write_hex
Write raw bytes supplied as hexadecimal.
| Parameter | Type | Description |
|---|---|---|
hex_string * | string | |
session_id |
serial_read_hex
Consume buffered bytes and return limited hexadecimal output.
| Parameter | Type | Description |
|---|---|---|
max_output_bytes | integer | |
session_id | ||
timeout | number |
serial_set_signals
Set DTR or RTS on an open session.
| Parameter | Type | Description |
|---|---|---|
dtr | ||
rts | ||
session_id |
serial_get_signals
Read modem-control signal states.
| Parameter | Type | Description |
|---|---|---|
session_id |
serial_send_break
Send a serial break signal.
| Parameter | Type | Description |
|---|---|---|
duration | number | |
session_id |
serial_detect_baud
Try common baud rates and rank readable responses.
| Parameter | Type | Description |
|---|---|---|
port * | string | |
probe | boolean |
serial_clear_history
Clear a session's receive history.
| Parameter | Type | Description |
|---|---|---|
session_id |
serial_log_start
Start logging received data to a file.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
append | boolean | |
session_id |
serial_log_stop
Stop logging and return capture statistics.
| Parameter | Type | Description |
|---|---|---|
session_id |
serial_xmodem_send
Send a file with XMODEM checksum or CRC mode.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
mode | string | |
session_id |
serial_xmodem_receive
Receive a file with XMODEM checksum or CRC mode.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
mode | string | |
session_id | ||
timeout | number |
serial_list_sessions
List open serial sessions and cleanup deadlines.
serial_status
Return connection health and session statistics.
| Parameter | Type | Description |
|---|---|---|
session_id |