Documentation
¶
Overview ¶
Package server implements the MCP (Model Context Protocol) server for Cortex.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string
Version string
AllowedNamespace string // Empty means all namespaces allowed
}
Config holds configuration for the MCP server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the MCP server for Cortex.
func New ¶
func New( cfg *Config, conversationEngine *conversation.Engine, knowledgeEngine *knowledge.Engine, contextEngine *ctxengine.Engine, entityEngine *entity.Engine, ) *Server
New creates a new MCP server with all Cortex tools registered.
func (*Server) SSEServer ¶
SSEServer returns the underlying SSE server for custom HTTP integration. This allows embedding the SSE endpoints in an existing HTTP server.
func (*Server) ServeSSE ¶
ServeSSE starts the MCP server using Server-Sent Events transport. The server listens on the specified address (e.g., ":9810").
func (*Server) ServeStdio ¶
ServeStdio starts the MCP server using stdio transport.
Click to show internal directories.
Click to hide internal directories.