modelcontextprotocol / modelcontextprotocol/registry

GitHub namespace permissions are case-sensitive but GitHub usernames/orgs are case-insensitive

Open
#689 5 comments 0 reactions 1 assignee View on GitHub

@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

  1. Authenticate via GitHub OIDC from a repository owned by an organization with capital letters (e.g., PrefectHQ)
  2. Create a server.json with a lowercase namespace: io.github.prefecthq/my-server
  3. Attempt to publish using mcp-publisher publish
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.