server

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONRPCError

type JSONRPCError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type JSONRPCRequest

type JSONRPCRequest = middleware.JSONRPCRequest

JSON-RPC 2.0 structures

type JSONRPCResponse

type JSONRPCResponse struct {
	JSONRPC string        `json:"jsonrpc"`
	ID      interface{}   `json:"id,omitempty"`
	Result  interface{}   `json:"result,omitempty"`
	Error   *JSONRPCError `json:"error,omitempty"`
}

type MCPServer

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

MCP Server

func NewMCPServer

func NewMCPServer(config MCPServerConfig, client client.Client) *MCPServer

Create new MCP server

func (*MCPServer) IsRunning

func (s *MCPServer) IsRunning() bool

Check if server is running

func (*MCPServer) Start

func (s *MCPServer) Start() error

Start the MCP server

func (*MCPServer) Stop

func (s *MCPServer) Stop() error

Stop the MCP server

type MCPServerConfig

type MCPServerConfig struct {
	Transport    string `yaml:"transport" mapstructure:"transport"`
	Port         int    `yaml:"port" mapstructure:"port"`
	AuditLogging bool   `yaml:"audit_logging" mapstructure:"audit_logging"`
}

MCP Server configuration

func LoadMCPServerConfig

func LoadMCPServerConfig() MCPServerConfig

Load configuration from Viper

Jump to

Keyboard shortcuts

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