Documentation
¶
Overview ¶
Package catalog provides a searchable registry of available MCP servers. Unlike the runtime registry (server.Registry), the catalog contains server definitions that can be discovered and installed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapabilityCategories ¶
CapabilityCategories returns common capability categories for discovery.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is a searchable collection of server entries.
func Default ¶
func Default() *Catalog
Default returns a catalog populated with well-known MCP servers. These are curated servers that are commonly used and well-tested.
type Entry ¶
type Entry struct {
// Name is the unique identifier for this server (e.g., "context7")
Name string `json:"name" yaml:"name"`
// Description is a human-readable description of the server's purpose
Description string `json:"description" yaml:"description"`
// Capabilities are tags describing what this server can do
// (e.g., ["documentation", "code-search", "library-lookup"])
Capabilities []string `json:"capabilities" yaml:"capabilities"`
// Command is the executable to run (for stdio transport)
Command string `json:"command,omitempty" yaml:"command,omitempty"`
// Args are command-line arguments
Args []string `json:"args,omitempty" yaml:"args,omitempty"`
// EnvVars are required environment variables (names only, not values)
EnvVars []string `json:"env_vars,omitempty" yaml:"env_vars,omitempty"`
// URL is the upstream URL (for http/sse transport)
URL string `json:"url,omitempty" yaml:"url,omitempty"`
// Source is where to find more information (e.g., GitHub URL)
Source string `json:"source,omitempty" yaml:"source,omitempty"`
// Transport is "stdio", "http", or "sse" (default: stdio)
Transport string `json:"transport,omitempty" yaml:"transport,omitempty"`
// CodemodeNamespace is the OpenCode Code Mode namespace used to call the
// server's tools (tools.<namespace>.*). It defaults to Name.
CodemodeNamespace string `json:"codemode_namespace,omitempty" yaml:"codemode_namespace,omitempty"`
}
Entry represents an MCP server available for installation.
func (*Entry) GetCodemodeNamespace ¶ added in v1.3.2
GetCodemodeNamespace returns the configured OpenCode Code Mode namespace, defaulting to the catalog entry name for backward compatibility.
func (*Entry) GetTransport ¶
GetTransport returns the transport type, defaulting to "stdio".
func (*Entry) HasCapability ¶
HasCapability checks if the entry has the given capability (case-insensitive).