Skip to content

Improve NuGet MCP authoring in dotnet pack #14619

@joelverhagen

Description

@joelverhagen

NuGet Product(s) Involved

dotnet.exe

The Elevator Pitch

Today, a user can create an MCP server and pack it as a NuGet tool.
https://learn.microsoft.com/en-us/dotnet/ai/quickstarts/build-mcp-server

The mcpserver template prescribes two package conventions that improve the MCP consumer experience:

  • Use McpServer package type, to enable filtering on NuGet.org
  • Embed a server.json so args and env inputs can be declared explicitly (and mapped to client runtime config)

Additionally, the Official MCP Registry mandates that a NuGet package must have mcp-name: <server name> in the README. This enables publishing the NuGet package to the MCP Registry.

There are no guardrails or helpers to ensure these steps are taken correctly.

dotnet pack should help the user author a complete MCP server. Some ideas:

  • Confirm a server.json is embedded and has a matching package ID and version in the packages field
  • Confirm the MCP server name is in the README
  • Auto-generate the server.json or fill in a template
  • Generate an output server.json ready for publishing to the MCP registry

I believe the most painful part of MCP Server publishing is keeping the version in the server.json up to date with the NuGet package.

Along with #14618, this will smooth the MCP authoring story.

Additional Context and Details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Product:MCPServerThe Model Context Protocol (MCP) ServerType:Feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions