Documentation
¶
Index ¶
- func Add(name string, alias Alias) error
- func List() map[string]Alias
- func Remove(name string) error
- type Alias
- type AliasInfo
- type OAuth
- type Store
- func (s *Store) Add(name string, alias Alias) error
- func (s *Store) IsBundled(name string) bool
- func (s *Store) IsUser(name string) bool
- func (s *Store) List() map[string]Alias
- func (s *Store) ListBundled() map[string]Alias
- func (s *Store) ListUser() map[string]Alias
- func (s *Store) Remove(name string) error
- func (s *Store) Resolve(name string) (Alias, bool)
- func (s *Store) ResolveVariant(name string, variantPref string) (Alias, string, bool)
- func (s *Store) Search(query string) []AliasInfo
- type Variant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alias ¶
type Alias struct {
URL string `json:"url"` // Git URL for local servers
Description string `json:"description,omitempty"`
Runtime string `json:"runtime,omitempty"` // node, python, go, docker
Transport string `json:"transport,omitempty"` // stdio (default), http, sse
MCPURL string `json:"mcpUrl,omitempty"` // Remote MCP URL (for http/sse transport)
OAuth *OAuth `json:"oauth,omitempty"` // OAuth configuration if required
Package string `json:"package,omitempty"` // npm/pypi package name (e.g., "@figma/mcp-local")
Variants map[string]Variant `json:"variants,omitempty"` // Available variants (local, remote)
DefaultVariant string `json:"defaultVariant,omitempty"` // Preferred variant (local or remote)
}
Alias maps a short name to an MCP server configuration
func ResolveVariant ¶
ResolveVariant resolves an alias with a specific variant using the default store
func (*Alias) GetVariantNames ¶
GetVariantNames returns the names of available variants
func (*Alias) HasLocalVariant ¶
HasLocalVariant checks if a local variant exists
func (*Alias) HasRemoteVariant ¶
HasRemoteVariant checks if a remote variant exists
func (*Alias) HasVariants ¶
HasVariants checks if an alias has multiple variants
type OAuth ¶
type OAuth struct {
AuthURL string `json:"authUrl"` // OAuth authorization endpoint
TokenURL string `json:"tokenUrl"` // OAuth token endpoint
Scopes []string `json:"scopes,omitempty"` // Required OAuth scopes
ClientID string `json:"clientId,omitempty"` // Public client ID (if applicable)
PKCEEnabled bool `json:"pkceEnabled,omitempty"` // Use PKCE for security
}
OAuth represents OAuth configuration for remote MCP servers
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages alias lookups from bundled and user-defined sources
func (*Store) ListBundled ¶
ListBundled returns only bundled aliases
func (*Store) ResolveVariant ¶
ResolveVariant resolves an alias with a specific variant preference variantPref can be "local", "remote", or empty (use default)
type Variant ¶
type Variant struct {
Transport string `json:"transport,omitempty"` // stdio, http, sse
Package string `json:"package,omitempty"` // npm/pypi package name
MCPURL string `json:"mcpUrl,omitempty"` // Remote MCP URL
Runtime string `json:"runtime,omitempty"` // node, python, etc.
}
Variant represents a specific distribution variant of an MCP server