mcp

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSSE added in v0.3.7

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

func NewStreamableHTTP added in v0.3.7

func NewStreamableHTTP(
	name string,
	version string,
	addr string,
	apps []McpApp,
	httpOpts []StreamableHTTPOption,
	serverOpts []ServerOption,
) scene.Scene

func WithSSEContextFunc

func WithSSEContextFunc(fn server.SSEContextFunc) server.SSEOption

func WithStreamableHTTPContextFunc added in v0.3.7

func WithStreamableHTTPContextFunc(fn server.HTTPContextFunc) server.StreamableHTTPOption

func WithStreamableHTTPDisableStreaming added in v0.3.7

func WithStreamableHTTPDisableStreaming(disable bool) server.StreamableHTTPOption

func WithStreamableHTTPEndpointPath added in v0.3.7

func WithStreamableHTTPEndpointPath(path string) server.StreamableHTTPOption

func WithStreamableHTTPStateful added in v0.3.7

func WithStreamableHTTPStateful(stateful bool) server.StreamableHTTPOption

func WithStreamableHTTPStateless added in v0.3.7

func WithStreamableHTTPStateless(stateless bool) server.StreamableHTTPOption

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 StreamableHTTPOption added in v0.3.7

type StreamableHTTPOption = server.StreamableHTTPOption

type StreamableHTTPScene added in v0.3.7

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

func (*StreamableHTTPScene) ImplName added in v0.3.7

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

func (*StreamableHTTPScene) ListAppNames added in v0.3.7

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

func (*StreamableHTTPScene) Start added in v0.3.7

func (m *StreamableHTTPScene) Start() error

func (*StreamableHTTPScene) Stop added in v0.3.7

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