registry

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package registry contains the core type definitions for the MCP registry system.

Index

Constants

View Source
const PublisherProvidedKey = "io.modelcontextprotocol.registry/publisher-provided"

PublisherProvidedKey is the key used in the _meta object for publisher-provided extensions

View Source
const ToolHivePublisherNamespace = "io.github.stacklok"

ToolHivePublisherNamespace is the publisher namespace used by ToolHive in the publisher-provided extensions: "io.github.stacklok"

Variables

This section is empty.

Functions

func SortServersByName

func SortServersByName(servers []ServerMetadata)

SortServersByName sorts a slice of ServerMetadata by name

Types

type BaseServerMetadata

type BaseServerMetadata struct {
	// Name is the identifier for the MCP server, used when referencing the server in commands
	// If not provided, it will be auto-generated from the registry key
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Description is a human-readable description of the server's purpose and functionality
	Description string `json:"description" yaml:"description"`
	// Tier represents the tier classification level of the server, e.g., "Official" or "Community"
	Tier string `json:"tier" yaml:"tier"`
	// Status indicates whether the server is currently active or deprecated
	Status string `json:"status" yaml:"status"`
	// Transport defines the communication protocol for the server
	// For containers: stdio, sse, or streamable-http
	// For remote servers: sse or streamable-http (stdio not supported)
	Transport string `json:"transport" yaml:"transport"`
	// Tools is a list of tool names provided by this MCP server
	Tools []string `json:"tools" yaml:"tools"`
	// Metadata contains additional information about the server such as popularity metrics
	Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	// RepositoryURL is the URL to the source code repository for the server
	RepositoryURL string `json:"repository_url,omitempty" yaml:"repository_url,omitempty"`
	// Tags are categorization labels for the server to aid in discovery and filtering
	Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
	// CustomMetadata allows for additional user-defined metadata
	CustomMetadata map[string]any `json:"custom_metadata,omitempty" yaml:"custom_metadata,omitempty"`
}

BaseServerMetadata contains common fields shared between container and remote MCP servers

type EnvVar

type EnvVar struct {
	// Name is the environment variable name (e.g., API_KEY)
	Name string `json:"name" yaml:"name"`
	// Description is a human-readable explanation of the variable's purpose
	Description string `json:"description" yaml:"description"`
	// Required indicates whether this environment variable must be provided
	// If true and not provided via command line or secrets, the user will be prompted for a value
	Required bool `json:"required" yaml:"required"`
	// Default is the value to use if the environment variable is not explicitly provided
	// Only used for non-required variables
	Default string `json:"default,omitempty" yaml:"default,omitempty"`
	// Secret indicates whether this environment variable contains sensitive information
	// If true, the value will be stored as a secret rather than as a plain environment variable
	Secret bool `json:"secret,omitempty" yaml:"secret,omitempty"`
}

EnvVar represents an environment variable for an MCP server

type Group

type Group struct {
	// Name is the identifier for the group, used when referencing the group in commands
	Name string `json:"name" yaml:"name"`
	// Description is a human-readable description of the group's purpose and functionality
	Description string `json:"description" yaml:"description"`
	// Servers is a map of server names to their corresponding server definitions within this group
	Servers map[string]*ImageMetadata `json:"servers,omitempty" yaml:"servers,omitempty"`
	// RemoteServers is a map of server names to their corresponding remote server definitions within this group
	RemoteServers map[string]*RemoteServerMetadata `json:"remote_servers,omitempty" yaml:"remote_servers,omitempty"`
}

Group represents a collection of related MCP servers that can be deployed together

func (*Group) GetAllGroupServers

func (g *Group) GetAllGroupServers() []ServerMetadata

GetAllGroupServers returns all servers from a specific group (both container and remote) as a unified list

type Header struct {
	// Name is the header name (e.g., X-API-Key, Authorization)
	Name string `json:"name" yaml:"name"`
	// Description is a human-readable explanation of the header's purpose
	Description string `json:"description" yaml:"description"`
	// Required indicates whether this header must be provided
	// If true and not provided via command line or secrets, the user will be prompted for a value
	Required bool `json:"required" yaml:"required"`
	// Default is the value to use if the header is not explicitly provided
	// Only used for non-required headers
	Default string `json:"default,omitempty" yaml:"default,omitempty"`
	// Secret indicates whether this header contains sensitive information
	// If true, the value will be stored as a secret rather than as plain text
	Secret bool `json:"secret,omitempty" yaml:"secret,omitempty"`
	// Choices provides a list of valid values for the header (optional)
	Choices []string `json:"choices,omitempty" yaml:"choices,omitempty"`
}

Header represents an HTTP header for remote MCP server authentication

type ImageMetadata

type ImageMetadata struct {
	BaseServerMetadata
	// Image is the Docker image reference for the MCP server
	Image string `json:"image" yaml:"image"`
	// TargetPort is the port for the container to expose (only applicable to SSE and Streamable HTTP transports)
	TargetPort int `json:"target_port,omitempty" yaml:"target_port,omitempty"`
	// ProxyPort is the port for the HTTP proxy to listen on (host port)
	// If not specified, a random available port will be assigned
	ProxyPort int `json:"proxy_port,omitempty" yaml:"proxy_port,omitempty"`
	// Permissions defines the security profile and access permissions for the server
	Permissions *permissions.Profile `json:"permissions,omitempty" yaml:"permissions,omitempty"`
	// EnvVars defines environment variables that can be passed to the server
	EnvVars []*EnvVar `json:"env_vars,omitempty" yaml:"env_vars,omitempty"`
	// Args are the default command-line arguments to pass to the MCP server container.
	// These arguments will be used only if no command-line arguments are provided by the user.
	// If the user provides arguments, they will override these defaults.
	Args []string `json:"args,omitempty" yaml:"args,omitempty"`
	// DockerTags lists the available Docker tags for this server image
	DockerTags []string `json:"docker_tags,omitempty" yaml:"docker_tags,omitempty"`
	// Provenance contains verification and signing metadata
	Provenance *Provenance `json:"provenance,omitempty" yaml:"provenance,omitempty"`
}

ImageMetadata represents the metadata for an MCP server image stored in our registry.

func (*ImageMetadata) GetCustomMetadata

func (i *ImageMetadata) GetCustomMetadata() map[string]any

GetCustomMetadata returns custom metadata

func (*ImageMetadata) GetDescription

func (i *ImageMetadata) GetDescription() string

GetDescription returns the server description

func (*ImageMetadata) GetEnvVars

func (i *ImageMetadata) GetEnvVars() []*EnvVar

GetEnvVars returns environment variables

func (*ImageMetadata) GetMetadata

func (i *ImageMetadata) GetMetadata() *Metadata

GetMetadata returns the server metadata

func (*ImageMetadata) GetName

func (i *ImageMetadata) GetName() string

GetName returns the server name

func (*ImageMetadata) GetRepositoryURL

func (i *ImageMetadata) GetRepositoryURL() string

GetRepositoryURL returns the repository URL

func (*ImageMetadata) GetStatus

func (i *ImageMetadata) GetStatus() string

GetStatus returns the server status

func (*ImageMetadata) GetTags

func (i *ImageMetadata) GetTags() []string

GetTags returns the server tags

func (*ImageMetadata) GetTier

func (i *ImageMetadata) GetTier() string

GetTier returns the server tier

func (*ImageMetadata) GetTools

func (i *ImageMetadata) GetTools() []string

GetTools returns the list of tools provided by the server

func (*ImageMetadata) GetTransport

func (i *ImageMetadata) GetTransport() string

GetTransport returns the server transport

func (*ImageMetadata) IsRemote

func (*ImageMetadata) IsRemote() bool

IsRemote returns false for container servers

func (*ImageMetadata) UnmarshalYAML added in v0.9.0

func (i *ImageMetadata) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML implements custom YAML unmarshaling for ImageMetadata. This handles flattening of embedded BaseServerMetadata fields since we can't use yaml:",inline" tags (they break swag v2 OpenAPI generation). See: https://github.com/swaggo/swag/issues/2140

type KubernetesMetadata added in v0.9.2

type KubernetesMetadata struct {
	// Kind is the Kubernetes resource kind (e.g., MCPServer, VirtualMCPServer, MCPRemoteProxy)
	Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
	// Namespace is the Kubernetes namespace where the resource is deployed
	Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	// Name is the Kubernetes resource name
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// UID is the Kubernetes resource UID
	UID string `json:"uid,omitempty" yaml:"uid,omitempty"`
	// Image is the container image used by the Kubernetes workload (applicable to MCPServer)
	Image string `json:"image,omitempty" yaml:"image,omitempty"`
	// Transport is the transport type configured for the Kubernetes workload (applicable to MCPServer)
	Transport string `json:"transport,omitempty" yaml:"transport,omitempty"`
}

KubernetesMetadata contains Kubernetes-specific metadata for MCP servers deployed in Kubernetes clusters. This metadata is automatically populated by ToolHive Registry Server's auto-discovery feature, which publishes Kubernetes-deployed MCP servers that have the required registry annotations (e.g., toolhive.stacklok.com/registry-description, toolhive.stacklok.com/registry-url).

type Metadata

type Metadata struct {
	// Stars represents the popularity rating or number of stars for the server
	Stars int `json:"stars,omitempty" yaml:"stars,omitempty"`
	// Pulls indicates how many times the server image has been downloaded
	Pulls int `json:"pulls,omitempty" yaml:"pulls,omitempty"`
	// LastUpdated is the timestamp when the server was last updated, in RFC3339 format
	LastUpdated string `json:"last_updated,omitempty" yaml:"last_updated,omitempty"`
	// Kubernetes contains Kubernetes-specific metadata when the MCP server is deployed in a cluster.
	// This field is optional and only populated when:
	// - The server is served from ToolHive Registry Server
	// - The server was auto-discovered from a Kubernetes deployment
	// - The Kubernetes resource has the required registry annotations
	Kubernetes *KubernetesMetadata `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"`
}

Metadata represents metadata about an MCP server

func (*Metadata) ParsedTime

func (m *Metadata) ParsedTime() (time.Time, error)

ParsedTime returns the LastUpdated field as a time.Time

type OAuthConfig

type OAuthConfig struct {
	// Issuer is the OAuth/OIDC issuer URL (e.g., https://accounts.google.com)
	// Used for OIDC discovery to find authorization and token endpoints
	Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
	// AuthorizeURL is the OAuth authorization endpoint URL
	// Used for non-OIDC OAuth flows when issuer is not provided
	AuthorizeURL string `json:"authorize_url,omitempty" yaml:"authorize_url,omitempty"`
	// TokenURL is the OAuth token endpoint URL
	// Used for non-OIDC OAuth flows when issuer is not provided
	TokenURL string `json:"token_url,omitempty" yaml:"token_url,omitempty"`
	// ClientID is the OAuth client ID for authentication
	ClientID string `json:"client_id,omitempty" yaml:"client_id,omitempty"`
	// Scopes are the OAuth scopes to request
	// If not specified, defaults to ["openid", "profile", "email"] for OIDC
	Scopes []string `json:"scopes,omitempty" yaml:"scopes,omitempty"`
	// UsePKCE indicates whether to use PKCE for the OAuth flow
	// Defaults to true for enhanced security
	UsePKCE bool `json:"use_pkce,omitempty" yaml:"use_pkce,omitempty"`
	// OAuthParams contains additional OAuth parameters to include in the authorization request
	// These are server-specific parameters like "prompt", "response_mode", etc.
	OAuthParams map[string]string `json:"oauth_params,omitempty" yaml:"oauth_params,omitempty"`
	// CallbackPort is the specific port to use for the OAuth callback server
	// If not specified, a random available port will be used
	CallbackPort int `json:"callback_port,omitempty" yaml:"callback_port,omitempty"`
	// Resource is the OAuth 2.0 resource indicator (RFC 8707)
	Resource string `json:"resource,omitempty" yaml:"resource,omitempty"`
}

OAuthConfig represents OAuth/OIDC configuration for remote server authentication

type Provenance

type Provenance struct {
	SigstoreURL       string               `json:"sigstore_url" yaml:"sigstore_url"`
	RepositoryURI     string               `json:"repository_uri" yaml:"repository_uri"`
	RepositoryRef     string               `json:"repository_ref,omitempty" yaml:"repository_ref,omitempty"`
	SignerIdentity    string               `json:"signer_identity" yaml:"signer_identity"`
	RunnerEnvironment string               `json:"runner_environment" yaml:"runner_environment"`
	CertIssuer        string               `json:"cert_issuer" yaml:"cert_issuer"`
	Attestation       *VerifiedAttestation `json:"attestation,omitempty" yaml:"attestation,omitempty"`
}

Provenance contains metadata about the image's provenance and signing status

type Registry

type Registry struct {
	// Version is the schema version of the registry
	Version string `json:"version" yaml:"version"`
	// LastUpdated is the timestamp when the registry was last updated, in RFC3339 format
	LastUpdated string `json:"last_updated" yaml:"last_updated"`
	// Servers is a map of server names to their corresponding server definitions
	Servers map[string]*ImageMetadata `json:"servers" yaml:"servers"`
	// RemoteServers is a map of server names to their corresponding remote server definitions
	// These are MCP servers accessed via HTTP/HTTPS using the thv proxy command
	RemoteServers map[string]*RemoteServerMetadata `json:"remote_servers,omitempty" yaml:"remote_servers,omitempty"`
	// Groups is a slice of group definitions containing related MCP servers
	Groups []*Group `json:"groups,omitempty" yaml:"groups,omitempty"`
}

Registry represents the top-level structure of the MCP registry

func (*Registry) GetAllGroups

func (reg *Registry) GetAllGroups() []*Group

GetAllGroups returns all groups in the registry

func (*Registry) GetAllServers

func (reg *Registry) GetAllServers() []ServerMetadata

GetAllServers returns all servers (both container and remote) as a unified list

func (*Registry) GetGroupByName

func (reg *Registry) GetGroupByName(name string) (*Group, bool)

GetGroupByName returns a group by name

func (*Registry) GetServerByName

func (reg *Registry) GetServerByName(name string) (ServerMetadata, bool)

GetServerByName returns a server by name (either container or remote)

type RemoteServerMetadata

type RemoteServerMetadata struct {
	BaseServerMetadata
	// URL is the endpoint URL for the remote MCP server (e.g., https://api.example.com/mcp)
	URL string `json:"url" yaml:"url"`
	// Headers defines HTTP headers that can be passed to the remote server for authentication
	// These are used with the thv proxy command's authentication features
	Headers []*Header `json:"headers,omitempty" yaml:"headers,omitempty"`
	// OAuthConfig provides OAuth/OIDC configuration for authentication to the remote server
	// Used with the thv proxy command's --remote-auth flags
	OAuthConfig *OAuthConfig `json:"oauth_config,omitempty" yaml:"oauth_config,omitempty"`
	// EnvVars defines environment variables that can be passed to configure the client
	// These might be needed for client-side configuration when connecting to the remote server
	EnvVars []*EnvVar `json:"env_vars,omitempty" yaml:"env_vars,omitempty"`
}

RemoteServerMetadata represents the metadata for a remote MCP server accessed via HTTP/HTTPS. Remote servers are accessed through the thv proxy command which handles authentication and tunneling.

func (*RemoteServerMetadata) GetCustomMetadata

func (r *RemoteServerMetadata) GetCustomMetadata() map[string]any

GetCustomMetadata returns custom metadata

func (*RemoteServerMetadata) GetDescription

func (r *RemoteServerMetadata) GetDescription() string

GetDescription returns the server description

func (*RemoteServerMetadata) GetEnvVars

func (r *RemoteServerMetadata) GetEnvVars() []*EnvVar

GetEnvVars returns environment variables

func (*RemoteServerMetadata) GetMetadata

func (r *RemoteServerMetadata) GetMetadata() *Metadata

GetMetadata returns the server metadata

func (*RemoteServerMetadata) GetName

func (r *RemoteServerMetadata) GetName() string

GetName returns the server name

func (*RemoteServerMetadata) GetRawImplementation

func (r *RemoteServerMetadata) GetRawImplementation() any

GetRawImplementation returns the underlying RemoteServerMetadata pointer

func (*RemoteServerMetadata) GetRepositoryURL

func (r *RemoteServerMetadata) GetRepositoryURL() string

GetRepositoryURL returns the repository URL

func (*RemoteServerMetadata) GetStatus

func (r *RemoteServerMetadata) GetStatus() string

GetStatus returns the server status

func (*RemoteServerMetadata) GetTags

func (r *RemoteServerMetadata) GetTags() []string

GetTags returns the server tags

func (*RemoteServerMetadata) GetTier

func (r *RemoteServerMetadata) GetTier() string

GetTier returns the server tier

func (*RemoteServerMetadata) GetTools

func (r *RemoteServerMetadata) GetTools() []string

GetTools returns the list of tools provided by the server

func (*RemoteServerMetadata) GetTransport

func (r *RemoteServerMetadata) GetTransport() string

GetTransport returns the server transport

func (*RemoteServerMetadata) IsRemote

func (*RemoteServerMetadata) IsRemote() bool

IsRemote returns true for remote servers

func (*RemoteServerMetadata) UnmarshalYAML added in v0.9.0

func (r *RemoteServerMetadata) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML implements custom YAML unmarshaling for RemoteServerMetadata. This handles flattening of embedded BaseServerMetadata fields since we can't use yaml:",inline" tags (they break swag v2 OpenAPI generation). See: https://github.com/swaggo/swag/issues/2140

type ServerExtensions added in v0.9.2

type ServerExtensions struct {
	// Status indicates whether the server is active or deprecated (required)
	Status string `json:"status" yaml:"status"`
	// Tier represents the classification level (e.g., "Official", "Community")
	Tier string `json:"tier,omitempty" yaml:"tier,omitempty"`
	// Tools lists the tool names provided by this MCP server
	Tools []string `json:"tools,omitempty" yaml:"tools,omitempty"`
	// Tags are categorization labels for search and filtering
	Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
	// Metadata contains popularity metrics and optional Kubernetes-specific metadata.
	// The Kubernetes metadata is only populated when:
	// - The server is served from ToolHive Registry Server
	// - The server was auto-discovered from a Kubernetes deployment
	// - The Kubernetes resource has the required registry annotations
	Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	// CustomMetadata allows for additional user-defined metadata
	CustomMetadata map[string]any `json:"custom_metadata,omitempty" yaml:"custom_metadata,omitempty"`

	// Permissions defines security permissions for container-based servers
	Permissions *permissions.Profile `json:"permissions,omitempty" yaml:"permissions,omitempty"`
	// Args are default command-line arguments for container-based servers
	Args []string `json:"args,omitempty" yaml:"args,omitempty"`
	// Provenance contains supply chain provenance information for container-based servers
	Provenance *Provenance `json:"provenance,omitempty" yaml:"provenance,omitempty"`
	// DockerTags lists available Docker tags for container-based servers
	DockerTags []string `json:"docker_tags,omitempty" yaml:"docker_tags,omitempty"`
	// ProxyPort is the HTTP proxy port for container-based servers (1-65535)
	ProxyPort int `json:"proxy_port,omitempty" yaml:"proxy_port,omitempty"`

	// OAuthConfig defines OAuth/OIDC configuration for remote servers
	OAuthConfig *OAuthConfig `json:"oauth_config,omitempty" yaml:"oauth_config,omitempty"`
	// EnvVars defines environment variables for remote server client configuration
	EnvVars []*EnvVar `json:"env_vars,omitempty" yaml:"env_vars,omitempty"`

	// ToolDefinitions contains an array of MCP Tool definitions that describe the tools
	// available from this server. This field can be populated by:
	// - ToolHive Registry Server (extracted from Kubernetes annotations)
	// - Registry publishers (to pre-declare available tools)
	// - Any other source that wants to advertise tool capabilities
	// The array contains Tool objects as defined in the MCP specification.
	ToolDefinitions []mcp.Tool `json:"tool_definitions,omitempty" yaml:"tool_definitions,omitempty"`
}

ServerExtensions represents the ToolHive-specific extensions for an MCP server in the publisher-provided metadata format.

This structure is used in the _meta["io.modelcontextprotocol.registry/publisher-provided"] section of the upstream MCP registry format, keyed by server identifier:

  • For container servers: keyed by OCI image reference (e.g., "ghcr.io/org/image:tag")
  • For remote servers: keyed by URL (e.g., "https://api.example.com/mcp")

Container servers may use: Status, Tier, Tools, Tags, Metadata, CustomMetadata, Permissions, Args, Provenance, DockerTags, ProxyPort, ToolDefinitions

Remote servers may use: Status, Tier, Tools, Tags, Metadata, CustomMetadata, OAuthConfig, EnvVars, ToolDefinitions

type ServerMetadata

type ServerMetadata interface {
	// GetName returns the server name
	GetName() string
	// GetDescription returns the server description
	GetDescription() string
	// GetTier returns the server tier
	GetTier() string
	// GetStatus returns the server status
	GetStatus() string
	// GetTransport returns the server transport
	GetTransport() string
	// GetTools returns the list of tools provided by the server
	GetTools() []string
	// GetMetadata returns the server metadata
	GetMetadata() *Metadata
	// GetRepositoryURL returns the repository URL
	GetRepositoryURL() string
	// GetTags returns the server tags
	GetTags() []string
	// GetCustomMetadata returns custom metadata
	GetCustomMetadata() map[string]any
	// IsRemote returns true if this is a remote server
	IsRemote() bool
	// GetEnvVars returns environment variables
	GetEnvVars() []*EnvVar
}

ServerMetadata is an interface that both ImageMetadata and RemoteServerMetadata implement

type Skill added in v0.9.4

type Skill struct {
	// Namespace is the namespace of the skill.
	// The format is reverse-DNS, e.g. "io.github.user".
	Namespace string `json:"namespace"`
	// Name is the name of the skill.
	// The format is that of identifiers, e.g. "my-skill".
	Name string `json:"name"`
	// Description is the description of the skill.
	Description string `json:"description"`
	// Version is the version of the skill.
	// Any non-empty string is valid, but ideally it should be either a
	// semantic version or a commit hash.
	Version string `json:"version"`
	// Status is the status of the skill.
	// Can be one of "active", "deprecated", or "archived".
	Status string `json:"status,omitempty"` // active, deprecated, archived
	// Title is the title of the skill.
	// This is for human consumption, not an identifier.
	Title string `json:"title,omitempty"`
	// License is the SPDX license identifier of the skill.
	License string `json:"license,omitempty"`
	// Compatibility is the environment requirements of the skill.
	Compatibility string `json:"compatibility,omitempty"`
	// AllowedTools is the list of tools that the skill is compatible with.
	// This is experimental.
	AllowedTools []string `json:"allowedTools,omitempty"`
	// Repository is the source repository of the skill.
	Repository *SkillRepository `json:"repository,omitempty"`
	// Icons is the list of icons for the skill.
	Icons []SkillIcon `json:"icons,omitempty"`
	// Packages is the list of packages for the skill.
	Packages []SkillPackage `json:"packages,omitempty"`
	// Metadata is the official metadata of the skill as reported in the
	// SKILL.md file.
	Metadata map[string]any `json:"metadata,omitempty"`
	// Meta is an opaque payload with extended meta data details of the skill.
	Meta map[string]any `json:"_meta,omitempty"`
}

Skill is a single skill in list and get responses or publish requests.

type SkillIcon added in v0.9.4

type SkillIcon struct {
	// Src is the source of the icon.
	Src string `json:"src"`
	// Size is the size of the icon.
	Size string `json:"size,omitempty"`
	// Type is the type of the icon.
	Type string `json:"type,omitempty"`
	// Label is the label of the icon.
	Label string `json:"label,omitempty"`
}

SkillIcon represents a display icon for a skill.

type SkillPackage added in v0.9.4

type SkillPackage struct {
	// RegistryType is the type of registry the package is from.
	// Can be "oci" or "git".
	RegistryType string `json:"registryType"` // "oci" or "git"
	// Identifier is the OCI identifier of the package.
	Identifier string `json:"identifier,omitempty"`
	// Digest is the digest of the package.
	Digest string `json:"digest,omitempty"`
	// MediaType is the media type of the package.
	MediaType string `json:"mediaType,omitempty"`
	// URL is the URL of the package.
	URL string `json:"url,omitempty"`
	// Ref is the reference of the package.
	Ref string `json:"ref,omitempty"`
	// Commit is the commit of the package.
	Commit string `json:"commit,omitempty"`
	// Subfolder is the subfolder of the package.
	Subfolder string `json:"subfolder,omitempty"`
}

SkillPackage represents a distribution package (OCI or Git) in request/response payloads.

type SkillRepository added in v0.9.4

type SkillRepository struct {
	// URL is the URL of the repository.
	URL string `json:"url,omitempty"`
	// Type is the type of the repository.
	Type string `json:"type,omitempty"`
}

SkillRepository represents source repository metadata.

type UpstreamData added in v0.6.7

type UpstreamData struct {
	// Servers contains the server definitions in upstream MCP format
	Servers []upstreamv0.ServerJSON `json:"servers" yaml:"servers"`

	// Groups contains grouped collections of servers (optional, for future use)
	Groups []UpstreamGroup `json:"groups,omitempty" yaml:"groups,omitempty"`
}

UpstreamData contains the actual registry content (servers and groups)

type UpstreamGroup added in v0.6.7

type UpstreamGroup struct {
	// Name is the unique identifier for the group
	Name string `json:"name" yaml:"name"`

	// Description explains the purpose of this group
	Description string `json:"description" yaml:"description"`

	// Servers contains the server definitions in this group
	Servers []upstreamv0.ServerJSON `json:"servers" yaml:"servers"`
}

UpstreamGroup represents a named collection of related MCP servers

type UpstreamMeta added in v0.6.7

type UpstreamMeta struct {
	// LastUpdated is the timestamp when registry was last updated in RFC3339 format
	LastUpdated string `json:"last_updated" yaml:"last_updated"`
}

UpstreamMeta contains metadata about the registry

type UpstreamRegistry

type UpstreamRegistry struct {
	// Schema is the JSON schema URL for validation
	Schema string `json:"$schema" yaml:"$schema"`

	// Version is the schema version (e.g., "1.0.0")
	Version string `json:"version" yaml:"version"`

	// Meta contains registry metadata
	Meta UpstreamMeta `json:"meta" yaml:"meta"`

	// Data contains the actual registry content
	Data UpstreamData `json:"data" yaml:"data"`
}

UpstreamRegistry is the unified registry format that stores servers in upstream ServerJSON format with proper meta/data separation and groups support.

type VerifiedAttestation

type VerifiedAttestation struct {
	PredicateType string `json:"predicate_type,omitempty" yaml:"predicate_type,omitempty"`
	Predicate     any    `json:"predicate,omitempty" yaml:"predicate,omitempty"`
}

VerifiedAttestation represents the verified attestation information

Jump to

Keyboard shortcuts

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