Jeff Kluge announces the preview release of the NuGet MCP Server, detailing how it empowers developers to connect AI assistants like GitHub Copilot with real-time NuGet package management and advanced automation for .NET projects.

Announcing the NuGet MCP Server Preview

Author: Jeff Kluge

Overview

The NuGet MCP Server enables real-time NuGet package information and advanced management capabilities for AI-powered development workflows, including integration with GitHub Copilot and coding agents. Built using .NET and the Model Context Protocol (MCP), this server acts as a bridge between AI assistants and the dynamic NuGet ecosystem, ensuring package details and updates are always current.

What is an MCP Server?

The Model Context Protocol (MCP) is an open standard that allows AI assistants to securely connect with external data and tools. An MCP server provides a bridge to services like NuGet, feeding up-to-date data to large language models and facilitating extended functionality—such as enhanced package discovery and automated updates.

The NuGet MCP Server addresses the challenge that LLMs can become outdated regarding new or changed packages, by:

  • Providing instant information about recently published or updated packages
  • Managing private feeds alongside public ones for a complete view
  • Using the NuGetSolver algorithm (developed with Microsoft Research) to resolve dependency conflicts automatically

Getting Started

  • Prerequisites: .NET 10 Preview 6 or newer
  • Installation: Available as a NuGet package

Example Configuration for Your MCP Client

{
  "servers": {
    "nuget": {
      "type": "stdio",
      "command": "dnx",
      "args": [ "NuGet.Mcp.Server", "--prerelease", "--yes" ]
    }
  }
}

Use the --prerelease flag to ensure preview version access. For specific versions, substitute the package name, e.g. "NuGet.Mcp.Server@0.2.0-preview".

Main Features

  • Package Version Discovery: Check the latest versions of any NuGet package available on configured feeds.
  • Security Updates: Automatically update packages to the lowest version that resolves security vulnerabilities, minimizing disruption.
  • Version Updates: Upgrade dependencies to the highest compatible version for your target framework, reducing breakage from incompatible updates.

Integration with Development Tools

Visual Studio

Add configuration snippets to your .mcp.json file in your solution folder or %UserProfile%\.mcp.json. Visual Studio supports auto-discovery of these files—see docs for locations.

VS Code

Quickly install the NuGet MCP Server using the provided badge links or by manually inserting a configuration snippet to .vscode/mcp.json:

{
  "servers": {
    "nuget": {
      "type": "stdio",
      "command": "dnx",
      "args": [ "NuGet.Mcp.Server", "--prerelease", "--yes" ]
    }
  }
}

GitHub Copilot Coding Agent

The NuGet MCP Server integrates with Copilot’s coding agent to streamline dependency management within CI/CD workflows. For GitHub repositories:

Create or update .github/workflows/copilot-setup-steps.yml as follows:

name: "Copilot Setup Steps"
on:
  workflow_dispatch:
  push:
    paths:
      - .github/workflows/copilot-setup-steps.yml
  pull_request:
    paths:
      - .github/workflows/copilot-setup-steps.yml
jobs:
  copilot-setup-steps:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - name: Install .NET 10.x
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: |
            1. x
          dotnet-quality: preview

Configure your NuGet MCP Server in Copilot via repository settings:

{
  "mcpServers": {
    "nuget": {
      "command": "dnx",
      "args": [ "NuGet.Mcp.Server", "--prerelease", "--yes" ],
      "tools": ["*"],
      "type": "local"
    }
  }
}

Feedback & Preview Status

This is a preview release—new features are under development, and community feedback is encouraged. Report issues or ideas at NuGet/Home.


References:

This post appeared first on “Microsoft .NET Blog”. Read the entire article here