Skip to main content
MCP 注册表目前处于预览阶段。在正式可用之前,可能会发生破坏性变更或数据重置。如果遇到问题,请在 GitHub 上报告。

包类型

MCP 注册表支持多种不同包类型,每种包类型都有自己的验证方法。

npm 包

对于 npm 包,MCP 注册表目前仅支持 npm 公共注册表(https://registry.npmjs.org)。 npm 包在 server.json 中使用 "registryType": "npm"。例如:
server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "io.github.username/email-integration-mcp",
  "title": "Email Integration",
  "description": "Send emails and manage email accounts",
  "version": "1.0.0",
  "packages": [
    {
      "registryType": "npm",
      "identifier": "@username/email-integration-mcp",
      "version": "1.0.0",
      "transport": {
        "type": "stdio"
      }
    }
  ]
}

所有权验证

MCP 注册表通过检查 package.json 中的 mcpName 来验证 npm 包所有权。mcpName 属性必须server.json 中的 server 名称匹配。例如:
package.json
{
  "name": "@username/email-integration-mcp",
  "version": "1.0.0",
  "mcpName": "io.github.username/email-integration-mcp"
}

PyPI 包

对于 PyPI 包,MCP 注册表目前仅支持官方 PyPI 注册表(https://pypi.org)。 PyPI 包在 server.json 中使用 "registryType": "pypi"。例如:
server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "io.github.username/database-query-mcp",
  "title": "Database Query",
  "description": "Execute SQL queries and manage database connections",
  "version": "1.0.0",
  "packages": [
    {
      "registryType": "pypi",
      "identifier": "database-query-mcp",
      "version": "1.0.0",
      "transport": {
        "type": "stdio"
      }
    }
  ]
}

所有权验证

MCP 注册表通过检查包 README 中是否存在 mcp-name: $SERVER_NAME 字符串来验证 PyPI 包所有权(该 README 会成为 PyPI 上的包描述)。该字符串可以隐藏在注释中,但 $SERVER_NAME 部分必须server.json 中的 server 名称匹配。例如:
README.md
# Database Query MCP Server

This MCP server executes SQL queries and manages database connections.

<!-- mcp-name: io.github.username/database-query-mcp -->

NuGet 包

对于 NuGet 包,MCP 注册表目前仅支持官方 NuGet 注册表(https://api.nuget.org/v3/index.json)。 NuGet 包在 server.json 中使用 "registryType": "nuget"。例如:
server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "io.github.username/azure-devops-mcp",
  "title": "Azure DevOps",
  "description": "Manage Azure DevOps work items and pipelines",
  "version": "1.0.0",
  "packages": [
    {
      "registryType": "nuget",
      "identifier": "Username.AzureDevOpsMcp",
      "version": "1.0.0",
      "transport": {
        "type": "stdio"
      }
    }
  ]
}

所有权验证

MCP 注册表通过检查包 README 中是否存在 mcp-name: $SERVER_NAME 字符串来验证 NuGet 包所有权。该字符串可以隐藏在注释中,但 $SERVER_NAME 部分必须server.json 中的 server 名称匹配。例如:
README.md
# Azure DevOps MCP Server

This MCP server manages Azure DevOps work items and pipelines.

<!-- mcp-name: io.github.username/azure-devops-mcp -->

Docker/OCI 镜像

对于 Docker/OCI 镜像,MCP 注册表目前支持:
  • 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)
Docker/OCI 镜像在 server.json 中使用 "registryType": "oci"。例如:
server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "io.github.username/kubernetes-manager-mcp",
  "title": "Kubernetes Manager",
  "description": "Deploy and manage Kubernetes resources",
  "version": "1.0.0",
  "packages": [
    {
      "registryType": "oci",
      "identifier": "docker.io/yourusername/kubernetes-manager-mcp:1.0.0",
      "transport": {
        "type": "stdio"
      }
    }
  ]
}
identifier 的格式是 registry/namespace/repository:tag。例如 docker.io/user/app:1.0.0ghcr.io/user/app:1.0.0。Tag 也可以指定为 digest。

所有权验证

MCP 注册表通过检查 io.modelcontextprotocol.server.name annotation 来验证 Docker/OCI 镜像所有权。io.modelcontextprotocol.server.name annotation 的值必须server.json 中的 server 名称匹配。例如:
Dockerfile
LABEL io.modelcontextprotocol.server.name="io.github.username/kubernetes-manager-mcp"

MCPB 包

对于 MCPB 包,MCP 注册表目前支持通过 GitHub 或 GitLab releases 托管的 MCPB artifacts。 MCPB 包在 server.json 中使用 "registryType": "mcpb"。例如:
server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "io.github.username/image-processor-mcp",
  "title": "Image Processor",
  "description": "Process and transform images with various filters",
  "version": "1.0.0",
  "packages": [
    {
      "registryType": "mcpb",
      "identifier": "https://github.com/username/image-processor-mcp/releases/download/v1.0.0/image-processor.mcpb",
      "fileSha256": "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce",
      "transport": {
        "type": "stdio"
      }
    }
  ]
}

验证

MCPB 包 URL(server.json 中的 identifier必须包含字符串 "mcp"。它可以是 .mcpb 文件扩展名的一部分,也可以出现在仓库名称中。 server.json 中的包元数据必须包含 fileSha256 属性,其值是 MCPB artifact 的 SHA-256 hash,可使用 openssl 命令计算:
openssl dgst -sha256 image-processor.mcpb
MCP 注册表不会验证该 hash;不过 MCP clients 在安装前验证该 hash,以确保文件完整性。下游 registries 也可以实现自己的验证。