server

package
v1.12.13 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMcpServerWithSseTransport

func NewMcpServerWithSseTransport(config McpServerConfig) (*mcpServer, error)

func NewMcpServerWithStdioTransport

func NewMcpServerWithStdioTransport(config McpServerConfig) (*mcpServer, error)

Types

type McpServer

type McpServer interface {
	RegisterTool(tool mcp.McpTool) error
	Start() error
	Stop() error
}

McpServer is the interface for a MCP server

type McpServerConfig

type McpServerConfig struct {
	Name         string
	Version      string
	Instructions string

	SseServerBasePath string
	SseServerAddr     string

	// For security reasons, restrict allowed origins and hosts for SSE connections
	SseServerAllowedOriginsPrefix []string
	SseServerAllowedHosts         []string
}

func DefaultMcpServerConfig

func DefaultMcpServerConfig() McpServerConfig

Jump to

Keyboard shortcuts

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