From 2921a69d360442c5060c60e4496a3c6e332e9556 Mon Sep 17 00:00:00 2001 From: Jeff Kluge Date: Tue, 28 Oct 2025 13:05:28 -0700 Subject: [PATCH 1/4] Add instructions on configuring the NuGet MCP server for GitHub Copilot agent --- docs/concepts/NuGet-MCP-Server.md | 78 ++++++++++++++++++ .../media/github-copilot-agent-settings.png | Bin 0 -> 3768 bytes 2 files changed, 78 insertions(+) create mode 100644 docs/concepts/media/github-copilot-agent-settings.png diff --git a/docs/concepts/NuGet-MCP-Server.md b/docs/concepts/NuGet-MCP-Server.md index 9a51f1d89..3c8f355d8 100644 --- a/docs/concepts/NuGet-MCP-Server.md +++ b/docs/concepts/NuGet-MCP-Server.md @@ -73,6 +73,84 @@ To verify that the MCP server is working correctly, open the GitHub Copilot Chat Then click the Tools icon in the bottom toolbar to bring up the Tools menu. You should see the MCP server named "nuget" in the list of available servers. +## Getting started in GitHub Coilot Agent + +You can also configure the MCP Server to work with GitHub Copilot as a Coding Agent in your repositories. +Ensure that you configured your repository to use [GitHub Copilot Coding Agents](https://github.com/settings/copilot/coding_agent). + +Browse to your repository and click the Settings tab. +Expand the Copilot section and click on Coding Agents. + +![GitHub Copilot coding agent settings](./media/github-copilot-agent-settings.png) + +Scroll down to the **Model Context Protocol (MCP)** section and add the following JSON snippet to your `mcpServers` configuration: + +```json +{ + "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. + +Finally, click the **Save MCP configuration** button to save your changes. + +Now that the NuGet MCP is configured, you will also need to create a GitHub Actions workflow to install .NET 10 Preview 6 or higher so that the `dnx` command is available to run the MCP server. +You can do this by creating the following workflow file in your repository at + +`.github/workflows/copilot-setup-steps.yml` + +The contents of this workflow file should be as follows: + +```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 +``` + +This will ensure that the `dnx` command is available to run the NuGet MCP server when GitHub Copilot runs as a coding agent in your repository. + ## Fixing package vulnerabilities The NuGet MCP server can help you identify and fix package vulnerabilities in your project. diff --git a/docs/concepts/media/github-copilot-agent-settings.png b/docs/concepts/media/github-copilot-agent-settings.png new file mode 100644 index 0000000000000000000000000000000000000000..2b998ee3584c66843623a2e443d9a7bc891b206e GIT binary patch literal 3768 zcmb7{cQhMr_rMc-YivPBtQw_i)vD5n8MUjmsxHV%{jSxi%H>Z-MZ^J^p z9vTlH%@;IB?LNrSrX(7~8mj9xA9SwH@pt_^9B$?wXE8c;61wuCd=6GK8vqj+>7pA6WfKtE0=;Bm1I|b*mwFdz)(HKS&t+68vUd zqgTr~(-Pi!!&=7Dme%_{Edv|SQ#2kO+f6jYUB_3@W40C=KbDrr)rOV!SdR`1tI?s~NddNc_-^P0E?>1pbpr+;%7FykVp0BY#op758rR z5{)OE?1>`pjGX4FJQ(;flo24)*Oed=#tw?9V-i8mH4}gibK%yCE}uu}YFhrcQ=~H4*0Rr<|O_DHcuPvBy zMt&I_TwHHUIqYF<`|_()hrTGL@+COc3Z{HX+}3^;w>9KfQ0d>dMq&p5827KK@b~-W zrsH}pIb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C{0p3HI^_2o*mtbxjTrhD%cedj2T2+fuifj6%_q@*fp;jf?^|5`c@t=K7@>*aj znVOc9kqv=HA!Mx|U~A?rJYQ&&XF6;6NGkz5ZBHET$5z`ttre#d{PhX^X_lGP)Fcq} zmd1(Icv@Tiug=qQ_9&Lg=(c7&B;0=$mT3Mgn3l??Iv=D1JlU zxG@UePLw$JLYkb8TgqQxX!)fFJ{exbsji<`QmmlckMnfq4L2gDkblA%q0E4cX(fRs z1NkkNh{gJ1CFLZLfIo2I(Szg({0lV8_tMRu)LSs1A|@u;w=vo{i#crx-EM?ut-X5$ wC#<35<)gkaFp#$_=SCC&v2y>LRO|pF{VDtOqIr`gBijU+n^;5Zjc>>QA4=32X8-^I literal 0 HcmV?d00001 From 87512fce06a3a2fec2b5ba504c530d5f231441d1 Mon Sep 17 00:00:00 2001 From: Jeff Kluge Date: Tue, 28 Oct 2025 13:11:10 -0700 Subject: [PATCH 2/4] Update docs/concepts/NuGet-MCP-Server.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/concepts/NuGet-MCP-Server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/NuGet-MCP-Server.md b/docs/concepts/NuGet-MCP-Server.md index 3c8f355d8..ab11fbd83 100644 --- a/docs/concepts/NuGet-MCP-Server.md +++ b/docs/concepts/NuGet-MCP-Server.md @@ -73,7 +73,7 @@ To verify that the MCP server is working correctly, open the GitHub Copilot Chat Then click the Tools icon in the bottom toolbar to bring up the Tools menu. You should see the MCP server named "nuget" in the list of available servers. -## Getting started in GitHub Coilot Agent +## Getting started in GitHub Copilot Agent You can also configure the MCP Server to work with GitHub Copilot as a Coding Agent in your repositories. Ensure that you configured your repository to use [GitHub Copilot Coding Agents](https://github.com/settings/copilot/coding_agent). From e0267e48f9ca37254992033158cb89483624f598 Mon Sep 17 00:00:00 2001 From: Jeff Kluge Date: Tue, 28 Oct 2025 13:11:17 -0700 Subject: [PATCH 3/4] Update docs/concepts/NuGet-MCP-Server.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/concepts/NuGet-MCP-Server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/NuGet-MCP-Server.md b/docs/concepts/NuGet-MCP-Server.md index ab11fbd83..2e361afcf 100644 --- a/docs/concepts/NuGet-MCP-Server.md +++ b/docs/concepts/NuGet-MCP-Server.md @@ -99,7 +99,7 @@ Scroll down to the **Model Context Protocol (MCP)** section and add the followin } ``` -This will make all the MCP Server tools available, if you want specific tools you can list them in the `"tools"` parameter array. +This will make all the MCP Server tools available. If you want specific tools, you can list them in the `"tools"` parameter array. Finally, click the **Save MCP configuration** button to save your changes. From e4574d5d9590e16ffd00b74e207060ba9863ef61 Mon Sep 17 00:00:00 2001 From: Jeff Kluge Date: Mon, 3 Nov 2025 14:34:52 -0800 Subject: [PATCH 4/4] Update docs/concepts/NuGet-MCP-Server.md Co-authored-by: Donnie Goodson <49205731+donnie-msft@users.noreply.github.com> --- docs/concepts/NuGet-MCP-Server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/NuGet-MCP-Server.md b/docs/concepts/NuGet-MCP-Server.md index 2e361afcf..ccbd97e63 100644 --- a/docs/concepts/NuGet-MCP-Server.md +++ b/docs/concepts/NuGet-MCP-Server.md @@ -99,7 +99,7 @@ Scroll down to the **Model Context Protocol (MCP)** section and add the followin } ``` -This will make all the MCP Server tools available. If you want specific tools, you can list them in the `"tools"` parameter array. +This will make all of NuGet's MCP server tools available. If you want specific tools, you can list them in the `"tools"` parameter array. Finally, click the **Save MCP configuration** button to save your changes.