Versions in this module Expand all Collapse all v0 v0.12.0 Mar 9, 2026 v0.11.0 Mar 2, 2026 Changes in this version + const DefaultFileMode + var DefaultRegistry = NewAdapterRegistry() + var ErrBothCommandAndURL = errors.New("server cannot have both command and url") + var ErrEmptyConfig = errors.New("configuration is empty") + var ErrInvalidTransport = errors.New("invalid transport type") + var ErrNoCommandOrURL = errors.New("server must have either command (stdio) or url (http/sse)") + var ErrServerNotFound = errors.New("server not found") + func Convert(data []byte, from, to string) ([]byte, error) + func Register(adapter Adapter) + type Adapter interface + DefaultPaths func() []string + Marshal func(cfg *Config) ([]byte, error) + Name func() string + Parse func(data []byte) (*Config, error) + ReadFile func(path string) (*Config, error) + WriteFile func(cfg *Config, path string) error + func GetAdapter(name string) (Adapter, bool) + type AdapterRegistry struct + func NewAdapterRegistry() *AdapterRegistry + func (r *AdapterRegistry) Convert(data []byte, from, to string) ([]byte, error) + func (r *AdapterRegistry) Get(name string) (Adapter, bool) + func (r *AdapterRegistry) Names() []string + func (r *AdapterRegistry) Register(adapter Adapter) + type Config struct + Inputs []InputVariable + Servers map[string]Server + func NewConfig() *Config + func ReadFile(path string) (*Config, error) + func (c *Config) AddInput(input InputVariable) + func (c *Config) AddServer(name string, server Server) + func (c *Config) EnabledServers() map[string]Server + func (c *Config) GetInput(id string) (InputVariable, bool) + func (c *Config) GetServer(name string) (Server, bool) + func (c *Config) MarshalJSON() ([]byte, error) + func (c *Config) Merge(other *Config) + func (c *Config) RemoteServers() map[string]Server + func (c *Config) RemoveServer(name string) + func (c *Config) ServerNames() []string + func (c *Config) StdioServers() map[string]Server + func (c *Config) UnmarshalJSON(data []byte) error + func (c *Config) Validate() error + func (c *Config) WriteFile(path string) error + func (c *Config) WriteFileWithMode(path string, mode fs.FileMode) error + type InputVariable struct + Description string + ID string + Password bool + Type string + type ParseError struct + Err error + Format string + Path string + func (e *ParseError) Error() string + func (e *ParseError) Unwrap() error + type Server struct + AlwaysAllow []string + Args []string + BearerTokenEnvVar string + Command string + Cwd string + DisabledTools []string + Enabled *bool + EnabledTools []string + Env map[string]string + EnvFile string + Headers map[string]string + NetworkTimeoutSec int + StartupTimeoutSec int + ToolTimeoutSec int + Transport TransportType + URL string + func (s *Server) InferTransport() TransportType + func (s *Server) IsEnabled() bool + func (s *Server) IsHTTP() bool + func (s *Server) IsRemote() bool + func (s *Server) IsSSE() bool + func (s *Server) IsStdio() bool + func (s *Server) SetEnabled(enabled bool) + func (s *Server) Validate() error + type ServerValidationError struct + Err error + Name string + func (e *ServerValidationError) Error() string + func (e *ServerValidationError) Unwrap() error + type TransportType string + const TransportHTTP + const TransportSSE + const TransportStdio + func (t TransportType) IsLocal() bool + func (t TransportType) IsRemote() bool + func (t TransportType) String() string + func (t TransportType) Valid() bool + type WriteError struct + Err error + Format string + Path string + func (e *WriteError) Error() string + func (e *WriteError) Unwrap() error