- 
                Notifications
    You must be signed in to change notification settings 
- Fork 841
Update MCP template for new registry specification #6796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MCP template for new registry specification #6796
Conversation
Co-authored-by: timheuer <[email protected]>
| Sorry @copilot -- the root "name" property should still be named  | 
…mplate Co-authored-by: timheuer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the MCP server template to align with the new Model Context Protocol registry specification, addressing schema changes required for successful package ingestion with mcp-publisher.
- Restructured version information by moving versionto root level and removingversion_detailwrapper
- Updated package configuration property names and added required transportconfiguration
- Applied identical changes to both template and test snapshot files
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description | 
|---|---|
| src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/.mcp/server.json | Updated MCP server template configuration to match new registry specification | 
| test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/mcpserver.Basic.verified/mcpserver/.mcp/server.json | Updated test snapshot to reflect template changes | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
        
          
                ...tTemplates/Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/.mcp/server.json
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …hema.json Co-authored-by: joelverhagen <[email protected]>
| Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
 If you need me to access, download, or install something from one of these locations, you can either: 
 | 
Updates the MCP server template to align with the new Model Context Protocol registry specification. The MCP registry has updated its
server.jsonschema, requiring several property name changes and structural modifications for successful package ingestion.Changes Made
The following updates were applied to both the main template and test snapshot files:
Root level changes:
nameproperty (root identifier remains unchanged)versionfrom nestedversion_detailobject to root levelversion_detailwrapper objectPackage configuration updates:
registry_name→registry_typename→identifierfor package identificationtransportproperty with{"type": "stdio"}configurationSchema URI updates:
https://modelcontextprotocol.io/schemas/draft/2025-07-09/server.jsonhttps://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json/draft/from path and updated filename toserver.schema.jsonUpdated Structure
The template now follows this format aligned with the registry specification:
{ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json", "name": "io.github.<your GitHub username here>/<your repo name>", "version": "0.1.0-beta", "packages": [ { "registry_type": "nuget", "identifier": "<your package ID here>", "version": "0.1.0-beta", "transport": { "type": "stdio" }, "package_arguments": [], "environment_variables": [] } ] }Files Modified
src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/.mcp/server.jsontest/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/mcpserver.Basic.verified/mcpserver/.mcp/server.jsonThese changes ensure that MCP server projects created from this template will successfully publish to the MCP registry using
mcp-publisherwithout encountering missing property errors.Fixes #5467
Warning
0t3vsblobprodcus362.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)1oavsblobprodcus350.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)4vyvsblobprodcus361.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)4zjvsblobprodcus390.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)51yvsblobprodcus36.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)96bvsblobprodcus338.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)c50vsblobprodcus330.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)c78vsblobprodcus322.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)h6tvsblobprodcus346.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)kmuvsblobprodcus389.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)l49vsblobprodcus358.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)pdfvsblobprodcus380.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)s8mvsblobprodcus38.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)sqdvsblobprodcus333.vsblob.vsassets.iodotnet build src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj(dns block)dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter FullyQualifiedName~McpServerSnapshotTests --verbosity minimal(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Fixes #6788
Fixes #6788
Fixes #6788
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.