Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/guides/publishing/publish-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ The official MCP registry supports:
- Docker Hub (`docker.io`)
- GitHub Container Registry (`ghcr.io`)
- Google Artifact Registry (any `*.pkg.dev` domain)
- Azure Container Registry (`*.azurecr.io`)
- Microsoft Container Registry (`mcr.microsoft.com`)

</details>

Expand Down
3 changes: 3 additions & 0 deletions docs/reference/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ This applies to both locally-run and remote servers.
- NuGet.org (.NET packages)
- GitHub Container Registry (GHCR)
- Docker Hub
- Google Artifact Registry (`*.pkg.dev` domains)
- Azure Container Registry (`*.azurecr.io` domains)
- Microsoft Container Registry (MCR)

More can be added as the community desires; feel free to open an issue if you are interested in building support for another registry.

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/server-json/official-registry-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Only trusted public registries are supported. Private registries and alternative
- Docker Hub (`docker.io`)
- GitHub Container Registry (`ghcr.io`)
- Google Artifact Registry (`*.pkg.dev`)
- Azure Container Registry (`*.azurecr.io`)
- Microsoft Container Registry (`mcr.microsoft.com`)
- **MCPB**: `https://github.com` releases and `https://gitlab.com` releases only

## `_meta` Namespace Restrictions
Expand Down
9 changes: 9 additions & 0 deletions internal/validators/registries/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ var allowedOCIRegistries = map[string]bool{
"index.docker.io": true, // Docker Hub index
// GitHub Container Registry
"ghcr.io": true,
// Microsoft Container Registry
"mcr.microsoft.com": true,
// Google Artifact Registry (*.pkg.dev pattern handled in isAllowedRegistry)
// Azure Container Registry (*.azurecr.io pattern handled in isAllowedRegistry)
}

// ValidateOCI validates that an OCI image contains the correct MCP server name annotation.
Expand All @@ -47,6 +50,7 @@ var allowedOCIRegistries = map[string]bool{
// - Docker Hub (docker.io)
// - GitHub Container Registry (ghcr.io)
// - Google Artifact Registry (*.pkg.dev)
// - Microsoft Container Registry (mcr.microsoft.com)
func ValidateOCI(ctx context.Context, pkg model.Package, serverName string) error {
if pkg.Identifier == "" {
return ErrMissingIdentifierForOCI
Expand Down Expand Up @@ -149,5 +153,10 @@ func isAllowedRegistry(registry string) bool {
return true
}

// Azure Container Registry: *.azurecr.io
if strings.HasSuffix(registry, ".azurecr.io") {
return true
}

return false
}
12 changes: 12 additions & 0 deletions internal/validators/registries/oci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ func TestValidateOCI_RegistryAllowlist(t *testing.T) {
expectError: true,
errorMsg: "missing required annotation",
},
{
name: "MCR should be allowed",
identifier: "mcr.microsoft.com/dotnet/aspire-dashboard:9.5.0",
expectError: true,
errorMsg: "missing required annotation",
},
{
name: "ACR should be allowed",
identifier: "azurearcjumpstart.azurecr.io/hello-arc:latest",
expectError: true,
errorMsg: "missing required annotation",
},

// Disallowed registries
{
Expand Down
Loading