Skip to content

[WIP] Conceptual doc for NuGet MCP #3449

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

[WIP] Conceptual doc for NuGet MCP #3449

wants to merge 3 commits into from

Conversation

joelverhagen
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 24, 2025 22:27
@joelverhagen joelverhagen requested review from a team as code owners July 24, 2025 22:27
@joelverhagen joelverhagen marked this pull request as draft July 24, 2025 22:27
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

This PR introduces conceptual documentation for distributing MCP (Model Context Protocol) servers via NuGet packages. The documentation explains how to leverage the .NET ecosystem for authoring and distributing local MCP servers, targeting developers interested in creating MCP servers using .NET.

Key changes:

  • Adds a new McpServer package type to the existing package types documentation
  • Creates comprehensive conceptual documentation covering MCP server distribution via NuGet
  • Explains benefits, applicable scenarios, and ecosystem comparisons for NuGet-based MCP servers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
docs/create-packages/set-package-type.md Adds the new McpServer package type definition alongside existing package types
docs/concepts/nuget-mcp.md Creates new conceptual documentation explaining MCP servers in NuGet packages, including benefits and ecosystem comparisons

Consider the following criteria to determine if shipping your MCP server as a NuGet package makes sense:

- ✅ You want your MCP server to run **locally** on the user's system (i.e. in the same context as the MCP client).
- Instead of locally running MCP servers, MCP servers can also be hosted on a web server and communicated with via a streaming HTTP protocol. Local MCP servers, such as those shipped in NuGet package,s run in the same context as the MCP client communicate with the MCP client via a standard IO (stdio) transport. The MCP client is responsible for launching the local MCP server process.
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

There is a misplaced comma in 'package,s' which should be 'packages'.

Suggested change
- Instead of locally running MCP servers, MCP servers can also be hosted on a web server and communicated with via a streaming HTTP protocol. Local MCP servers, such as those shipped in NuGet package,s run in the same context as the MCP client communicate with the MCP client via a standard IO (stdio) transport. The MCP client is responsible for launching the local MCP server process.
- Instead of locally running MCP servers, MCP servers can also be hosted on a web server and communicated with via a streaming HTTP protocol. Local MCP servers, such as those shipped in NuGet packages run in the same context as the MCP client communicate with the MCP client via a standard IO (stdio) transport. The MCP client is responsible for launching the local MCP server process.

Copilot uses AI. Check for mistakes.

- Instead of locally running MCP servers, MCP servers can also be hosted on a web server and communicated with via a streaming HTTP protocol. Local MCP servers, such as those shipped in NuGet package,s run in the same context as the MCP client communicate with the MCP client via a standard IO (stdio) transport. The MCP client is responsible for launching the local MCP server process.
- ✅ The .NET SDK is available to the MCP client.
- NuGet MCP servers are [.NET tool packages](https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools), which are installed and executed using the .NET SDK.
- ✅ You have have a NuGet package feed to host your MCP server package.
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

There is a duplicate word 'have' in this sentence. It should be 'You have a NuGet package feed...'.

Suggested change
- ✅ You have have a NuGet package feed to host your MCP server package.
- ✅ You have a NuGet package feed to host your MCP server package.

Copilot uses AI. Check for mistakes.

There are several benefits to using NuGet for hosting your MCP server:

- **Official SDK** - the [MCP C# SDK](https://github.com/modelcontextprotocol/csharp-sdk) provides a familiar interface for implementing your MCP server in C# and makes it easy to expose tools to MCP clients.
- **Flexible runtime options** - the .NET SDK provides several options for how your MCP is compiled and packaged. Generally, you can choose between using a on a runtime available on the client system, include a specific runtime inside the package, or compile your tool using [AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/).
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

There is a grammatical error: 'using a on a runtime' should be 'using a runtime' (remove the extra 'on a').

Suggested change
- **Flexible runtime options** - the .NET SDK provides several options for how your MCP is compiled and packaged. Generally, you can choose between using a on a runtime available on the client system, include a specific runtime inside the package, or compile your tool using [AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/).
- **Flexible runtime options** - the .NET SDK provides several options for how your MCP is compiled and packaged. Generally, you can choose between using a runtime available on the client system, include a specific runtime inside the package, or compile your tool using [AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/).

Copilot uses AI. Check for mistakes.


- **Official SDK** - the [MCP C# SDK](https://github.com/modelcontextprotocol/csharp-sdk) provides a familiar interface for implementing your MCP server in C# and makes it easy to expose tools to MCP clients.
- **Flexible runtime options** - the .NET SDK provides several options for how your MCP is compiled and packaged. Generally, you can choose between using a on a runtime available on the client system, include a specific runtime inside the package, or compile your tool using [AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/).
- **Familiar authoring workflows** - if you already use NuGet for creating dependency packages (libraries distributed via NuGet), creating and publishing an MCP server be a very similar experience.
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

Missing word 'will' in the sentence. It should be 'creating and publishing an MCP server will be a very similar experience'.

Suggested change
- **Familiar authoring workflows** - if you already use NuGet for creating dependency packages (libraries distributed via NuGet), creating and publishing an MCP server be a very similar experience.
- **Familiar authoring workflows** - if you already use NuGet for creating dependency packages (libraries distributed via NuGet), creating and publishing an MCP server will be a very similar experience.

Copilot uses AI. Check for mistakes.

- **Official SDK** - the [MCP C# SDK](https://github.com/modelcontextprotocol/csharp-sdk) provides a familiar interface for implementing your MCP server in C# and makes it easy to expose tools to MCP clients.
- **Flexible runtime options** - the .NET SDK provides several options for how your MCP is compiled and packaged. Generally, you can choose between using a on a runtime available on the client system, include a specific runtime inside the package, or compile your tool using [AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/).
- **Familiar authoring workflows** - if you already use NuGet for creating dependency packages (libraries distributed via NuGet), creating and publishing an MCP server be a very similar experience.
- **MCP server browsing experience** - NuGet.org provides a way to showcase your MCP server, allowing potential users to find your MCP server and easily use it from inside from VS Code or Visual Studio.
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

There is a duplicate preposition 'from' in the phrase 'from inside from VS Code'. It should be either 'from inside VS Code' or 'from VS Code'.

Suggested change
- **MCP server browsing experience** - NuGet.org provides a way to showcase your MCP server, allowing potential users to find your MCP server and easily use it from inside from VS Code or Visual Studio.
- **MCP server browsing experience** - NuGet.org provides a way to showcase your MCP server, allowing potential users to find your MCP server and easily use it from inside VS Code or Visual Studio.

Copilot uses AI. Check for mistakes.


We will compare NuGet and .NET to other ecosystems that are commonly used for implementing local MCP servers: npm (JavaScript, node.js), Python, and Docker.

### Package aquisition
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

Misspelled word 'aquisition' should be 'acquisition'.

Suggested change
### Package aquisition
### Package acquisition

Copilot uses AI. Check for mistakes.

- **Python**: the `uvx` command downloads and executes from PyPI.org.
- **Docker**: the `docker run` command downloads and executes from Docker Hub by default, but can fetch from another container registry with a fully qualified name.

In all of these cases, the MCP client needs to have the need ecosystem-specific tool (e.g. `dnx`, `npx`) to download and launch the package-based MCP server.
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

There is a duplicate word 'need' in 'have the need ecosystem-specific'. It should be 'have the needed ecosystem-specific tool' or 'have the ecosystem-specific tool'.

Suggested change
In all of these cases, the MCP client needs to have the need ecosystem-specific tool (e.g. `dnx`, `npx`) to download and launch the package-based MCP server.
In all of these cases, the MCP client needs to have the ecosystem-specific tool (e.g. `dnx`, `npx`) to download and launch the package-based MCP server.

Copilot uses AI. Check for mistakes.

Copy link

Learn Build status updates of commit 5e048f7:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/concepts/nuget-mcp.md ⚠️Warning View Details
docs/nuget-org/mcp-packages.md ⚠️Warning View Details
docs/reference/mcp-server-package.md ⚠️Warning View Details
docs/create-packages/set-package-type.md ✅Succeeded View
docs/nuget-org/media/mcp-browse.png ✅Succeeded View
docs/nuget-org/media/mcp-display.png ✅Succeeded View

docs/concepts/nuget-mcp.md

  • Line 45, Column 352: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 52, Column 27: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 68, Column 120: [Warning: bookmark-not-found - See documentation] Cannot find bookmark '#declaring-inputs-using-the-serverjson' in 'concepts/nuget-mcp.md'.
  • Line 95, Column 41: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 39, Column 275: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/dotnet/core/deploying/native-aot/' will be broken in isolated environments. Replace with a relative link.
  • Line 45, Column 352: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers' will be broken in isolated environments. Replace with a relative link.
  • Line 52, Column 27: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools' will be broken in isolated environments. Replace with a relative link.
  • Line 95, Column 41: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options' will be broken in isolated environments. Replace with a relative link.

docs/nuget-org/mcp-packages.md

  • Line 10, Column 1: [Warning: duplicate-h1s - See documentation] H1 'NOT DONE YET' is duplicated with other articles: 'nuget-org/mcp-packages.md(10,1), reference/mcp-server-package.md(10,1)'. First level headings must be unique within a docset.

docs/reference/mcp-server-package.md

  • Line 10, Column 1: [Warning: duplicate-h1s - See documentation] H1 'NOT DONE YET' is duplicated with other articles: 'nuget-org/mcp-packages.md(10,1), reference/mcp-server-package.md(10,1)'. First level headings must be unique within a docset.
  • Line 21, Column 276: [Warning: bookmark-not-found - See documentation] Cannot find bookmark '#runtime-requirements' in 'reference/mcp-server-package.md'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link

Learn Build status updates of commit 09815b5:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/concepts/nuget-mcp.md ⚠️Warning View Details
docs/nuget-org/mcp-packages.md ⚠️Warning View Details
docs/reference/mcp-server-package.md ⚠️Warning View Details
docs/create-packages/set-package-type.md ✅Succeeded View
docs/nuget-org/media/mcp-browse.png ✅Succeeded View
docs/nuget-org/media/mcp-display.png ✅Succeeded View

docs/concepts/nuget-mcp.md

  • Line 46, Column 352: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 53, Column 27: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 69, Column 120: [Warning: bookmark-not-found - See documentation] Cannot find bookmark '#declaring-inputs-using-the-serverjson' in 'concepts/nuget-mcp.md'.
  • Line 84, Column 62: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 46, Column 352: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers' will be broken in isolated environments. Replace with a relative link.
  • Line 53, Column 27: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools' will be broken in isolated environments. Replace with a relative link.
  • Line 84, Column 62: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options' will be broken in isolated environments. Replace with a relative link.

docs/nuget-org/mcp-packages.md

  • Line 10, Column 1: [Warning: duplicate-h1s - See documentation] H1 'NOT DONE YET' is duplicated with other articles: 'nuget-org/mcp-packages.md(10,1), reference/mcp-server-package.md(10,1)'. First level headings must be unique within a docset.

docs/reference/mcp-server-package.md

  • Line 10, Column 1: [Warning: duplicate-h1s - See documentation] H1 'NOT DONE YET' is duplicated with other articles: 'nuget-org/mcp-packages.md(10,1), reference/mcp-server-package.md(10,1)'. First level headings must be unique within a docset.
  • Line 21, Column 276: [Warning: bookmark-not-found - See documentation] Cannot find bookmark '#runtime-requirements' in 'reference/mcp-server-package.md'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant