Skip to content

Add quickstart for minimal MCP Server using .NET and publish to NuGet #47007

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

Open
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

JonDouglas
Copy link
Contributor

@JonDouglas JonDouglas commented Jun 30, 2025

Summary

Adds a quickstart of creating a minimal MCP server with a predefined mcpserver template, consuming it locally, and publishing it to NuGet and consuming it from the package ID as well using dotnet tool exec.


Internal previews

📄 File 🔗 Preview link
.github/dependabot.yml .github/dependabot
docs/ai/quickstarts/build-mcp-server.md docs/ai/quickstarts/build-mcp-server
docs/ai/toc.yml docs/ai/toc

@JonDouglas JonDouglas requested a review from joelverhagen June 30, 2025 16:19
@JonDouglas JonDouglas requested review from gewarren, alexwolfmsft and a team as code owners June 30, 2025 16:19
@dotnetrepoman dotnetrepoman bot added this to the June 2025 milestone Jun 30, 2025
1. In a terminal window, install the `dotnet new mcpserver` template:

```bash
dotnet new install Microsoft.Extensions.AI.Templates::9.6.0-preview.2.25310.2
Copy link
Member

@joelverhagen joelverhagen Jun 30, 2025

Choose a reason for hiding this comment

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

TODO: update to the correct package version
(we don't know it yet)

Copy link
Member

Choose a reason for hiding this comment

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

For reference, the draft template is here: dotnet/extensions#6547

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

This seems to duplicate a lot of what's in the other MCP server quickstart. Can we combine them, or perhaps require the other one as a prerequisite of a quickstart that only deals with publishing the MCP server to NuGet?

JonDouglas and others added 4 commits July 1, 2025 14:06
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
JonDouglas and others added 2 commits July 1, 2025 14:27
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Joel Verhagen <joel.verhagen@gmail.com>
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Thanks for combining them, I like this better!

joelverhagen and others added 7 commits July 3, 2025 07:57
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
joelverhagen and others added 8 commits July 3, 2025 09:49
Co-authored-by: alexwolfmsft <93200798+alexwolfmsft@users.noreply.github.com>
Co-authored-by: alexwolfmsft <93200798+alexwolfmsft@users.noreply.github.com>
Co-authored-by: alexwolfmsft <93200798+alexwolfmsft@users.noreply.github.com>
Co-authored-by: alexwolfmsft <93200798+alexwolfmsft@users.noreply.github.com>
@joelverhagen joelverhagen self-assigned this Jul 3, 2025
@joelverhagen
Copy link
Member

AFAIK this PR is ready to go. The only missing pieces are:

  • Actual template version, pending .NET 10 Preview 6 release
  • Screenshots from NuGet.org (non-blocking, nice to have, should be available before the actual template version)

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.

6 participants