Skip to content

Conversation

joelverhagen
Copy link
Member

@joelverhagen joelverhagen commented Jul 14, 2025

The server.json schema is in draft mode, so this PR is an attempt to encode which version of the schema is being used here, despite it being draft (prerelease).

The schema is defined here:
https://github.com/modelcontextprotocol/registry/blob/main/docs/server-json/schema.json

Note that the $schema value right now is a URI not a URL.
We could opt to point to the raw.githubusercontent.com URL but this would mean the $schema value diverges from $id currently used by the JSON schema. Also, if we pick a URL to GitHub, we would need to use a git ref in the URL which perhaps is not the worst but it would be a 2nd way of expressing the schema version (in addition to the date).

See modelcontextprotocol/registry#167 (comment).

Microsoft Reviewers: Open in CodeFlow

@Copilot Copilot AI review requested due to automatic review settings July 14, 2025 14:19
@joelverhagen joelverhagen requested a review from a team as a code owner July 14, 2025 14:19
@github-actions github-actions bot added the area-ai-templates Microsoft.Extensions.AI.Templates label Jul 14, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a $schema reference to the server.json template to encode the current draft schema version.

  • Introduces a $schema property pointing to the draft schema with date 2025-07-09
  • Ensures the template is aligned with the registry’s schema identifier
Comments suppressed due to low confidence (1)

src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/.mcp/server.json:2

  • [nitpick] Verify that the $schema URI exactly matches the $id defined in the draft schema (including the date segment). If you need schema stability for JSON validators, consider linking to a raw GitHub URL with a specific git ref to lock the version.
  "$schema": "https://modelcontextprotocol.io/schemas/draft/2025-07-09/server.json",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-ai-templates Microsoft.Extensions.AI.Templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants