modelcontextprotocol / modelcontextprotocol/registry
GitHub namespace permissions are case-sensitive but GitHub usernames/orgs are case-insensitive
@rdimitrov is already working on this.
Since Apr 24, 2026.
- Dominant language
- Go
- Stars
- 7.3k
- Forks
- 994
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 19
Description
Describe the bug
When authenticating via GitHub OIDC, the registry creates permission patterns using the exact casing from the repository_owner claim (e.g., io.github.PrefectHQ/*). When attempting to publish a server with a lowercase namespace (e.g., io.github.prefecthq/prefect-mcp-server), the publish fails with a 403 error because the permission check at internal/auth/jwt.go:163 uses case-sensitive string matching.
Since GitHub usernames and organization names are case-insensitive, this creates an inconsistency where the registry treats them as case-sensitive.
To Reproduce
- Authenticate via GitHub OIDC from a repository owned by an organization with capital letters (e.g.,
PrefectHQ) - Create a
server.jsonwith a lowercase namespace:io.github.prefecthq/my-server - Attempt to publish using
mcp-publisher publish - Receive 403 error: "You have permission to publish: io.github.PrefectHQ/*. Attempting to publish: io.github.prefecthq/my-server"
Expected behavior
Since GitHub usernames/orgs are case-insensitive, the registry should either:
- Normalize GitHub namespaces to lowercase when creating permissions
- Use case-insensitive matching for
io.github.*namespaces - Accept the server name with either casing
Logs
Publishing to https://registry.modelcontextprotocol.io...
Error: publish failed: server returned status 403: {"title":"Forbidden","status":403,"detail":"You do not have permission to publish this server. You have permission to publish: io.github.PrefectHQ/*. Attempting to publish: io.github.prefecthq/prefect-mcp-server"}
Additional context
The issue occurs in the isResourceMatch function at internal/auth/jwt.go:163 which uses case-sensitive strings.HasPrefix. The permission is created at internal/api/handlers/v0/auth/github_oidc.go:292 using the exact repository_owner value from the OIDC token.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.