mcpserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const TransportStdio = "stdio"

Variables

This section is empty.

Functions

func New

func New(services *core.Services, opts Options) (*mcp.Server, error)

func Serve

func Serve(
	ctx context.Context,
	services *core.Services,
	opts Options,
	stdin io.Reader,
	stdout io.Writer,
	stderr io.Writer,
) error

Types

type Options

type Options struct {
	Transport             string
	ImplementationName    string
	ImplementationVersion string
	AllowedConnections    []string
	DefaultLimit          int
	MaxLimit              int
	MaxBytes              int
	Timeout               time.Duration
	AllowMutations        bool
}

type SafetyError

type SafetyError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

func (*SafetyError) Error

func (e *SafetyError) Error() string

type UnsupportedTransportError

type UnsupportedTransportError struct {
	Transport string
}

func (*UnsupportedTransportError) Error

func (e *UnsupportedTransportError) Error() string

Jump to

Keyboard shortcuts

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