@@ -15,7 +15,13 @@ import (
1515 "github.com/mozilla-ai/mcpd/v2/internal/runtime"
1616)
1717
18- const registryName = "mcpm"
18+ const (
19+ // RegistryName is the name of this registry that will appear as the Package.Source, and in logs/errors.
20+ RegistryName = "mcpm"
21+
22+ // ManifestURL is the URL at which the servers JSON file for the registry can be found for MCPM.
23+ ManifestURL = "https://mcpm.sh/api/servers.json"
24+ )
1925
2026// Ensure Registry implements PackageProvider
2127var _ registry.PackageProvider = (* Registry )(nil )
@@ -53,14 +59,14 @@ func NewRegistry(logger hclog.Logger, url string, opt ...runtime.Option) (*Regis
5359 }
5460
5561 // Handle retrieving the JSON data to bootstrap the registry.
56- servers , err := runtime .LoadFromURL [MCPServers ](url , registryName )
62+ servers , err := runtime .LoadFromURL [MCPServers ](url , RegistryName )
5763 if err != nil {
5864 return nil , err
5965 }
6066
6167 // Configure 'standard' filtering options that should always be included.
6268 // e.g. for unsupported 'version'.
63- l := logger .Named (registryName )
69+ l := logger .Named (RegistryName )
6470 filterOpts := []options.Option {
6571 options .WithUnsupportedKeys (options .FilterKeyVersion ),
6672 options .WithLogFunc (func (key , val string ) {
@@ -85,7 +91,7 @@ func registrySupportedRuntimes() []runtime.Runtime {
8591}
8692
8793func (r * Registry ) ID () string {
88- return registryName
94+ return RegistryName
8995}
9096
9197// Resolve implements the PackageGetter interface for Registry.
@@ -245,7 +251,7 @@ func (r *Registry) buildPackageResult(pkgKey string) (packages.Package, bool) {
245251 arguments := extractArgumentMetadata (sd , r .supportedRuntimes )
246252
247253 return packages.Package {
248- Source : registryName ,
254+ Source : RegistryName ,
249255 ID : pkgKey ,
250256 Name : pkgKey ,
251257 DisplayName : sd .DisplayName ,
0 commit comments