Make mcpb package version optional and fix schema validation (#686)
<!-- Provide a brief summary of your changes --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> The following PR: * Makes mcpb package version property optional * Bumps the schema and reflects that in the code * Makes sure the publisher tests are being covered by doing `make check` ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> ## Breaking Changes <!-- Will users need to update their code or configurations? --> ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] My code follows the repository's style guidelines - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions --> --------- Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
This commit is contained in:
parent
f870a4c000
commit
0828bc483c
6 changed files with 131 additions and 81 deletions
|
|
@ -67,7 +67,7 @@ You can also add custom metadata to servers using the `_meta` field. For example
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.yourname/weather-server",
|
||||
"description": "MCP server for weather data access",
|
||||
"status": "active",
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ This creates a `server.json` with auto-detected values. You'll see something lik
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.yourname/weather-data-mcp",
|
||||
"title": "Weather Data",
|
||||
"description": "Access real-time weather data and forecasts",
|
||||
|
|
@ -153,7 +153,7 @@ Add an `mcpName` field to your `package.json`:
|
|||
### Example server.json
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.username/slack-integration-mcp",
|
||||
"title": "Slack Integration",
|
||||
"description": "Send messages and manage Slack workspaces",
|
||||
|
|
@ -192,7 +192,7 @@ Add it to your README.md file (which becomes the package description on PyPI). T
|
|||
### Example server.json
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.username/database-query-mcp",
|
||||
"title": "Database Query",
|
||||
"description": "Execute SQL queries and manage database connections",
|
||||
|
|
@ -231,7 +231,7 @@ Add a README file to your NuGet package that includes the server name. This can
|
|||
### Example server.json
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.username/azure-devops-mcp",
|
||||
"title": "Azure DevOps",
|
||||
"description": "Manage Azure DevOps work items and pipelines",
|
||||
|
|
@ -274,7 +274,7 @@ LABEL io.modelcontextprotocol.server.name="io.github.username/server-name"
|
|||
### Example server.json (Docker Hub)
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.username/kubernetes-manager-mcp",
|
||||
"title": "Kubernetes Manager",
|
||||
"description": "Deploy and manage Kubernetes resources",
|
||||
|
|
@ -282,9 +282,7 @@ LABEL io.modelcontextprotocol.server.name="io.github.username/server-name"
|
|||
"packages": [
|
||||
{
|
||||
"registryType": "oci",
|
||||
"registryBaseUrl": "https://docker.io",
|
||||
"identifier": "yourusername/kubernetes-manager-mcp",
|
||||
"version": "1.0.0",
|
||||
"identifier": "docker.io/yourusername/kubernetes-manager-mcp:1.0.0",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
}
|
||||
|
|
@ -296,7 +294,7 @@ LABEL io.modelcontextprotocol.server.name="io.github.username/server-name"
|
|||
### Example server.json (GitHub Container Registry)
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.username/git-operations-mcp",
|
||||
"title": "Git Operations",
|
||||
"description": "Advanced Git repository management and operations",
|
||||
|
|
@ -304,9 +302,7 @@ LABEL io.modelcontextprotocol.server.name="io.github.username/server-name"
|
|||
"packages": [
|
||||
{
|
||||
"registryType": "oci",
|
||||
"registryBaseUrl": "https://ghcr.io",
|
||||
"identifier": "username/git-operations-mcp",
|
||||
"version": "1.0.0",
|
||||
"identifier": "ghcr.io/username/git-operations-mcp:1.0.0",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
}
|
||||
|
|
@ -315,9 +311,9 @@ LABEL io.modelcontextprotocol.server.name="io.github.username/server-name"
|
|||
}
|
||||
```
|
||||
|
||||
The identifier is `namespace/repository`, and version is the tag and optionally digest.
|
||||
The identifier format is `registry/namespace/repository:tag` (e.g., `docker.io/user/app:1.0.0` or `ghcr.io/user/app:1.0.0`). The version can also be specified as a digest.
|
||||
|
||||
The official MCP registry currently supports Docker Hub (`https://docker.io`) and GitHub Container Registry (`https://ghcr.io`).
|
||||
The official MCP registry currently supports Docker Hub (`docker.io`) and GitHub Container Registry (`ghcr.io`).
|
||||
|
||||
</details>
|
||||
|
||||
|
|
@ -339,7 +335,7 @@ openssl dgst -sha256 server.mcpb
|
|||
### Example server.json
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.username/image-processor-mcp",
|
||||
"title": "Image Processor",
|
||||
"description": "Process and transform images with various filters",
|
||||
|
|
@ -348,7 +344,6 @@ openssl dgst -sha256 server.mcpb
|
|||
{
|
||||
"registryType": "mcpb",
|
||||
"identifier": "https://github.com/username/image-processor-mcp/releases/download/v1.0.0/image-processor.mcpb",
|
||||
"version": "1.0.0",
|
||||
"fileSha256": "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
|
|
@ -385,7 +380,7 @@ Add the `remotes` field to your `server.json` (can coexist with `packages`):
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "com.yourcompany/acme-analytics",
|
||||
"title": "ACME Analytics",
|
||||
"description": "Real-time business intelligence and reporting platform",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
openapi: 3.1.0
|
||||
jsonSchemaDialect: "https://json-schema.org/draft/2020-12/schema"
|
||||
$id: https://modelcontextprotocol.io/schemas/draft/2025-10-11/server-registry-openapi
|
||||
$id: https://modelcontextprotocol.io/schemas/draft/2025-10-17/server-registry-openapi
|
||||
info:
|
||||
title: MCP Server Registry API
|
||||
version: "2025-10-11"
|
||||
version: "2025-10-17"
|
||||
summary: API for discovering and accessing MCP server metadata
|
||||
description: |
|
||||
Specification for a theoretical REST API that serves up metadata about MCP servers.
|
||||
|
|
@ -616,7 +616,7 @@ components:
|
|||
type: string
|
||||
format: uri
|
||||
description: JSON Schema URI for this server.json format
|
||||
example: "https://static.modelcontextprotocol.io/schemas/2025-10-11/server.schema.json"
|
||||
example: "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json"
|
||||
packages:
|
||||
type: array
|
||||
items:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,60 @@
|
|||
|
||||
Changes to the server.json schema and format.
|
||||
|
||||
## 2025-10-17
|
||||
|
||||
### Changed
|
||||
|
||||
The `version` field is now **optional** for MCPB packages, providing flexibility for publishers.
|
||||
|
||||
**Key Changes:**
|
||||
|
||||
- **MCPB packages can now include an optional `version` field** - Previously rejected by validation, MCPB packages can now optionally specify a version field for clarity and metadata purposes.
|
||||
- **Both formats are valid**:
|
||||
- MCPB packages **with** version field: Provides explicit version metadata
|
||||
- MCPB packages **without** version field: Version information is embedded in the download URL (as before)
|
||||
|
||||
**Migration:**
|
||||
|
||||
Publishers using MCPB packages can optionally add a `version` field to their package configuration. This is particularly useful when:
|
||||
- The version information is not clearly visible in the download URL
|
||||
- You want to provide explicit version metadata for tooling and clients
|
||||
- You need consistent version tracking across different package types
|
||||
|
||||
Existing MCPB packages without the version field continue to work without any changes.
|
||||
|
||||
**Example - MCPB Package with optional version:**
|
||||
```json
|
||||
{
|
||||
"packages": [{
|
||||
"registryType": "mcpb",
|
||||
"identifier": "https://github.com/example/releases/download/v1.0.0/package.mcpb",
|
||||
"version": "1.0.0",
|
||||
"fileSha256": "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
**Example - MCPB Package without version (still valid):**
|
||||
```json
|
||||
{
|
||||
"packages": [{
|
||||
"registryType": "mcpb",
|
||||
"identifier": "https://github.com/example/releases/download/v1.0.0/package.mcpb",
|
||||
"fileSha256": "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
### Schema Version
|
||||
- Schema version: `2025-10-11` → `2025-10-17`
|
||||
|
||||
## 2025-10-11
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ The official registry has some more restrictions on top of this. See the [offici
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.modelcontextprotocol.anonymous/brave-search",
|
||||
"description": "MCP server for Brave Search API integration",
|
||||
"title": "Brave Search",
|
||||
|
|
@ -69,7 +69,7 @@ For MCP servers located within a subdirectory of a larger repository (monorepo s
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.modelcontextprotocol/everything",
|
||||
"description": "MCP server that exercises all the features of the MCP protocol",
|
||||
"title": "Everything",
|
||||
|
|
@ -108,7 +108,7 @@ Suppose your MCP server application requires a `mcp start` CLI arguments to star
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.joelverhagen/knapcode-samplemcpserver",
|
||||
"description": "Sample NuGet MCP server for a random number and random weather",
|
||||
"version": "0.4.0-beta",
|
||||
|
|
@ -152,7 +152,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.modelcontextprotocol/filesystem",
|
||||
"description": "Node.js server implementing Model Context Protocol (MCP) for filesystem operations.",
|
||||
"title": "Filesystem",
|
||||
|
|
@ -252,7 +252,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.modelcontextprotocol.anonymous/mcp-fs",
|
||||
"description": "Cloud-hosted MCP filesystem server",
|
||||
"repository": {
|
||||
|
|
@ -286,7 +286,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.example/weather-mcp",
|
||||
"description": "Python MCP server for weather data access",
|
||||
"title": "Weather",
|
||||
|
|
@ -342,7 +342,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.joelverhagen/knapcode-samplemcpserver",
|
||||
"description": "Sample NuGet MCP server for a random number and random weather",
|
||||
"repository": {
|
||||
|
|
@ -391,7 +391,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.github.example/database-manager",
|
||||
"description": "MCP server for database operations with support for multiple database types",
|
||||
"repository": {
|
||||
|
|
@ -500,7 +500,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.modelcontextprotocol.anonymous/hybrid-mcp",
|
||||
"description": "MCP server available as both local package and remote service",
|
||||
"title": "Hybrid",
|
||||
|
|
@ -586,7 +586,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.modelcontextprotocol/text-editor",
|
||||
"description": "MCP Bundle server for advanced text editing capabilities",
|
||||
"title": "Text Editor",
|
||||
|
|
@ -629,7 +629,7 @@ Some CLI tools bundle an MCP server, without a standalone MCP package or a publi
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.snyk/cli-mcp",
|
||||
"description": "MCP server provided by the Snyk CLI",
|
||||
"title": "Snyk",
|
||||
|
|
@ -664,7 +664,7 @@ For MCP servers that follow a custom installation path or are embedded in applic
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"name": "io.modelcontextprotocol.anonymous/embedded-mcp",
|
||||
"description": "MCP server embedded in a Desktop app",
|
||||
"websiteUrl": "https://anonymous.modelcontextprotocol.io/embedded-mcp-guide",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$comment": "This file is auto-generated from docs/reference/api/openapi.yaml. Do not edit manually. Run 'make generate-schema' to update.",
|
||||
"$id": "https://static.modelcontextprotocol.io/schemas/2025-10-11/server.schema.json",
|
||||
"$id": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"$ref": "#/definitions/ServerDetail",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
|
|
@ -373,7 +373,7 @@
|
|||
"properties": {
|
||||
"$schema": {
|
||||
"description": "JSON Schema URI for this server.json format",
|
||||
"example": "https://static.modelcontextprotocol.io/schemas/2025-10-11/server.schema.json",
|
||||
"example": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
||||
"format": "uri",
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue