NuGet MCP server
Commit Oct 22, 2026Lets an AI client search NuGet packages and read real package metadata and public API definitions to reduce hallucinated code.
Also known as DimonSmart/NugetMcpServer, nugetmcpserver
- Stars
- 24
- Tools
- 12
- Downloads, 30 days
- —
- Latest version
- 1.1.10
- Last commit
- Oct 22, 2026
- License
- —
What is NuGet MCP?
NuGet lets an AI client search NuGet packages and read real package metadata and public API definitions to reduce hallucinated code. It exposes 12 tools, such as search_packages, search_packages_fuzzy, get_package_info.
Summary generated from the project's README
About NuGet MCP server
Developers working with .NET libraries can use this tool to provide their AI assistants with accurate package information. By connecting to NuGet, the server allows clients like Claude Desktop, VS Code, Claude Code, and Codex to inspect real metadata and public API definitions. This prevents the AI from generating incorrect code based on outdated or hallucinated library signatures.
The server can be installed via the dnx command or through Docker if the .NET SDK is unavailable. It supports nuget.org, private feeds, and local package folders. Users can configure access to private sources by setting the NUGET_SOURCES or NUGET_CONFIG environment variables. This ensures the assistant can access proprietary or internal libraries just as easily as public ones.
Specific tools provided include search_packages for finding libraries, get_package_info for metadata, and various definition tools like get_interface_definition or get_class_or_record_or_struct_definition. It also enables version comparison through compare_package_versions to help identify breaking changes between specific releases.
What you can do with it
- 1Preventing API hallucinationsAsk your AI assistant to verify the actual public methods of a library before it writes any implementation code.
- 2Analyzing breaking changesRequest a summary of the differences in public APIs between two specific versions of a package.
- 3Accessing private company librariesConnect your AI client to internal company feeds to allow it to work with private NuGet packages.
Written from the project's README. Every use case is checked against a quote from it.
NuGet MCP tools 12
Detected from the READMEsearch_packagessearch_packages_fuzzyget_package_infolist_interfaceslist_classes_records_structsget_interface_definitionget_class_or_record_or_struct_definitionget_enum_definitioncompare_package_versionslist_package_filesget_package_fileget_current_time
Configuration
NUGET_CONFIGOptional path to a NuGet.Config file for private feeds and custom package sources.
NUGET_SOURCESNUGET_SOURCESOptional semicolon-separated NuGet feed URLs or local package directories.
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachabledimonsmart/nugetmcpserver is public and reachablegithub.com/dimonsmart/nugetmcpserver ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-10-22github.com/dimonsmart/nugetmcpserver ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model12 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubNugetMcpServer
Bad NuGet API guesses are expensive.
NugetMcpServer lets Codex, Claude Code, VS Code, Claude Desktop, and other MCP clients inspect real NuGet package metadata and public APIs before generating code. It is most useful when package version details matter or when the package lives in a private feed.
Fastest path: install it with codex mcp add or claude mcp add, then ask your assistant to use the NuGet MCP server before writing package-dependent code.
Why this exists
LLMs often know popular libraries, but they do not reliably know the exact API surface of every package version. NugetMcpServer gives the assistant a way to check the package first instead of filling gaps from memory.
NugetMcpServer connects the assistant to NuGet packages directly, including private feeds and local package folders.
What it gives to your assistant
- Search NuGet packages and inspect package metadata.
- Read public API definitions for real package versions.
- Compare versions, inspect package files, and use nuget.org, private feeds, or local package folders.
Quick start
These commands use the current published NuGet package version, 1.1.7. dnx downloads and runs the .NET tool from NuGet, so you do not need a separate dotnet tool install step.
1. Install via Codex CLI
codex mcp add nuget -- dnx DimonSmart.NugetMcpServer@1.1.7 --yes
Check available MCP commands:
codex mcp --help
Inside the Codex TUI, run:
/mcp
Codex CLI and the Codex IDE extension share MCP configuration, so configuring the server once should make it available in both clients.
2. Install via Claude Code CLI
claude mcp add --transport stdio nuget -- dnx DimonSmart.NugetMcpServer@1.1.7 --yes
Everything after -- is the actual MCP server command and arguments.
Manage and verify the server:
claude mcp list
claude mcp get nuget
Inside Claude Code, run:
/mcp
3. Install in VS Code
Open the NuGet package page, select the MCP Server tab, and copy the generated VS Code configuration.
For manual VS Code configuration, add this to mcp.json. Replace <version> with the package version you want to pin:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": ["DimonSmart.NugetMcpServer@<version>", "--yes"]
}
}
}
4. Install via Docker
Use Docker when the MCP client environment does not have the .NET SDK available.
Codex:
codex mcp add nuget-docker -- docker run -i --rm ghcr.io/dimonsmart/nugetmcpserver:latest
Claude Code:
claude mcp add --transport stdio nuget-docker -- docker run -i --rm ghcr.io/dimonsmart/nugetmcpserver:latest
Run the container directly:
docker run -i --rm ghcr.io/dimonsmart/nugetmcpserver:latest
VS Code mcp.json:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/dimonsmart/nugetmcpserver:latest"]
}
}
}
Install in VS Code with Docker
5. Manual configuration
Codex config.toml:
[mcp_servers.nuget]
command = "dnx"
args = ["DimonSmart.NugetMcpServer@<version>", "--yes"]
Codex Docker variant:
[mcp_servers.nuget]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/dimonsmart/nugetmcpserver:latest"]
Claude Desktop and generic MCP clients that use the mcpServers JSON shape:
{
"mcpServers": {
"nuget": {
"command": "dnx",
"args": ["DimonSmart.NugetMcpServer@<version>", "--yes"]
}
}
}
6. Private/local NuGet sources
Use NUGET_SOURCES for one or more source URLs or local package folders. Separate sources with semicolons. Use NUGET_CONFIG when you want NuGet to read a specific NuGet.Config, for example when credentials or source names are already configured there.
Codex with NUGET_SOURCES:
codex mcp add nuget-private \
--env NUGET_SOURCES="C:\NuGet\LocalFeed;https://pkgs.dev.azure.com/ORG/_packaging/Feed/nuget/v3/index.json" \
-- dnx DimonSmart.NugetMcpServer@<version> --yes
Claude Code with NUGET_SOURCES:
claude mcp add --transport stdio \
--env NUGET_SOURCES="C:\NuGet\LocalFeed;https://pkgs.dev.azure.com/ORG/_packaging/Feed/nuget/v3/index.json" \
nuget-private \
-- dnx DimonSmart.NugetMcpServer@<version> --yes
Codex with NUGET_CONFIG:
codex mcp add nuget-config \
--env NUGET_CONFIG="/path/to/NuGet.Config" \
-- dnx DimonSmart.NugetMcpServer@<version> --yes
Claude Code with NUGET_CONFIG:
claude mcp add --transport stdio \
--env NUGET_CONFIG="/path/to/NuGet.Config" \
nuget-config \
-- dnx DimonSmart.NugetMcpServer@<version> --yes
Use Windows paths such as C:\path\to\NuGet.Config on Windows. Use Unix-style paths such as /path/to/NuGet.Config on Linux and macOS. Keep paths quoted when they contain spaces.
VS Code mcp.json with private sources:
{
"servers": {
"nuget": {
"type": "stdio",
"command": "dnx",
"args": ["DimonSmart.NugetMcpServer@<version>", "--yes"],
"env": {
"NUGET_SOURCES": "C:\\NuGet\\LocalFeed;https://pkgs.dev.azure.com/ORG/_packaging/Feed/nuget/v3/index.json"
}
}
}
}
Codex config.toml with private sources:
[mcp_servers.nuget]
command = "dnx"
args = ["DimonSmart.NugetMcpServer@<version>", "--yes"]
[mcp_servers.nuget.env]
NUGET_SOURCES = "C:\\NuGet\\LocalFeed;https://pkgs.dev.azure.com/ORG/_packaging/Feed/nuget/v3/index.json"
More configuration options: Technical details
Verify it works
After the MCP client shows the server as connected, ask your assistant to use it explicitly:
Use the NuGet MCP server to inspect Dapper 2.1.66 and show the public extension methods for IDbConnection.
Before writing code, use the NuGet MCP server to inspect the real API of Microsoft.Extensions.DependencyInjection.Abstractions and use only existing public types and methods.
Use the NuGet MCP server to compare public APIs of Some.Package 1.8.0 and 2.0.0 and summarize breaking changes.
Available tools
search_packages: search packages by query and keywords.search_packages_fuzzy: use AI-assisted fuzzy package search.get_package_info: get package metadata, dependencies, and package shape.list_interfaces: list public interfaces.list_classes_records_structs: list public classes, records, and structs.get_interface_definition: return a C# interface definition.get_class_or_record_or_struct_definition: return a C# class, record, or struct definition.get_enum_definition: return a C# enum definition.compare_package_versions: compare public API changes between versions.list_package_files: list files inside a package.get_package_file: read a file from a package.get_current_time: return the current server time.
Detailed parameters and development notes: Technical details
Troubleshooting
dnxis not found: install a current .NET SDK and make sure the .NET tools path is available in your shell, or use the Docker install path.- Docker is not running: start Docker Desktop or your Docker daemon, then retry the MCP client command.
- The MCP client shows the server but no tools: restart the client, check the client logs, and verify the server command starts successfully outside the client.
- Private feed authentication fails: check the active
NuGet.Config, credential provider setup, feed URL, and whether the same user account can restore from that feed with normal NuGet tooling. - Package restore or search is slow on first run: the server and NuGet client may need to download package metadata and package files before later cached reads are faster.
- Windows path quoting fails: keep paths in quotes, escape backslashes in JSON/TOML strings, and prefer
NUGET_CONFIGwhen complex source paths or credentials are involved. - Claude Code or Codex CLI command fails unexpectedly: make sure the command includes the
--separator beforednxordocker; the MCP client options must appear before that separator.
Version
The release version is assigned by the GitHub Actions pipeline from the Git tag.
Check the installed version:
NugetMcpServer --version
Publishing
NuGet releases are published from version tags on main:
.\publish-next-version.ps1
The script creates and pushes the next vMAJOR.MINOR.PATCH tag. GitHub Actions builds, tests, updates the MCP manifest version, packs the NuGet MCP server package, and publishes it to NuGet.
WinGet publishing is also tag-driven after the GitHub release exists:
.\publish-winget-version.ps1
By default, the WinGet script uses the latest vMAJOR.MINOR.PATCH release tag. Pass -Version 1.2.3 to publish a specific release.
License
MIT
NuGet MCP questions
What tools does NuGet MCP provide?
It exposes 12 tools, including search_packages, search_packages_fuzzy, get_package_info, list_interfaces, list_classes_records_structs.
How do I install the NuGet MCP server in Claude Code?
Run the claude mcp add command with stdio transport and dnx as the server command: claude mcp add --transport stdio nuget -- dnx DimonSmart.NugetMcpServer@1.1.7 --yes. The README notes everything after -- is the actual server command and arguments.
Can the NuGet MCP server access private feeds or local package folders?
Yes. Use the NUGET_SOURCES environment variable with one or more source URLs or local package folders separated by semicolons, or NUGET_CONFIG to point at a specific NuGet.Config.
What tools does the NuGet MCP server expose?
It exposes search_packages, search_packages_fuzzy, get_package_info, list_interfaces, list_classes_records_structs, definition getters, compare_package_versions, list_package_files, get_package_file, and get_current_time.
Can it compare API changes between two package versions?
Yes, the compare_package_versions tool compares public API changes between versions, which helps summarize breaking changes.
Can I run the server with Docker instead of the .NET SDK?
Yes, use Docker when the MCP client environment does not have the .NET SDK, running the ghcr.io/dimonsmart/nugetmcpserver:latest image.