Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientTransport ¶
type ClientTransport interface {
transport.ClientTransport
}
ClientTransport is an SSE transport for MCP clients
func NewClientTransport ¶
func NewClientTransport(sseURL string, opts ...ClientTransportOption) ClientTransport
NewClientTransport creates a new SSE client transport sseURL is the SSE endpoint URL (e.g., "http://localhost:8001/mcp/sse")
type ClientTransportOption ¶
type ClientTransportOption func(*sseClientTransport)
ClientTransportOption configures the client transport
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientTransportOption
WithTimeout sets the HTTP client timeout
type ServerTransport ¶
type ServerTransport interface {
transport.ServerTransport
// WithMiddleware adds HTTP middleware to be chained before the MCP handler
WithMiddleware(middleware ...transport.HTTPMiddleware) ServerTransport
}
ServerTransport is an SSE (Server-Sent Events) transport for MCP servers
func NewServerTransport ¶
func NewServerTransport(sseEndpoint string, addr string) ServerTransport
NewServerTransport creates a new SSE server transport sseEndpoint is the path for SSE streaming (e.g., "/mcp/sse") addr is the server address (e.g., ":8001")
Click to show internal directories.
Click to hide internal directories.