registry icon indicating copy to clipboard operation
registry copied to clipboard

Empty registry uri fails schema (caused by mcp-publisher)

Open BobDickinson opened this issue 4 months ago • 1 comments

Describe the bug When using mcp-publisher init there are many cases where a repository object is created with empty values, which are later published without any validation or warning, producing server entries that violate the schema. There are currently 88 such servers published in the official registry.

{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json",
  "name": "io.foo/bar-agenti18n-agent",
  "description": "A Foo Bar agent",
  "repository": {
    "url": "",
    "source": ""
  }
}

While the repository is optional in the schema, if repository.url is provided it must validate to the "uri" format, and the empty string fails that validation.

To Reproduce Steps to reproduce the behavior:

  1. Run mcp-publisher init in a project where the repository can't be determined
  2. Run mcp-publisher publish

Expected behavior If detectRepoURL() fails to identify a repo, don't create an empty repository object.

If the goal of the empty repository object is to show the user where to enter the info, and we really want to maintain that, then at very least fail the publish if the values are still empty at publish time (advise user to fill them in or remove the repository object).

BobDickinson avatar Oct 03 '25 18:10 BobDickinson

I'm not sure I fully understand the approach or implementation to data migration, but is it possible to include a migration step that removes the malformed repository properties on existing published servers (esp as they don't validate against the schema)?

BobDickinson avatar Oct 16 '25 18:10 BobDickinson