mcp

package
v0.0.6-beta Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMigrationUpFailed   = errors.New("migration up failed")
	ErrMigrationDownFailed = errors.New("migration down failed")
	ErrFailedToListColl    = errors.New("failed to list collections")
	ErrFailedToGetStatus   = errors.New("failed to get status")
)
View Source
var (
	ErrConfigRequired       = errors.New("config is required")
	ErrFailedToConnect      = errors.New("failed to connect to mongodb")
	ErrServerAlreadyRunning = errors.New("mcp server already running")
	ErrFailedToDisconnect   = errors.New("failed to disconnect mongo client")
)

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Timestamp time.Time `json:"timestamp"`
	Actor     string    `json:"actor"`
	Tool      string    `json:"tool"`
	Detail    string    `json:"detail"`
	Success   bool      `json:"success"`
	Error     string    `json:"error,omitempty"`
}

func RecentActivity

func RecentActivity(limit int) []Activity

type McpServer

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

func NewMCPServer

func NewMCPServer(cfg *config.Config, logger *slog.Logger) (*McpServer, error)

func (*McpServer) Close

func (s *McpServer) Close(ctx context.Context) error

func (*McpServer) Serve

func (s *McpServer) Serve(ctx context.Context, r io.Reader, w io.Writer) error

func (*McpServer) ServeHTTP

func (s *McpServer) ServeHTTP(ctx context.Context, listenAddr string, basePath string) error

func (*McpServer) ServeStdio

func (s *McpServer) ServeStdio(ctx context.Context, r io.Reader, w io.Writer) error

func (*McpServer) Start

func (s *McpServer) Start() error

func (*McpServer) StartHTTP

func (s *McpServer) StartHTTP(listenAddr string, basePath string) error

func (*McpServer) StartStdio

func (s *McpServer) StartStdio() error

Jump to

Keyboard shortcuts

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