Skip to content

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

Closed

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

Activity

  1. BobDickinson commented on Oct 16, 2025

    @BobDickinson
    ContributorAuthor

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

  2. added a commit that references this issue on Apr 10, 2026
    baf91f6
  3. added a commit that references this issue on Apr 15, 2026
    8df5a77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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