Serial Hub MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SERIAL_HUB_API_PORT | No | API port used by the serial hub daemon and MCP adapter. Both must use the same value. Defaults to 8766. | 8766 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Shared Windows COM ports. The daemon, not this MCP process, owns hardware. Use only the user's requested COM port and baud settings. No input is sent on open/read. Independent read cursors allow all sessions to observe the same RX data. Use execute with an observed literal terminal prompt as expect; matching text is NOT an exit code. All MCP sessions and Telnet clients can write concurrently, without leases, takeover keys or command queues. Input can mix in the single terminal. execute observes shared RX, NOT a private command response; another client's output can satisfy expect. A timeout never proves idle; do not retry writes automatically. Use send directly for interactive input. Do not close a port other sessions use. Raw text/base64 and local JSONL logs may contain credentials; do not publish them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_portsA | Enumerate Windows COM ports and shared open connections; does not open hardware. |
| open_portA | Open/reuse COMx, start RX capture, return Xshell Telnet endpoint. Never sends text. Confirm serial parameters with user; driver/hardware may glitch DTR/RTS on open. Existing different settings are rejected, not silently replaced. |
| port_statusC | Inspect shared input mode, active executions, terminal clients, RX cursors and disconnect state. |
| read_outputA | Read RX without consuming other sessions' data. Reuse returned cursor for increments. No cursor replays retained buffer. base64 is lossless; text can split UTF-8 chunks. Old cursors are rejected after close/reopen. bytes_lost reports ring overflow. |
| sendB | Immediately send exact text/control characters (no implicit newline). No lease or takeover required. |
| send_bytesA | Immediately send exact base64-encoded bytes. No lease; never resets, flushes or retries automatically. |
| executeA | Send immediately and independently observe SHARED RX until literal expect or timeout. Other MCP/Telnet clients may write at any time; no command/response queue or isolation. Any client's output can satisfy expect, so a match is not proof your command completed. additional_writes_observed counts subsequent writes from any source during this call. Result is bounded to 64 KiB. No automatic Ctrl+C, retry or input gating after timeout. wait_seconds is deprecated and ignored (v0.1 compatibility); no input lease exists. |
| close_portB | Explicitly close idle unused port. Refuses Telnet clients or active execute calls. Passive MCP readers are not tracked as subscriptions: confirm nobody still needs capture first. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Each tool maps to a distinct lifecycle stage (list, open, status, read, close) plus a small write family. The send / send_bytes / execute trio is the only fuzzy area, but the descriptions clearly separate text vs base64 vs send-and-observe semantics, so misselection risk is low.
Predominantly verb_noun snake_case (list_ports, open_port, read_output, close_port) with two bare verbs (send, execute) and one noun-first name (port_status). Readable and predictable overall, with only minor deviations in style.
Eight tools is well-scoped for a serial-port bridge: one tool per operation, no redundant wrappers or bloat. Nothing appears vestigial, and no obvious operation is missing a slot.
Full session lifecycle is covered: discovery, open with parameters, state inspection, reads with cursors, multiple write modes, and closing. Gaps are minor but real: no way to reconfigure baud/parity in place (must close and reopen), and no flush/break or DTR/RTS control despite the documented glitch risk.