-
Notifications
You must be signed in to change notification settings - Fork 428
Description
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:
- Run
mcp-publisher init
in a project where the repository can't be determined - 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).