{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "type": {
      "type": "string",
      "enum": [
        "mcp-server",
        "skill",
        "agent",
        "rule"
      ]
    },
    "version": {
      "default": "0.0.0",
      "type": "string"
    },
    "displayName": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "default": "",
      "type": "string"
    },
    "author": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "license": {
      "type": "string"
    },
    "repository": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "subfolder": {
          "type": "string"
        }
      },
      "required": [
        "url"
      ],
      "additionalProperties": false
    },
    "homepage": {
      "type": "string"
    },
    "distribution": {
      "default": {
        "packages": [],
        "remotes": []
      },
      "type": "object",
      "properties": {
        "packages": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "registryType": {
                "type": "string",
                "enum": [
                  "npm",
                  "pypi",
                  "oci",
                  "nuget",
                  "mcpb",
                  "gem",
                  "binary",
                  "source"
                ]
              },
              "identifier": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "runtimeHint": {
                "type": "string"
              },
              "transport": {
                "type": "string",
                "enum": [
                  "stdio",
                  "streamable-http",
                  "sse"
                ]
              },
              "environmentVariables": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "isRequired": {
                      "type": "boolean"
                    },
                    "isSecret": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "registryType",
              "identifier"
            ],
            "additionalProperties": false
          }
        },
        "remotes": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "transport": {
                "type": "string",
                "enum": [
                  "streamable-http",
                  "sse"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "transport",
              "url"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "packages",
        "remotes"
      ],
      "additionalProperties": false
    },
    "capabilities": {
      "type": "object",
      "properties": {
        "tools": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prompts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "dependencies": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "installTargets": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "claude-code",
          "claude-desktop",
          "cursor",
          "openclaw",
          "vscode"
        ]
      }
    },
    "keywords": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "provenance": {
      "type": "object",
      "properties": {
        "origin": {
          "type": "string",
          "enum": [
            "official-mcp-registry",
            "pulsemcp",
            "smithery",
            "mcp-so",
            "github",
            "skillsmp",
            "clawhub",
            "mcp-cn",
            "agenthub"
          ]
        },
        "originalId": {
          "type": "string"
        },
        "originalUrl": {
          "type": "string"
        },
        "isOfficial": {
          "type": "boolean"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "deprecated",
            "deleted"
          ]
        },
        "publishedAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "fetchedAt": {
          "type": "string"
        }
      },
      "required": [
        "origin",
        "originalId",
        "fetchedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "type",
    "version",
    "displayName",
    "description",
    "distribution",
    "dependencies",
    "installTargets",
    "keywords",
    "provenance"
  ],
  "additionalProperties": false
}
