CherryHQ/cherry-studio · error · Error

Invalid manifest: missing version

Error message

Invalid manifest: missing version

What it means

Thrown during manifest validation when the required top-level version field is missing or falsy. After name, the service checks version because the package directory is managed per-version and an empty version would break version comparison and update logic.

Source

Thrown at src/main/ai/mcp/McpPackageService.ts:553

      // Validate required fields in manifest
      let manifest: McpPackageManifest
      if (packageFormat === 'mcpb') {
        if (!parsedManifest.manifest_version) {
          throw new Error('Invalid manifest: missing manifest_version')
        }
        manifest = { ...parsedManifest, manifest_version: parsedManifest.manifest_version }
      } else {
        if (!parsedManifest.dxt_version) {
          throw new Error('Invalid manifest: missing dxt_version')
        }
        manifest = { ...parsedManifest, dxt_version: parsedManifest.dxt_version }
      }
      if (!manifest.name) {
        throw new Error('Invalid manifest: missing name')
      }
      if (!manifest.version) {
        throw new Error('Invalid manifest: missing version')
      }
      if (!manifest.server) {
        throw new Error('Invalid manifest: missing server configuration')
      }
      if (!manifest.server.mcp_config) {
        throw new Error('Invalid manifest: missing server.mcp_config')
      }
      if (!manifest.server.mcp_config.command) {
        throw new Error('Invalid manifest: missing server.mcp_config.command')
      }
      if (!Array.isArray(manifest.server.mcp_config.args)) {
        throw new Error('Invalid manifest: server.mcp_config.args must be an array')
      }

      // Use server name as the final extract directory for automatic version management
      const serverDirName = `server-${manifest.name}`
      const finalExtractDir = ensurePathWithin(this.mcpDir, path.join(this.mcpDir, serverDirName))

View on GitHub (pinned to 726446b54c)

Solutions

  1. Add a top-level "version" field using a semver string (e.g. "1.0.0").
  2. If the version lives in a build source (package.json), wire the build script to copy it into manifest.json at package time.
  3. Repackage and re-upload.

Example fix

// manifest.json - before
{ "name": "my-server", ... }
// after
{ "name": "my-server", "version": "1.0.0", ... }
Defensive patterns

Strategy: validation

Validate before calling

function manifestHasVersion(manifest: any): boolean {
  return !!manifest && typeof manifest.version === 'string' && manifest.version.length > 0
}

Type guard

function hasManifestVersion(m: any): m is { version: string } {
  return !!m && typeof m.version === 'string' && m.version.length > 0
}

Prevention

When it happens

Trigger: manifest.json has a name but no "version", or "version": "" / null. The field is required as a string per the BaseMcpPackageManifest type.

Common situations: The author set the version in package.json but forgot to mirror it into manifest.json; the version field was renamed (e.g. "v"); the manifest was hand-edited and the field was dropped.

Related errors


AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12). Data as JSON: /api/errors/1dc7b3a5908e7609. Report an issue: GitHub.