You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scroll down to the **Model Context Protocol (MCP)** section and add the following JSON snippet to your `mcpServers` configuration:
87
+
88
+
```json
89
+
{
90
+
"mcpServers": {
91
+
"NuGet": {
92
+
"type": "local",
93
+
"command": "dnx",
94
+
"args": ["NuGet.Mcp.Server", "--yes"],
95
+
"tools": ["*"],
96
+
"env": {}
97
+
}
98
+
}
99
+
}
100
+
```
101
+
102
+
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.
103
+
104
+
Finally, click the **Save MCP configuration** button to save your changes.
105
+
106
+
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.
107
+
You can do this by creating the following workflow file in your repository at
108
+
109
+
`.github/workflows/copilot-setup-steps.yml`
110
+
111
+
The contents of this workflow file should be as follows:
112
+
113
+
```yml
114
+
name: "Copilot Setup Steps"
115
+
116
+
# Automatically run the setup steps when they are changed to allow for easy validation, and
117
+
# allow manual testing through the repository's "Actions" tab
118
+
on:
119
+
workflow_dispatch:
120
+
push:
121
+
paths:
122
+
- .github/workflows/copilot-setup-steps.yml
123
+
pull_request:
124
+
paths:
125
+
- .github/workflows/copilot-setup-steps.yml
126
+
127
+
jobs:
128
+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
129
+
copilot-setup-steps:
130
+
runs-on: ubuntu-latest
131
+
132
+
# Set the permissions to the lowest permissions possible needed for your steps.
133
+
# Copilot will be given its own token for its operations.
134
+
permissions:
135
+
# 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.
136
+
contents: read
137
+
138
+
# You can define any steps you want, and they will run before the agent starts.
139
+
# If you do not check out your code, Copilot will do this for you.
140
+
steps:
141
+
- name: Install .NET 10.x
142
+
uses: actions/setup-dotnet@v5
143
+
with:
144
+
dotnet-version: |
145
+
10.x
146
+
dotnet-quality: preview
147
+
148
+
- name: dotnet --info
149
+
run: dotnet --info
150
+
```
151
+
152
+
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.
153
+
76
154
## Fixing package vulnerabilities
77
155
78
156
The NuGet MCP server can help you identify and fix package vulnerabilities in your project.
0 commit comments