registry icon indicating copy to clipboard operation
registry copied to clipboard

How to register a specific MCP server from a repository that has multiple MCP servers?

Open justinyoo opened this issue 5 months ago • 5 comments

Describe the bug

  • I have a repository, say github.com/contoso/mcp-servers.

  • It contains multiple MCP servers, say my-mcp-server, your-mcp-server and their-mcp-server.

  • If I run mcp-publisher init under the my-mcp-server, it generates the server.json file like:

    {
      "$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
      "name": "io.github.contoso/mcp-servers",
      "description": "An MCP server that provides [describe what your server does]",
      "status": "active",
      "repository": {
        "url": "https://github.com/contoso/mcp-servers",
        "source": "github"
      },
      // removed for brevity
    }
    

    But to me, it doesn't seem to represent the specific MCP server, my-mcp-server in this case.

How can I register a specific MCP server from a repository that contains multiple MCP servers?

justinyoo avatar Sep 23 '25 07:09 justinyoo

yes, it looks like there's a 1:1 mapping between github repo and mcp server right now, which isn't an assumption that will always hold. I would love it if we could decouple the github authentication from the mcp server name.

MaxKless avatar Sep 23 '25 09:09 MaxKless

Repositories that contain multiple MCP servers are very much supported; there is a subfolder field on Repository (spec).

PRs to improve our examples in the docs are very welcome (and/or improvements to default CLI behavior and server.json init process), if someone would like to make that contribution

tadasant avatar Sep 24 '25 15:09 tadasant

thank you for the response @tadasant - I just misunderstood the docs here. After reading the server.json docs, I saw right away how to configure it properly. I think the tricky thing is that the first part of the name has to match the github org which leads one to believe that the second part has to match the repo, even though it's arbitrary.

What do you think about this change in the server.json init process: If init is called and creates a server.json in a path that isn't the root of the repo, we default to prefilling the mcp name with the parent folder name.

- mcp-servers
  - cool-server
    - src/...
    - server.json <---
- package.json
- ...root files

So in this case, we would create "name": "io.github.yourname/cool-server", which would've helped me understand that name !== repository name.

MaxKless avatar Sep 25 '25 08:09 MaxKless

I think that's a reasonable DX improvement! Thank you

tadasant avatar Sep 26 '25 05:09 tadasant

Alright, I created a PR #566 that implements this :)

MaxKless avatar Sep 29 '25 10:09 MaxKless