Documentation
¶
Index ¶
Constants ¶
View Source
const CommunityRegistryBaseURL = "https://registry.modelcontextprotocol.io"
CommunityRegistryBaseURL is the base URL for the community MCP registry
Variables ¶
This section is empty.
Functions ¶
func BuildServerURL ¶ added in v0.39.0
BuildServerURL constructs the full registry URL for a server Format: https://registry.modelcontextprotocol.io/v0/servers/{encoded_name}/versions/{version}
Types ¶
type Client ¶
type Client interface {
GetServer(ctx context.Context, url *ServerURL) (registryapi.ServerResponse, error)
GetServerVersions(ctx context.Context, url *ServerURL) (registryapi.ServerListResponse, error)
}
type ServerURL ¶
type ServerURL struct {
// BaseURL is the host plus anything before the API version (e.g., "https://registry.modelcontextprotocol.io")
BaseURL string
// APIVersion is the API version (e.g., "v0")
APIVersion string
// ServerName is the URL-encoded server name (e.g., "ai.aliengiraffe%2Fspotdb")
ServerName string
// Version (e.g., "latest", "0.1.0") - defaults to "latest" if not set
Version string
// RawURL is the original URL that was parsed
RawURL string
}
ServerURL represents a parsed MCP registry URL
func ParseServerURL ¶
ParseServerURL parses an MCP registry URL into its components
func (*ServerURL) IsLatestVersion ¶
func (*ServerURL) LatestVersionURL ¶
LatestVersionURL returns the URL for the latest version endpoint
func (*ServerURL) VersionsListURL ¶
VersionsListURL returns the URL for the versions list endpoint
func (*ServerURL) WithVersion ¶
Click to show internal directories.
Click to hide internal directories.