mcp

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package mcp implements the Model Context Protocol server for openclaw-cortex.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps an MCPServer with openclaw-cortex dependencies.

func NewServer

func NewServer(st store.Store, emb embedder.Embedder, recaller *recall.Recaller, logger *slog.Logger) *Server

NewServer creates a new MCP server. If st or emb are nil, the corresponding tool calls will return an error response instead of panicking. The recaller is used for multi-factor ranking in the recall tool.

func (*Server) HandleEntityGet added in v0.6.0

func (s *Server) HandleEntityGet(ctx context.Context, req mcpgo.CallToolRequest) (*mcpgo.CallToolResult, error)

HandleEntityGet is the exported handler for the "entity_get" tool.

func (*Server) HandleEntitySearch added in v0.6.0

func (s *Server) HandleEntitySearch(ctx context.Context, req mcpgo.CallToolRequest) (*mcpgo.CallToolResult, error)

HandleEntitySearch is the exported handler for the "entity_search" tool.

func (*Server) HandleForget

func (s *Server) HandleForget(ctx context.Context, req mcpgo.CallToolRequest) (*mcpgo.CallToolResult, error)

HandleForget is the exported handler for the "forget" tool.

func (*Server) HandleRecall

func (s *Server) HandleRecall(ctx context.Context, req mcpgo.CallToolRequest) (*mcpgo.CallToolResult, error)

HandleRecall is the exported handler for the "recall" tool.

func (*Server) HandleRemember

func (s *Server) HandleRemember(ctx context.Context, req mcpgo.CallToolRequest) (*mcpgo.CallToolResult, error)

HandleRemember is the exported handler for the "remember" tool. It is exposed for direct testing without the mcp-go transport layer.

func (*Server) HandleSearch

func (s *Server) HandleSearch(ctx context.Context, req mcpgo.CallToolRequest) (*mcpgo.CallToolResult, error)

HandleSearch is the exported handler for the "search" tool.

func (*Server) HandleStats

func (s *Server) HandleStats(ctx context.Context, req mcpgo.CallToolRequest) (*mcpgo.CallToolResult, error)

HandleStats is the exported handler for the "stats" tool.

func (*Server) MCPServer

func (s *Server) MCPServer() *mcpserver.MCPServer

MCPServer returns the underlying mcp-go MCPServer for use with ServeStdio.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL