mcp

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Enabled bool   `yaml:"enabled"`
	Method  string `yaml:"method"`
	Token   string `yaml:"token,omitempty"`
}

AuthConfig defines authentication settings

type Config

type Config struct {
	Server      ServerConfig      `yaml:"server"`
	Auth        AuthConfig        `yaml:"auth"`
	Performance PerformanceConfig `yaml:"performance"`
	Security    SecurityConfig    `yaml:"security"`
	Features    FeaturesConfig    `yaml:"features"`
}

Config represents the MCP server configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns default MCP configuration

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

type ConfigError

type ConfigError struct {
	Field   string
	Message string
}

ConfigError represents a configuration validation error

func (*ConfigError) Error

func (e *ConfigError) Error() string

type FeaturesConfig

type FeaturesConfig struct {
	EnableIncremental bool `yaml:"enable_incremental"`
	EnableValidation  bool `yaml:"enable_validation"`
	EnablePatterns    bool `yaml:"enable_patterns"`
	EnableCaching     bool `yaml:"enable_caching"`
}

FeaturesConfig defines feature toggles

type PerformanceConfig

type PerformanceConfig struct {
	MaxContextSize  int           `yaml:"max_context_size"`
	CacheTTL        int           `yaml:"cache_ttl"`
	EnableStreaming bool          `yaml:"enable_streaming"`
	BatchSize       int           `yaml:"batch_size"`
	RequestTimeout  time.Duration `yaml:"request_timeout"`
}

PerformanceConfig defines performance settings

type SecurityConfig

type SecurityConfig struct {
	AllowedPaths   []string `yaml:"allowed_paths"`
	ForbiddenPaths []string `yaml:"forbidden_paths"`
	RateLimit      int      `yaml:"rate_limit"`
	MaxQueryTime   int      `yaml:"max_query_time"`
}

SecurityConfig defines security settings

type ServerConfig

type ServerConfig struct {
	Port           int    `yaml:"port"`
	Host           string `yaml:"host"`
	MaxConnections int    `yaml:"max_connections"`
}

ServerConfig defines server settings

Jump to

Keyboard shortcuts

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