mcp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package mcp provides an MCP (Model Context Protocol) server for the Tapes system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DagLoader loads full node ancestry from search results
	DagLoader merkle.DagLoader

	// VectorDriver for semantic search
	VectorDriver vector.Driver

	// Embedder for converting query text to vectors for semantic search with
	// configured VectorDriver
	Embedder embeddings.Embedder

	// Noop for empty MCP server
	Noop bool

	// Logger is the configured logger
	Logger *slog.Logger
}

type SearchInput

type SearchInput struct {
	Query string `json:"query" jsonschema:"the search query text to find relevant sessions"`
	TopK  int    `json:"top_k,omitempty" jsonschema:"number of results to return (default: 5)"`
}

SearchInput represents the input arguments for the MCP search tool. It uses jsonschema tags specific to the MCP protocol.

type Server

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

func NewServer

func NewServer(c Config) (*Server, error)

NewServer creates a new MCP server with the search tool.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the HTTP handler for the MCP server.

Jump to

Keyboard shortcuts

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