Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Listen      string
	IdleTimeout time.Duration
	Servers     []Server
}

Config is a complete composite server configuration.

func Load

func Load(data []byte, opts LoadOptions) (*Config, error)

Load loads one strict YAML document.

func LoadFile

func LoadFile(path string, opts LoadOptions) (*Config, error)

LoadFile loads a strict YAML configuration from path.

type LoadOptions

type LoadOptions struct {
	LookupEnv func(string) (string, bool)
}

LoadOptions controls environment interpolation while loading YAML.

type PromptOverride

type PromptOverride struct {
	Name                string
	OverrideName        string
	Description         string
	OverrideDescription string
	Enabled             bool
}

PromptOverride customizes a discovered prompt.

type ResourceOverride

type ResourceOverride struct {
	URI                 string
	OverrideURI         string
	Name                string
	OverrideName        string
	Description         string
	OverrideDescription string
	Enabled             bool
}

ResourceOverride customizes a discovered resource.

type ResourceTemplateOverride

type ResourceTemplateOverride struct {
	URITemplate         string
	OverrideURITemplate string
	Name                string
	OverrideName        string
	Description         string
	OverrideDescription string
	Enabled             bool
}

ResourceTemplateOverride customizes a discovered resource template.

type Server

type Server struct {
	Name               string
	Prefix             string
	URL                string
	Headers            map[string]string
	PassthroughHeaders []string
	Command            string
	Args               []string
	Env                map[string]string
	WorkingDirectory   string
	Timeout            time.Duration
	Tools              []ToolOverride
	Prompts            []PromptOverride
	Resources          []ResourceOverride
	ResourceTemplates  []ResourceTemplateOverride
}

Server describes one component MCP server.

type ToolOverride

type ToolOverride struct {
	Name                string
	OverrideName        string
	Description         string
	OverrideDescription string
	Enabled             bool
}

ToolOverride customizes a discovered tool.

Jump to

Keyboard shortcuts

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