Skip to content

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

@BobDickinson

Description

@BobDickinson

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions