Skip to content

Publishing fails with 'duplicate version' for servers not visible in API #873

@olgasafonova

Description

@olgasafonova

Bug Description

When trying to publish io.github.olgasafonova/productplan-mcp-server version 4.7.0, the registry returns:

Error: invalid version: cannot publish duplicate version

However, querying the API returns 404:

curl https://registry.modelcontextprotocol.io/v0.1/servers/io.github.olgasafonova%2Fproductplan-mcp-server
# Returns: 404 Not Found

Root Cause Analysis

Looking at the source code, there's a mismatch between the duplicate check and the public API:

CheckVersionExists (duplicate check):

SELECT EXISTS(SELECT 1 FROM servers WHERE server_name = $1 AND version = $2)

GetServerByName (public API):

SELECT ... FROM servers WHERE server_name = $1 AND is_latest = true

The duplicate check doesn't filter by is_latest, so if a version exists with is_latest = false, it will:

  • Block new publishes (version exists in table)
  • Return 404 on API (no is_latest = true record)

Expected Behavior

Either:

  1. The duplicate check should only consider is_latest = true versions, OR
  2. There should be a way to republish/overwrite versions, OR
  3. A more helpful error message explaining the server exists but isn't visible

Steps to Reproduce

  1. Attempt to publish io.github.olgasafonova/productplan-mcp-server version 4.7.0
  2. Get 'duplicate version' error
  3. Query API - get 404

Environment

  • mcp-publisher CLI (latest)
  • GitHub OAuth authentication

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions