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
Revise Windows Package Manager MCP server documentation
Updated the documentation for the Windows Package Manager MCP server, including changes to the description, date, and various sections for clarity and accuracy.
Unfortunately, Mermaid diagrams are not yet supported on Microsoft Learn. :(
title: Using Windows Package Manager with Model Context Protocol (MCP) Server
3
-
description: >-
4
-
The Windows Package Manager includes a Model Context Protocol (MCP) server
5
-
that enables AI agents and tools to discover and install packages through a
6
-
standardized interface, enhancing the authoring experience in supported
7
-
editors like VS Code.
8
-
ms.date: 01/07/2025
3
+
description: The Windows Package Manager includes a Model Context Protocol (MCP) server that enables AI agents and tools to discover and install packages through a standardized interface, enhancing the authoring experience in supported editors like VS Code.
4
+
ms.date: 10/30/2025
9
5
ms.topic: overview
10
6
---
11
7
12
-
# Using Windows Package Manager with Model Context Protocol (MCP) Server
8
+
# Use the Windows Package Manager MCP Server for package management with AI agents
13
9
14
-
The Windows Package Manager (WinGet) includes a built-in Model Context Protocol
15
-
(MCP) server that enables AI agents and development tools to interact with
16
-
WinGet's package discovery and installation capabilities through a standardized
17
-
interface. This integration provides intelligent assistance for discovering and
18
-
installing packages on your system.
10
+
The Windows Package Manager (WinGet) includes a built-in Model Context Protocol (MCP) server. The WinGet MCP server enables AI agents and development tools to intelligently assist you by understanding what packages are available and how to install them.
19
11
20
-
The WinGet MCP server exposes WinGet's core functionality to AI agents,
21
-
enabling them to help you find packages, understand their details, and assist
22
-
with installation workflows. This enhances the overall authoring experience by
23
-
providing contextual information about available packages directly to AI-powered
24
-
tools.
12
+
The WinGet MCP server exposes WinGet's core functionality to AI agents, enabling them to help you find packages, understand their details, and assist with installation workflows. This functionality enhances the overall authoring experience by providing contextual information about available packages directly to AI-powered tools.
25
13
26
14
## What is Model Context Protocol (MCP)?
27
15
28
-
Model Context Protocol (MCP) is an open protocol that enables AI systems to
29
-
interact with external data sources and tools in a consistent way. It provides
30
-
a standardized interface for AI agents to discover capabilities, retrieve
31
-
information, and invoke actions across different systems and services.
16
+
Model Context Protocol (MCP) is an open protocol that enables AI systems to interact with external data sources and tools in a consistent way. It provides a standardized interface for AI agents to discover capabilities, retrieve information, and invoke actions across different systems and services.
32
17
33
-
MCP allows AI-powered tools to understand what operations are possible and how
34
-
to perform them, without requiring custom integrations for each system. This
35
-
makes it easier for developers to build AI assistants that can work with
36
-
multiple tools and services seamlessly.
18
+
MCP allows AI-powered tools to understand what operations are possible and how to perform them, without requiring custom integrations for each system. This protocol makes it easier for developers to build AI assistants that can work with multiple tools and services seamlessly.
37
19
38
-
To learn more about MCP and how it works with AI agents, see
39
-
[Use MCP servers in VS Code][01].
20
+
To learn more about MCP and how it works with AI agents, see [Use MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
40
21
41
-
## How AI agents use WinGet MCP tools
22
+
## How WinGet MCP works with AI agents
42
23
43
-
The WinGet MCP server enables AI agents to intelligently assist you by
44
-
understanding what packages are available and how to install them. Here's how
45
-
agents use these capabilities to help fulfill your requests:
24
+
To use the WinGet MCP server with AI agents, you first need to configure your development environment to connect to the MCP server. Once connected, the WinGet MCP server can assist with:
46
25
47
-
### Discovering available packages
26
+
-**Discovering available packages**: When you ask an agent to help with software installation tasks, the agent can search the WinGet repository for available packages. WinGet MCP helps agents provide accurate, up-to-date information about available software.For example:
48
27
49
-
When you ask an agent to help with software installation tasks, the agent can
50
-
search the WinGet repository for available packages. For example:
28
+
-**You ask**: "I need to install Visual Studio Code"
29
+
-**Agent searches**: The WinGet repository for Visual Studio Code packages
30
+
-**Agent provides**: Package details including ID, version, publisher, and installation options
51
31
52
-
-**You ask**: "I need to install Visual Studio Code"
53
-
-**Agent searches**: The WinGet repository for Visual Studio Code packages
54
-
-**Agent provides**: Package details including ID, version, publisher, and
55
-
installation options
32
+
-**Installing packages**: When you need to install specific software, agents can assist with the installation process, ensuring that your software is installed with the correct configuration. For example:
56
33
57
-
This discovery helps agents provide accurate, up-to-date information about
58
-
available software.
59
-
60
-
### Installing packages
61
-
62
-
When you need to install specific software, agents can assist with the
63
-
installation process:
64
-
65
-
-**You ask**: "Install Python for development"
66
-
-**Agent identifies**: The appropriate Python package from the WinGet repository
67
-
-**Agent provides**: Installation commands or can initiate the installation
68
-
with your approval
69
-
70
-
This ensures you get the right software installed with the correct
71
-
configuration.
72
-
73
-
## How WinGet MCP integrates with VS Code
74
-
75
-
The following diagram illustrates how the WinGet MCP server integrates with
76
-
VS Code and AI agents:
77
-
78
-
```mermaid
79
-
graph TD
80
-
A[VS Code] -->|Copilot Chat| B[AI Agent]
81
-
B -->|MCP Protocol| C[WinGet MCP Server]
82
-
C -->|winget commands| D[WinGet CLI]
83
-
D -->|Search| E[Package Repository]
84
-
D -->|Install| F[System Packages]
85
-
86
-
B -->|Package suggestions| G[User Interface]
87
-
B -->|Installation assistance| H[Command Generation]
88
-
B -->|Package information| I[Details Display]
89
-
90
-
style C fill:#e1f5fe
91
-
style D fill:#f3e5f5
92
-
style A fill:#e8f5e8
93
-
```
94
-
95
-
The integration works as follows:
96
-
97
-
1.**VS Code Copilot** communicates with AI agents that can access MCP servers
98
-
2.**AI agents** use the MCP protocol to query the WinGet MCP server for
99
-
information
100
-
3.**WinGet MCP server** processes requests and calls the appropriate WinGet CLI
101
-
commands
102
-
4.**WinGet CLI** performs package searches and installations in the repository
103
-
5.**Results** flow back through the chain to provide enhanced assistance
34
+
-**You ask**: "Install Python for development"
35
+
-**Agent identifies**: The appropriate Python package from the WinGet repository
36
+
-**Agent provides**: Installation commands or can initiate the installation with your approval
104
37
105
38
## Prerequisites
106
39
107
40
Before using the WinGet MCP server integration, ensure you have:
108
41
109
-
- Windows 10 version 1809 (build 17763) or later, or Windows 11
110
-
- WinGet with MCP server support installed on your system
111
-
- VS Code v1.104 or above with [GitHub Copilot extension][02] enabled
112
-
- Access to [Copilot in VS Code][03]
113
-
114
-
## Setting up WinGet MCP Server
115
-
116
-
### Locating the WinGet MCP Server executable
42
+
- Windows 11 *(or Windows 10 version 1809, build 17763, or later)*
43
+
- VS Code v1.104 or later with [GitHub Copilot extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) enabled
44
+
- Access to [Copilot in VS Code](https://code.visualstudio.com/docs/copilot/overview)
45
+
-[WinGet with MCP server support installed on your system](#set-up-winget-mcp-server)
117
46
118
-
The WinGet MCP server executable is installed alongside the Windows Package
119
-
Manager. You can find it using one of the following methods:
47
+
## Set up WinGet MCP Server
120
48
121
-
#### Method 1: Using the winget mcp command
49
+
To set up the WinGet MCP server for use with AI agents in VS Code, you must:
122
50
123
-
The **winget** tool includes an **mcp** command that provides the configuration
124
-
information needed for MCP clients:
51
+
1. Find the WinGet MCP server executable path
52
+
1. Configure the MCP server in Visual Studio Code
125
53
126
-
```powershell
127
-
winget mcp
128
-
```
54
+
### Find the WinGet MCP server executable path
129
55
130
-
This command displays the JSON configuration fragment showing the path to the
131
-
`WindowsPackageManagerMCPServer.exe` executable.
56
+
To set up the WinGet MCP server, you must first locate the path to the executable file. Use one of the following methods to find the path:
132
57
133
-
#### Method 2: Locating via PowerShell
58
+
1. Open a command prompt and enter the `winget mcp` command. The result displays the JSON configuration fragment that shows the path to the `WindowsPackageManagerMCPServer.exe` file.
134
59
135
-
You can locate the WinGet MCP server executable by first finding the WinGet
136
-
executable path and then navigating to the same directory:
60
+
```powershell
61
+
winget mcp
62
+
```
137
63
138
-
```powershell
139
-
# Find the WinGet executable path
140
-
$wingetPath = (Get-Command winget).Source
141
-
# Get the directory containing WinGet
142
-
$wingetDir = Split-Path $wingetPath -Parent
143
-
# The MCP server executable is in the same directory
The typical location is:`C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\WindowsPackageManagerMCPServer.exe`
155
79
156
-
### Configuring the MCP server in VS Code
80
+
### Configure the MCP server in Visual Studio Code
157
81
158
-
The recommended way to configure the WinGet MCP server is through an `mcp.json`
159
-
configuration file. Create or update your MCP configuration file in the
160
-
`.vscode` folder with the following content:
82
+
The recommended way to configure the WinGet MCP server is through an `mcp.json` configuration file. You need to find (you might need to show hidden files) or create a `.vscode` folder in the root directory of your project. In this directory, create a `mcp.json` file (or update it if this file already exists) with the following content:
161
83
162
84
```json
163
85
{
@@ -171,48 +93,38 @@ configuration file. Create or update your MCP configuration file in the
171
93
}
172
94
```
173
95
174
-
Replace `<username>` with your actual Windows username, or use the path
175
-
discovered using one of the methods above.
96
+
Replace `<username>` with your actual Windows username or use the WinGet MCP server executable path that you previously identified.
176
97
177
98
This configuration tells MCP clients to:
178
99
179
-
- Use the Windows Package Manager MCP server executable as the command
100
+
- Use the Windows Package Manager (WinGet) MCP server executable as the command
180
101
- Use standard I/O communication between the client and server
181
102
- Register the server with the identifier `winget-mcp`
182
103
183
-
For detailed information about MCP configuration and setup in VS Code, refer to
184
-
the [official MCP documentation][04].
104
+
For detailed information about MCP configuration and setup in VS Code, see [Use MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).
185
105
186
106
### Manual command-line testing
187
107
188
-
You can also start the WinGet MCP server manually for testing or development
189
-
purposes by running the executable directly:
108
+
To start the WinGet MCP server manually for testing or development purposes, run the executable directly by entering the following command in PowerShell:
The server will start and wait for MCP protocol messages on standard input. The
196
-
server will continue running until terminated or the input stream is closed.
197
-
198
-
## Using WinGet MCP tools in VS Code
114
+
Replace `<username>` with your actual Windows username.
199
115
200
-
### Step 1: Open Copilot Chat in Agent Mode
116
+
The server starts and waits for MCP protocol messages on standard input. The server continues running until you terminate it (Ctrl+C) or close the input stream.
201
117
202
-
1. Open the GitHub Copilot extension window in VS Code
203
-
2. Select "Agent Mode" to enable MCP tool integration
118
+
## Use WinGet MCP tools in Visual Studio Code
204
119
205
-
### Step 2: Access WinGet MCP tools
120
+
To start using the Windows Package Manager (WinGet) MCP Server in Visual Studio Code:
206
121
207
-
1. Click on the tool icon in the GitHub Copilot chat window
208
-
2. Search for "MCP Server: winget-mcp" in the available tools list
209
-
3. Verify that the WinGet MCP server tools are available and loaded
122
+
1. Open the GitHub Copilot extension chat window and select **Agent Mode** to enable MCP tool integration.
123
+
1. Access WinGet MCP tools by selecting the tool icon in the GitHub Copilot chat window and search for **MCP Server: winget-mcp** in the available tools list.
124
+
1. Verify that the WinGet MCP server tools are available, with a checkmark next to the entry.
125
+
1. Begin asking questions or requesting assistance with package management tasks. The AI agent automatically uses the WinGet MCP tools when appropriate to provide accurate, context-aware help.
210
126
211
-
### Step 3: Start using WinGet MCP integration
212
-
213
-
Begin asking questions or requesting assistance with package management tasks.
214
-
The AI agent will automatically use the WinGet MCP tools when appropriate to
215
-
provide accurate, context-aware help.
127
+
## Example prompts for WinGet MCP
216
128
217
129
Example prompts that work well with WinGet MCP integration:
218
130
@@ -221,14 +133,13 @@ Example prompts that work well with WinGet MCP integration:
221
133
- "Find packages for Docker on Windows"
222
134
- "Install the latest version of Git"
223
135
224
-
## Available MCP tools
136
+
## Available WinGet MCP commands
225
137
226
-
The WinGet MCP server currently provides the following tools:
138
+
The WinGet MCP server currently supports the following commands:
227
139
228
140
### find
229
141
230
-
Searches the WinGet repository for packages matching specified criteria. This
231
-
tool helps discover available software and their details.
142
+
Searches the WinGet repository for packages matching specified criteria. This tool helps discover available software and their details.
232
143
233
144
**Parameters:**
234
145
@@ -252,64 +163,48 @@ This tool can install packages with your approval.
252
163
253
164
If you encounter connection issues between VS Code and the WinGet MCP server:
254
165
255
-
1. Verify your `mcp.json` configuration file syntax
256
-
2. Check that the path to `WindowsPackageManagerMCPServer.exe` is correct
257
-
3. Ensure the executable has proper permissions to run
258
-
4. Review VS Code's output panel for detailed error messages
259
-
5. Try restarting the MCP integration in VS Code
166
+
1. Verify your `mcp.json` configuration file syntax.
167
+
1. Check that the path to `WindowsPackageManagerMCPServer.exe` is correct.
168
+
1. Ensure the executable has proper permissions to run.
169
+
1. Review VS Code's output panel for detailed error messages.
170
+
1. Try restarting the MCP integration in VS Code.
260
171
261
172
### Limited or no response from AI Agent
262
173
263
174
If the AI agent doesn't seem to be using WinGet MCP tools:
264
175
265
-
- Use specific prompts that clearly indicate you want package management
266
-
information
267
-
- Try phrases like "Search for packages" or "Install using WinGet"
268
-
- Verify that Agent Mode is enabled in Copilot Chat
269
-
- Check if the WinGet MCP tools are visible in the tools list
176
+
- Use specific prompts that clearly indicate you want package management information.
177
+
- Try phrases like "Search for packages" or "Install using WinGet".
178
+
- Verify that Agent Mode is enabled in Copilot Chat.
179
+
- Check if the WinGet MCP tools are visible in the tools list.
270
180
271
181
### Package installation issues
272
182
273
183
If package installation fails or behaves unexpectedly:
274
184
275
-
- Review the installation command or parameters suggested by the AI agent
276
-
- Check the [WinGet troubleshooting guide][05] for common issues
277
-
- Verify you have appropriate permissions to install software
278
-
- Ensure the package source is accessible
185
+
- Review the installation command or parameters suggested by the AI agent.
186
+
- Check the [WinGet troubleshooting guide](./troubleshooting.md) for common issues.
187
+
- Verify you have appropriate permissions to install software.
188
+
- Ensure the package source is accessible.
279
189
280
190
## Limitations
281
191
282
192
> [!IMPORTANT]
283
-
> It is your responsibility to review all commands generated with AI assistance.
284
-
> **Always validate installation commands and verify the software source before
285
-
> executing them on your system.**
193
+
> You are responsible for reviewing all commands generated with AI assistance. **Always validate installation commands and verify the software source before executing them on your system.**
286
194
287
195
Current limitations of the WinGet MCP server integration include:
288
196
289
-
-**Agent behavior**: There is no guarantee that AI agents will use WinGet MCP
290
-
tools for any particular query, though specific prompting can help guide tool
291
-
usage
292
-
-**Tool availability**: Currently supports find and install operations;
293
-
additional operations may be added in future releases
294
-
295
-
## See also
296
-
297
-
-[Use the winget tool to install and manage applications][06]
0 commit comments