How to register a specific MCP server from a repository that has multiple MCP servers?
Describe the bug
-
I have a repository, say
github.com/contoso/mcp-servers. -
It contains multiple MCP servers, say
my-mcp-server,your-mcp-serverandtheir-mcp-server. -
If I run
mcp-publisher initunder themy-mcp-server, it generates theserver.jsonfile 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-serverin this case.
How can I register a specific MCP server from a repository that contains multiple MCP servers?
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.
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
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.
I think that's a reasonable DX improvement! Thank you
Alright, I created a PR #566 that implements this :)