mcpserver

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package mcpserver provides the Traceary MCP server.

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 provides the Traceary MCP server.

func NewServer

func NewServer(
	serverVersion string,
	extraRedactPatterns []string,
	structuredRedactRules []redaction.RuleConfig,
	auditMaxInputBytes int,
	auditMaxOutputBytes int,
	event usecase.EventUsecase,
	session usecase.SessionUsecase,
	memory usecase.MemoryUsecase,
	contextUsecase usecase.ContextUsecase,
	storeManagement usecase.StoreManagementUsecase,
	opts ...ServerOption,
) (*Server, error)

NewServer creates a new MCP server.

func (*Server) Build

func (s *Server) Build(ctx context.Context) (*mcp.Server, error)

Build creates an MCP server backed by an initialized store. The DB path has already been resolved and applied to the shared sqlite.Database by the CLI before Build is invoked (see cli.RootCLI.applyDatabasePath), so this method does not need a separate dbPath argument.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the MCP server over stdio transport.

type ServerOption added in v0.31.0

type ServerOption func(*Server)

ServerOption configures optional MCP server dependencies.

func WithEventMetadata added in v0.31.0

func WithEventMetadata(eventMetadata usecase.EventMetadataUsecase) ServerOption

WithEventMetadata configures body-free event reads for metadata projections.

func WithReport added in v0.31.0

func WithReport(report usecase.ReportUsecase) ServerOption

WithReport configures the shared body-free aggregate report.

Jump to

Keyboard shortcuts

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