
NuGet API Inspector
io.github.DimonSmart由 GitHub 帳號 DimonSmart 發布v1.1.10更新於 Oct 24, 2026
Inspect NuGet package APIs, dependencies, metadata, and breaking changes across versions.
概覽
讓助理在撰寫相依於 NuGet 套件的程式碼前,查詢真實的套件中繼資料、相依性與公開 C# API。
- 可以做什麼
- 依關鍵字或模糊比對搜尋套件,並讀取中繼資料、相依性與套件結構
- 列出某個版本中的公開介面、類別、record 與 struct
- 回傳介面、類別、record、struct 與列舉的 C# 定義
- 比較兩個版本之間的公開 API 變更,找出破壞性變更
- 列出並讀取套件內的個別檔案
- 回傳伺服器目前時間
- 適用情境
- 適合助理需要針對某個 NuGet 套件撰寫程式碼、且版本相關的 API 細節很重要時;也適合套件位於模型無法憑記憶得知的私有來源或本機資料夾時。
- 執行需求
- 以 stdio 在本機執行。需要較新的 .NET SDK,讓 dnx 下載並執行 DimonSmart.NugetMcpServer 工具,也可改用 Docker。需要連線至 nuget.org 或其他來源的網路。私有來源可選用 NUGET_SOURCES(以分號分隔的來源 URL 或本機套件資料夾)與 NUGET_CONFIG(NuGet.Config 路徑)。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 NuGet API Inspector,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
NugetMcpServer
[NuGet] [Install via Docker] [NuGet API Inspector MCP server]
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
Check available MCP commands:
Inside the Codex TUI, run:
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
Everything after -- is the actual MCP server command and arguments.
Manage and verify the server:
Inside Claude Code, run:
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:
4. Install via Docker
Use Docker when the MCP client environment does not have the .NET SDK available.
Codex:
Claude Code:
Run the container directly:
VS Code mcp.json:
Install in VS Code with Docker
5. Manual configuration
Codex config.toml:
Codex Docker variant:
Claude Desktop and generic MCP clients that use the mcpServers JSON shape:
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:
Claude Code with NUGET_SOURCES:
Codex with NUGET_CONFIG:
Claude Code with NUGET_CONFIG:
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:
Codex config.toml with private sources:
More configuration options: Technical details
Verify it works
After the MCP client shows the server as connected, ask your assistant to use it explicitly:
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:
Publishing
NuGet releases are published from version tags on main:
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:
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
來源:README.md,提交 900590d
工具
0版本歷史
1- v1.1.10最新Oct 11, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。