Skip to content

Leverage the new IMcpServerInfoService to detect server availability - #7453

Merged
jebriede merged 10 commits into
devfrom
dev-jebriede-McpServerStatus
Jun 18, 2026
Merged

jebriede merged 10 commits into
devfrom
dev-jebriede-McpServerStatus

Conversation

@jebriede

@jebriede jebriede commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/3790

Description

Improves the reliability of the Fix Vulnerabilities with Copilot flow by adding an upfront check that the NuGet MCP Server is registered and running before starting a Copilot tool session. Previously the only signal was the presence of the NuGet MCP tool. We now also query the MCP server's state directly via the new IMcpServerInfoService, treating the server as available when any of its acceptable names reports an Active or Suspended state. This requires bumping the VS SDK packages to 18.8.850 (with corresponding .vsixignore and MEF-analyzer adjustments) and adds new error states/messages for when the server's status can't be determined or the server isn't active.

Upgraded Microsoft.VisualStudio.ComponentModelHost to 18.8.850 to resolve a CS0433 type-collision introduced by the Microsoft.Internal.VisualStudio.Shell.Framework 18.8.850 bump

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@jebriede
jebriede requested a review from a team as a code owner June 4, 2026 00:11
@jebriede
jebriede requested review from nkolev92 and zivkan June 4, 2026 00:11
@jebriede
jebriede marked this pull request as draft June 4, 2026 00:11
@jebriede
jebriede force-pushed the dev-jebriede-McpServerStatus branch from 6dcf3e8 to a06e01f Compare June 10, 2026 22:48
@jebriede
jebriede marked this pull request as ready for review June 11, 2026 22:58
Comment thread Directory.Packages.props Resolved
martinrrm
martinrrm previously approved these changes Jun 15, 2026

@martinrrm martinrrm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with some comments

Comment thread NuGet.Config Resolved
Comment thread build/DotNetSdkVersions.txt Resolved

@Nigusu-Allehu Nigusu-Allehu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except a few comments I had. And it would be nice if we have a PR description.

FYI, I think the build error and the dotnet SDK version diff could probably fixed with a rebase

@jebriede
jebriede force-pushed the dev-jebriede-McpServerStatus branch from 1372c85 to 457ea9f Compare June 17, 2026 00:37
Comment thread NuGet.Config Resolved
jebriede and others added 2 commits June 17, 2026 16:47
The IL2026/IL3050 trim/AOT warnings from Newtonsoft.Json 13.0.4 RUC
annotations are already suppressed at the specific responsible call
sites via [UnconditionalSuppressMessage], [RequiresUnreferencedCode]/
[RequiresDynamicCode], and targeted #pragma directives. The project-wide
NoWarn was therefore redundant and undesirable. Removing it keeps the
suppressions scoped to the code that generates the warnings.

Co-authored-by: Copilot <[email protected]>
Scope the Newtonsoft.Json 13.0.4 trim/AOT (IL2026/IL3050) suppression to
the single responsible call site instead of the whole project. The only
NSJ reflection-based call is JsonConvert.DeserializeObject in the legacy
command-line credential provider, so suppress it there via a method-scoped
[UnconditionalSuppressMessage] guarded with NET5_0_OR_GREATER, matching the
pattern used in NuGet.Protocol.

Co-authored-by: Copilot <[email protected]>

@Nigusu-Allehu Nigusu-Allehu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@jebriede
jebriede merged commit 97c0fe1 into dev Jun 18, 2026
20 of 21 checks passed
@jebriede
jebriede deleted the dev-jebriede-McpServerStatus branch June 18, 2026 17:58
martinrrm added a commit that referenced this pull request Jun 23, 2026
The NuGet.Client-Official "Publish Using Darc" stage fails installing the darc
CLI: "The --add-source option cannot be combined with package source mapping."
This began on 2026-06-18 when #7453 bumped global.json to SDK 10.0.300, which
now rejects 'dotnet tool install --add-source' when <packageSourceMapping> is
configured.

eng/common is VMR-managed; the fix exists upstream (dotnet/arcade#16642) and
already flowed to release/7.6.x via #7437, but dev's VMR backflow is behind.
Manually port #7437's eng/common changes (excluding vmr-sync.yml, which has
diverged on dev):

- darc-init.ps1 / darc-init.sh: --add-source -> --source
- post-build/redact-logs.ps1: --add-source -> --source
- core-templates/steps/source-index-stage1-publish.yml: --add-source -> --source
- core-templates/steps/publish-logs.yml: drop deprecated symbol-server PATs

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants