Documentation
¶
Overview ¶
Package stdio provides a standard I/O implementation of the MCP transport.
This package implements the Transport interface using standard input and output, suitable for CLI applications and direct LLM integration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶ added in v1.2.0
type Transport struct {
transport.BaseTransport
// contains filtered or unexported fields
}
Transport implements the transport.Transport interface for Standard I/O.
func NewTransport ¶ added in v1.2.0
func NewTransport() *Transport
NewTransport creates a new Standard I/O transport. By default, it uses os.Stdin and os.Stdout.
func NewTransportWithIO ¶ added in v1.2.0
NewTransportWithIO creates a new Standard I/O transport with custom io.Reader and io.Writer. This is particularly useful for testing or custom I/O streams.
func (*Transport) Initialize ¶ added in v1.2.0
Initialize initializes the transport.
func (*Transport) Receive ¶ added in v1.2.0
Receive is not implemented for stdio transport as it uses the readLoop.
func (*Transport) SetNewline ¶ added in v1.2.0
SetNewline configures whether to append a newline to each sent message.