mcp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTextResult

func NewTextResult(content string, err error) *mcp.CallToolResult

NewTextResult creates a standardized text result for tool responses

Types

type Configuration

type Configuration struct {
	*config.StaticConfig
}

Configuration wraps the static configuration with additional runtime components

type Server

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

Server represents the MCP server

func NewServer

func NewServer(configuration Configuration) (*Server, error)

NewServer creates a new MCP server with the given configuration

func (*Server) Close

func (s *Server) Close()

Close cleans up the server resources

func (*Server) GetEnabledTools

func (s *Server) GetEnabledTools() []string

GetEnabledTools returns the list of enabled tools

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(httpServer *http.Server) *server.StreamableHTTPServer

ServeHTTP starts the MCP server in HTTP mode

func (*Server) ServeSse

func (s *Server) ServeSse(baseURL string, httpServer *http.Server) *server.SSEServer

ServeSse starts the MCP server in SSE mode

func (*Server) ServeStdio

func (s *Server) ServeStdio() error

ServeStdio starts the MCP server in stdio mode

Jump to

Keyboard shortcuts

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