mcp

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransportStdio = "stdio"
	TransportHttp  = "http"

	DefaultListenAddr = "127.0.0.1:7474"
)

Variables

This section is empty.

Functions

func MaybeInitialCompile

func MaybeInitialCompile(ctx context.Context, st *store.Store, dir string, logger *slog.Logger) error

Run an initial compile when the store is empty; no-op otherwise.

Types

type Option added in v0.1.3

type Option func(*options)

func WithListen added in v0.2.0

func WithListen(addr string) Option

func WithListener added in v0.2.0

func WithListener(l net.Listener) Option

func WithLogger added in v0.1.3

func WithLogger(l *slog.Logger) Option

func WithRedactor added in v0.3.2

func WithRedactor(r *redaction.Redactor) Option

func WithSourceDir added in v0.1.3

func WithSourceDir(dir string) Option

func WithTransport added in v0.2.0

func WithTransport(t string) Option

func WithWorkspaceConfig added in v0.3.2

func WithWorkspaceConfig(c config.Config) Option

type RescanLoop

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

func NewRescanLoop

func NewRescanLoop(st *store.Store, dir string, interval time.Duration, cc config.CompileConfig, logger *slog.Logger) (*RescanLoop, error)

func (*RescanLoop) Run

func (r *RescanLoop) Run(ctx context.Context)

type Server

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

func NewServer

func NewServer(st *store.Store, tracker *temperature.Tracker, cfg temperature.Config, opts ...Option) (*Server, error)

func (*Server) Connect

func (s *Server) Connect(ctx context.Context, t mcp.Transport) (*mcp.ServerSession, error)

func (*Server) NotifyColdNodes

func (s *Server) NotifyColdNodes(ctx context.Context, cold []*store.Node) []string

Send a cold-node warning and return the IDs that reached at least one session.

func (*Server) Run

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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