@@ -130,7 +130,7 @@ func (r *Registry) Resolve(name string, opt ...options.ResolveOption) (packages.
130
130
"filters" , fs ,
131
131
)
132
132
133
- result , transformed := r .buildPackageResult (name )
133
+ result , transformed := r .serverForID (name )
134
134
if ! transformed {
135
135
return packages.Server {}, fmt .Errorf ("failed to build package result for '%s'" , name )
136
136
}
@@ -176,7 +176,7 @@ func (r *Registry) Search(
176
176
r .logger .Debug ("Searching for package" , "name" , name , "filters" , fs , "source" , opts .Source )
177
177
var results []packages.Server
178
178
for id := range r .mcpServers {
179
- result , transformed := r .buildPackageResult (id )
179
+ result , transformed := r .serverForID (id )
180
180
if ! transformed {
181
181
continue
182
182
}
@@ -200,11 +200,11 @@ func (r *Registry) Search(
200
200
return results , nil
201
201
}
202
202
203
- // buildPackageResult attempts to convert the MCPServer associated with the specified ID,
203
+ // serverForID attempts to convert the MCPServer associated with the specified ID,
204
204
// into a Server.
205
205
// Returns the transformed result, and a flag to indicate if the transformation was successful.
206
206
// If the server cannot be transformed due to unsupported or malformed runtime installations, false is returned.
207
- func (r * Registry ) buildPackageResult (pkgKey string ) (packages.Server , bool ) {
207
+ func (r * Registry ) serverForID (pkgKey string ) (packages.Server , bool ) {
208
208
// Sanity check to ensure things work when a random ID gets supplied.
209
209
sd , foundServer := r .mcpServers [pkgKey ]
210
210
if ! foundServer {
@@ -237,19 +237,23 @@ func (r *Registry) buildPackageResult(pkgKey string) (packages.Server, bool) {
237
237
installations := convertInstallations (sd , r .supportedRuntimes )
238
238
239
239
return packages.Server {
240
- Source : RegistryName ,
241
- ID : pkgKey ,
242
- Name : pkgKey ,
243
- DisplayName : sd .DisplayName ,
244
- Description : sd .Description ,
245
- License : sd .License ,
246
- Tools : tools ,
247
- Tags : sd .Tags ,
240
+ Arguments : arguments ,
248
241
Categories : sd .Categories ,
242
+ Deprecated : false , // MCPM doesn't support deprecated packages
243
+ Description : sd .Description ,
244
+ DisplayName : sd .DisplayName ,
245
+ Homepage : sd .Homepage ,
246
+ ID : pkgKey ,
249
247
Installations : installations ,
250
- Arguments : arguments ,
251
248
IsOfficial : sd .IsOfficial ,
252
- Deprecated : false , // MCPM doesn't support deprecated packages
249
+ License : sd .License ,
250
+ Name : pkgKey ,
251
+ Publisher : packages.Publisher {
252
+ Name : sd .Author .Name ,
253
+ },
254
+ Source : RegistryName ,
255
+ Tags : sd .Tags ,
256
+ Tools : tools ,
253
257
}, true
254
258
}
255
259
0 commit comments