Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer wraps MCPServer to provide HTTP/SSE transport
func NewHTTPServer ¶
func NewHTTPServer(mcp *MCPServer) *HTTPServer
func (*HTTPServer) BroadcastToAll ¶
func (h *HTTPServer) BroadcastToAll(message interface{}) error
BroadcastToAll sends a message to all connected clients
func (*HTTPServer) SendToClient ¶
func (h *HTTPServer) SendToClient(clientID string, message interface{}) error
SendToClient sends a message to a specific client via SSE
func (*HTTPServer) ServeHTTP ¶
func (h *HTTPServer) ServeHTTP(addr string) error
ServeHTTP starts the HTTP server on the specified address
type InitializeResult ¶
type InitializeResult struct {
ProtocolVersion string `json:"protocolVersion"`
Capabilities Capabilities `json:"capabilities"`
ServerInfo ServerInfo `json:"serverInfo"`
}
type MCPServer ¶
type MCPServer struct {
// contains filtered or unexported fields
}
func NewMCPServer ¶
type Request ¶
type Request struct {
JSONRPC string `json:"jsonrpc"`
ID interface{} `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
MCP Protocol structures
type ServerInfo ¶
Click to show internal directories.
Click to hide internal directories.