
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
NuGet.Mcp.Server
Advanced tools
Contains a Model Context Protocol (MCP) server for NuGet, enabling advanced tooling and automation scenarios for NuGet package management. See the official NuGet MCP documentation for the latest information.
NuGet.Config validity) and recommends hardening steps.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
To configure the NuGet MCP server, you will need to modify an mcp.json file or other configuration.
The following table provides links to documentation for configuring MCP servers in different environments:
| Environment | Documentation |
|---|---|
| Visual Studio | File locations for automatic discovery of MCP configuration |
| VS Code | MCP configuration in VS Code |
| GitHub Copilot Coding Agent | Setting up MCP servers in a repository |
The NuGet MCP server ships in-box with Visual Studio 2026. You must enable it the first time in the GitHub Copilot chat tools menu.
If you'd like to use a newer version of the NuGet MCP server than the one included with Visual Studio, you can configure it with the following snippet and include it in your mcp.json:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": [ "NuGet.Mcp.Server", "--source", "https://api.nuget.org/v3/index.json", "--yes" ]
}
}
}
If you'd like to use a specific version of the MCP server, you can specify it with package name like NuGet.Mcp.Server@1.0.0:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": [ "NuGet.Mcp.Server@1.0.0", "--source", "https://api.nuget.org/v3/index.json", "--yes" ]
}
}
}
When configured this way, you will need to update the version as new releases become available.
See File locations for automatic discovery of MCP configuration for more information on the location of the appropriate mcp.json for you.
To configure the MCP server for use with Visual Studio 2022, make sure you have update 17.14 or later installed.
Then use the following snippet and include it in your mcp.json:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": [ "NuGet.Mcp.Server", "--source", "https://api.nuget.org/v3/index.json", "--yes" ]
}
}
}
If you'd like to use a specific version of the MCP server, you can specify it with package name like NuGet.Mcp.Server@1.0.0:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": [ "NuGet.Mcp.Server@1.0.0", "--source", "https://api.nuget.org/v3/index.json", "--yes" ]
}
}
}
When configured this way, you will need to update the version as new releases become available.
See File locations for automatic discovery of MCP configuration for more information on the location of the appropriate mcp.json for you.
To configure the NuGet MCP server in VS code, you can use the following badges to quickly install the MCP server:
To manually configure the MCP server for use with Visual Studio or VS Code, use the following snippet and include it in your mcp.json:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": [ "NuGet.Mcp.Server", "--source", "https://api.nuget.org/v3/index.json", "--yes" ]
}
}
}
If you'd like to use a specific version of the MCP server, you can specify it with package name like NuGet.Mcp.Server@1.0.0:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": [ "NuGet.Mcp.Server@1.0.0", "--source", "https://api.nuget.org/v3/index.json", "--yes" ]
}
}
}
When configured this way, you will need to update the version as new releases become available.
See MCP configuration in VS Code for more information on the location of the appropriate mcp.json for you.
You can also configure the MCP Server to work with GitHub Copilot as a Coding Agent in your repositories.
First, you need to add the MCP Server configuration in your Copilot Coding Agent:
{
"mcpServers": {
"NuGet": {
"type": "local",
"command": "dnx",
"args": ["NuGet.Mcp.Server", "--yes"],
"tools": ["*"],
"env": {}
}
}
}
This will make all the MCP Server tools available, if you want specific tools you can list them in the "tools" parameter array.
You will also need to make sure Copilot installs .NET 10 Preview 6 or higher in order to have the command dnx and install the MCP Server.
.github/workflows/copilot-setup-steps.yml
name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
contents: read
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- name: Install .NET 10.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
10.x
dotnet-quality: preview
- name: dotnet --info
run: dotnet --info
fix_vulnerable_packages: Fixes known security vulnerabilities in NuGet dependencies by computing the smallest safe version changes.upgrade_packages_to_latest: Upgrades NuGet packages to the latest compatible versions available from configured package sources.get_latest_package_version: Returns the latest version of a NuGet package.get_package_context: Returns the AGENTS.md context for a NuGet package when available; otherwise returns the package README.update_package_version: Updates one or more NuGet packages to exact target versions while keeping the dependency graph compatible.review_supply_chain_security: Reviews and recommends hardening steps for your repository's NuGet supply‑chain posture (eg, Central Package Management, NuGet Audit, Package Source Mapping, and NuGet.Config validation).The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Telemetry collection is on by default to help improve the product. This can be disabled, see Disabling All Telemetry section below for more details.
To disable Microsoft telemetry collection, set the environment variable DOTNET_CLI_TELEMETRY_OPTOUT to true or 1:
export DOTNET_CLI_TELEMETRY_OPTOUT=true
If you experience an issue with the NuGet MCP server or have any other feedback, please open an issue on the NuGet GitHub repository. Please provide the requested information in the issue template so that we can better understand and address your issue or suggestion.
This software is provided "as is" without warranties or conditions of any kind, either express or implied. Microsoft shall not be liable for any damages arising from use, misuse, or misconfiguration of this software.
FAQs
A Model Context Protocol (MCP) server for NuGet.
We found that NuGet.Mcp.Server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.