registry icon indicating copy to clipboard operation
registry copied to clipboard

`mcp-publisher init` does not strip `git+` from repository URL

Open jonathanhefner opened this issue 2 months ago • 2 comments

When using the npm init command to create a new package.json, the repository.url will be prefixed with git+. For example:

// package.json
{
  "name": "my-package",
  "version": "1.0.0",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/jonathanhefner/my-package.git"
  }
}

Then, when using mcp-publisher init to generate server.json, mcp-publisher does not strip the git+ prefix, resulting in an invalid URL:

// server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
  "name": "io.github.jonathanhefner/my-package",
  "repository": {
    "url": "git+https://github.com/jonathanhefner/my-package",
    "source": "github"
  }
}

jonathanhefner avatar Oct 31 '25 21:10 jonathanhefner

@tadasant / @domdomegg Is this fixed? If not, I can take it up.

Avish34 avatar Nov 15 '25 18:11 Avish34

Not sure it's fixed - @Avish34 happy for you to pick it up.

domdomegg avatar Nov 17 '25 12:11 domdomegg