ErForge.NuGetTools.Mcp 0.3.0

{
  "servers": {
    "ErForge.NuGetTools.Mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": ["ErForge.NuGetTools.Mcp@0.3.0", "--yes"]
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global ErForge.NuGetTools.Mcp --version 0.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local ErForge.NuGetTools.Mcp --version 0.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ErForge.NuGetTools.Mcp&version=0.3.0
                    
nuke :add-package ErForge.NuGetTools.Mcp --version 0.3.0
                    

NuGet Tools MCP Server

A Model Context Protocol (MCP) server that provides NuGet-related tools for AI assistants and applications. This server enables AI tools like GitHub Copilot to interact with NuGet package management functionality.

Features

Available Tools

Discover and inspect packages (nuget.org):

  • search_packages: Search nuget.org and return the top matches with their latest version, total downloads, owners, and description. Parameters: query (string), take (int, default 10, max 50), includePrerelease (bool, default false).

  • list_package_versions: List the published versions of a package (newest first), including the latest stable and latest prerelease. Parameters: packageId (string), includePrerelease (bool, default false).

  • get_package_metadata: Show detailed metadata for a package — description, authors, owners, license, project URL, tags, total downloads, and the dependencies of a specific version (defaults to the latest). Parameters: packageId (string), version (string, optional).

Inspect and manage the local environment:

  • get_nuget_config_info: Get comprehensive NuGet configuration information including:

    • Registered package sources
    • Cache locations (global-packages, http-cache, temp, plugins-cache)
    • Current working directory
    • Local and global NuGet configuration files and their content
  • cleanup_packages: Scans NuGet package cache and shows packages not accessed for specified days. This is a preview that shows what would be deleted. After reviewing, user can confirm deletion by saying 'yes', 'confirm', 'delete them', or 'proceed'. Default threshold: 30 days. Parameters: days (int).

  • confirm_cleanup: Confirms and executes the pending package cleanup. Called when user says 'yes', 'confirm', 'delete them', 'proceed', 'do it', or 'go ahead' after reviewing the cleanup preview.

Conversational Cleanup Flow

The cleanup tools are designed for a natural conversational experience:

  1. Preview: Call cleanup_packages (optionally with days parameter) to see what would be deleted
  2. Confirm: User simply says "yes", "delete them", or similar, and Copilot calls confirm_cleanup
  3. Done: Packages are deleted and space is freed

This eliminates the need for users to re-pass parameters when confirming the deletion.

Example Conversation

Here's a real example of the smooth conversational workflow with GitHub Copilot:

You: "Show my NuGet configuration"

Copilot calls get_nuget_config_info and displays your package sources, cache locations, and config files.

You: "Clean up old NuGet packages"

Copilot calls cleanup_packages and shows a preview:

  • Found 26 packages not accessed for more than 30 days
  • Total size to be freed: 27.7 MB
  • Lists all packages with names, versions, and sizes

You: "Yes, delete them"

Copilot calls confirm_cleanup and executes the deletion:

  • ✅ Successfully deleted: 26 package versions
  • 📁 Empty folders cleaned: 26
  • 💾 Space freed: 27.7 MB

No need to remember parameters or tool names - just have a natural conversation!

Quick Start

Prerequisites

To run the MCP server, you must have .NET 10 Preview 6 or later installed. This version of .NET adds a command, dnx, which is used to download, install, and run the MCP server from nuget.org.

To verify your .NET version, run the following command in your terminal:

dotnet --info

  • VS Code with GitHub Copilot (for MCP integration) or use the standalone test client

### Getting Started

To configure the NuGetTools MCP server, you will need to modify an mcp.json file or other configuration.

VSCode mcp.json file existing in `.vscode\mcp.json`, but VS 2026 IDE mcp.json file needs to be created at the solution root.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.3.0 266 6/7/2026
0.2.0-preview 404 12/29/2025
0.1.1-preview 581 11/30/2025
0.1.0-preview 440 11/29/2025