mcp

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContext

func GetContext(ctx context.Context) (context.Context, scene.Context)

func NewSSEScene

func NewSSEScene(
	name string,
	version string,
	addr string,
	apps []McpApp,
	sseOpts []SSEOption,
	serverOpts []ServerOption) scene.Scene

func WithSSEContextFunc

func WithSSEContextFunc(fn server.SSEContextFunc) server.SSEOption

func WithToolFilter

func WithToolFilter(filter server.ToolFilterFunc) server.ServerOption

Types

type McpApp

type McpApp interface {
	scene.Application
	Register(server *server.MCPServer) error
}

type SSEOption

type SSEOption = server.SSEOption

type SSEScene

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

func (*SSEScene) ImplName

func (m *SSEScene) ImplName() scene.ImplName

func (*SSEScene) ListAppNames

func (m *SSEScene) ListAppNames() []string

func (*SSEScene) Start

func (m *SSEScene) Start() error

func (*SSEScene) Stop

func (m *SSEScene) Stop(ctx context.Context) error

type ServerOption

type ServerOption = server.ServerOption

type StructureArray

type StructureArray[T any] struct {
	Result []T `json:"result"`
	Length int `json:"length"`
}

func WrapArray

func WrapArray[T any](array []T) StructureArray[T]

Jump to

Keyboard shortcuts

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