Skip to main content

Crate serial_mcp

Crate serial_mcp 

Source
Expand description

MCP server for serial port communication.

The primary interface is SerialHandler, built via SerialHandler::builder (or SerialHandler::new for defaults): an MCP server surface exposing the 25 serial tools, resources, and prompts over stdio or streamable HTTP. The serial-mcp binary wires the full configuration surface (--allowlist, --profiles-path, --capture-dir, buffer budgets). For agent-facing contracts — tool semantics, the RX cursor model, framing/parser presets, device profiles, and persistent capture — see the README and the guides under docs/.

The library is published for programmatic server embedding; it is not a client API.

Re-exports§

pub use error::Result;
pub use error::SerialError;
pub use server::SerialHandler;

Modules§

buffer_budget
Buffer budget manager for RX tools.
capture_store
Process-wide persistent capture store.
codec
Data encoding/decoding between MCP tool strings and raw bytes.
error
framing
Frame boundary detection and protocol parsing for RX and TX streams.
limits
log_buffer
Per-connection in-memory event log with ring-buffer semantics.
match_config
Shared match configuration and byte-substring matching for RX tools.
profile_store
Process-wide persistent profile store.
profiles
Named serial device profiles.
prompts
resource_events
Process-wide resource event primitives for modern subscriptions/listen.
resources
rx_metadata
Shared RX stop metadata for all serial data tools.
rx_ring
Sliding-window ring buffer with absolute u64 offsets and Notify-based wakeups.
rx_session
Per-connection RX session core for unified serial data capture.
schema_helpers
JSON Schema helper functions to suppress non-standard format keywords generated by schemars for unsigned integer types.
security
serial
Serial port discovery, configuration, and a session-less connection manager.
server
MCP server tool surface for serial communication.
stop_controller
Shared stop-decision controller for all RX operations.
tools
tx_session
Per-connection TX worker for serialized write/flush operations.