@@ -29,18 +29,6 @@ const (
29
29
30
30
// Server structure types for JSON generation
31
31
32
-
33
-
34
- type ServerJSON struct {
35
- Schema string `json:"$schema"`
36
- Name string `json:"name"`
37
- Description string `json:"description"`
38
- Status string `json:"status,omitempty"`
39
- Repository model.Repository `json:"repository"`
40
- VersionDetail model.VersionDetail `json:"version_detail"`
41
- Packages []model.Package `json:"packages"`
42
- }
43
-
44
32
func main () {
45
33
if len (os .Args ) < 2 {
46
34
printUsage ()
@@ -486,7 +474,7 @@ func createServerStructure(
486
474
name , description , version , repoURL , repoSource , registryName ,
487
475
packageName , packageVersion , runtimeHint , execute string ,
488
476
envVars []string , packageArgs []string , status string ,
489
- ) ServerJSON {
477
+ ) model. ServerJSON {
490
478
// Parse environment variables
491
479
environmentVariables := parseEnvironmentVariables (envVars )
492
480
@@ -552,12 +540,23 @@ func createServerStructure(
552
540
EnvironmentVariables : environmentVariables ,
553
541
}
554
542
543
+ // Convert string status to model.Status type
544
+ var statusValue model.Status
545
+ switch status {
546
+ case "active" :
547
+ statusValue = model .StatusActive
548
+ case "deprecated" :
549
+ statusValue = model .StatusDeprecated
550
+ default :
551
+ statusValue = model .StatusActive // fallback to active
552
+ }
553
+
555
554
// Create server structure
556
- return ServerJSON {
555
+ return model. ServerJSON {
557
556
Schema : "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json" ,
558
557
Name : name ,
559
558
Description : description ,
560
- Status : status ,
559
+ Status : statusValue ,
561
560
Repository : model.Repository {
562
561
URL : repoURL ,
563
562
Source : repoSource ,
0 commit comments