mcp

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromptHandler

type PromptHandler func(ctx context.Context, params json.RawMessage) (any, error)

type ResourceHandler

type ResourceHandler func(ctx context.Context, uri string) (any, error)

type Server

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

func NewServer

func NewServer(index *types.Index, logger *slog.Logger) *Server

func (*Server) Run

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

Run starts the MCP server loop

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown gracefully shuts down the server

type ToolHandler

type ToolHandler func(ctx context.Context, params json.RawMessage) (any, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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