Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPTransport ¶
type HTTPTransport struct {
Addr string // e.g. ":8080"
}
HTTPTransport serves the MCP server over HTTP (Streamable HTTP).
func (*HTTPTransport) Name ¶
func (t *HTTPTransport) Name() string
type StdioTransport ¶
StdioTransport serves the MCP server over stdin/stdout.
func (*StdioTransport) Name ¶
func (t *StdioTransport) Name() string
type Transport ¶
type Transport interface {
// Serve starts the MCP server and blocks until the context is cancelled or an error occurs.
Serve(ctx context.Context, s *server.MCPServer) error
// Name returns the transport identifier.
Name() string
}
Transport defines the strategy for serving an MCP server.
Click to show internal directories.
Click to hide internal directories.