pyserial-mcp

v0.8.0
pyserial-mcp Checked 5 days ago Published 1 month ago

MCP 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.

ParameterTypeDescription
port *string

serial_open

Open a serial session. Close it with serial_close when finished.

ParameterTypeDescription
baud_rateinteger
data_bitsinteger
inactivity_timeoutnumber
paritystring
port
stop_bitsnumber
timeoutnumber

serial_close

Close a serial session and release its port.

ParameterTypeDescription
session_id

serial_change_settings

Change settings on an open serial session.

ParameterTypeDescription
baud_rate
data_bits
parity
session_id
stop_bits

serial_execute

Open 8N1, run one text command, and always close.

ParameterTypeDescription
data *string
append_newlineboolean
baud_rateinteger
encodingstring
expect
max_output_bytesinteger
port
timeoutnumber

serial_command

Send text and collect output until a regex matches, timeout, or silence.

ParameterTypeDescription
data *string
append_newlineboolean
encodingstring
expect
max_output_bytesinteger
respond
respond_hex
session_id
timeoutnumber

serial_wait_for

Wait for a regex in incoming output, optionally responding on match.

ParameterTypeDescription
pattern *string
encodingstring
max_output_bytesinteger
respond
respond_hex
session_id
timeoutnumber

serial_write

Write text without waiting for a response.

ParameterTypeDescription
data *string
append_newlineboolean
encodingstring
session_id

serial_read

Consume buffered text, returning the newest bytes up to the output limit.

ParameterTypeDescription
encodingstring
max_output_bytesinteger
session_id
timeoutnumber

serial_read_since

Read history without consuming it, returning the newest bytes up to the limit.

ParameterTypeDescription
encodingstring
max_output_bytesinteger
session_id
since

serial_write_hex

Write raw bytes supplied as hexadecimal.

ParameterTypeDescription
hex_string *string
session_id

serial_read_hex

Consume buffered bytes and return limited hexadecimal output.

ParameterTypeDescription
max_output_bytesinteger
session_id
timeoutnumber

serial_set_signals

Set DTR or RTS on an open session.

ParameterTypeDescription
dtr
rts
session_id

serial_get_signals

Read modem-control signal states.

ParameterTypeDescription
session_id

serial_send_break

Send a serial break signal.

ParameterTypeDescription
durationnumber
session_id

serial_detect_baud

Try common baud rates and rank readable responses.

ParameterTypeDescription
port *string
probeboolean

serial_clear_history

Clear a session's receive history.

ParameterTypeDescription
session_id

serial_log_start

Start logging received data to a file.

ParameterTypeDescription
file_path *string
appendboolean
session_id

serial_log_stop

Stop logging and return capture statistics.

ParameterTypeDescription
session_id

serial_xmodem_send

Send a file with XMODEM checksum or CRC mode.

ParameterTypeDescription
file_path *string
modestring
session_id

serial_xmodem_receive

Receive a file with XMODEM checksum or CRC mode.

ParameterTypeDescription
file_path *string
modestring
session_id
timeoutnumber

serial_list_sessions

List open serial sessions and cleanup deadlines.

serial_status

Return connection health and session statistics.

ParameterTypeDescription
session_id