Skip to content

Commit 733e43a

Browse files
authored
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. :(
1 parent 2eca5d9 commit 733e43a

1 file changed

Lines changed: 91 additions & 196 deletions

File tree

Lines changed: 91 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,85 @@
11
---
22
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
95
ms.topic: overview
106
---
117

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
139

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.
1911

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.
2513

2614
## What is Model Context Protocol (MCP)?
2715

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.
3217

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.
3719

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).
4021

41-
## How AI agents use WinGet MCP tools
22+
## How WinGet MCP works with AI agents
4223

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:
4625

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:
4827

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
5131

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:
5633

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
10437

10538
## Prerequisites
10639

10740
Before using the WinGet MCP server integration, ensure you have:
10841

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)
11746

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
12048

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:
12250

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
12553

126-
```powershell
127-
winget mcp
128-
```
54+
### Find the WinGet MCP server executable path
12955

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:
13257

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.
13459

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+
```
13763
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
144-
$mcpServerPath = Join-Path -Path $wingetDir `
145-
-ChildPath "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" `
146-
-AdditionalChildPath "WindowsPackageManagerMCPServer.exe"
147-
Write-Host "WinGet MCP Server path: $mcpServerPath"
148-
```
64+
1. Open PowerShell and use the following script to locate the MCP server executable:
14965
150-
The typical location is:
66+
```powershell
67+
# Find the WinGet executable path
68+
$wingetPath = (Get-Command winget).Source
69+
# Get the directory containing WinGet
70+
$wingetDir = Split-Path $wingetPath -Parent
71+
# The MCP server executable is in the same directory
72+
$mcpServerPath = Join-Path -Path $wingetDir `
73+
-ChildPath "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" `
74+
-AdditionalChildPath "WindowsPackageManagerMCPServer.exe"
75+
Write-Host "WinGet MCP Server path: $mcpServerPath"
76+
```
15177
152-
```text
153-
C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\WindowsPackageManagerMCPServer.exe
154-
```
78+
The typical location is:`C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\WindowsPackageManagerMCPServer.exe`
15579
156-
### Configuring the MCP server in VS Code
80+
### Configure the MCP server in Visual Studio Code
15781
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:
16183
16284
```json
16385
{
@@ -171,48 +93,38 @@ configuration file. Create or update your MCP configuration file in the
17193
}
17294
```
17395

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.
17697

17798
This configuration tells MCP clients to:
17899

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
180101
- Use standard I/O communication between the client and server
181102
- Register the server with the identifier `winget-mcp`
182103

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).
185105

186106
### Manual command-line testing
187107

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:
190109

191110
```powershell
192111
& "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\WindowsPackageManagerMCPServer.exe"
193112
```
194113

195-
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.
199115

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.
201117

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
204119

205-
### Step 2: Access WinGet MCP tools
120+
To start using the Windows Package Manager (WinGet) MCP Server in Visual Studio Code:
206121

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.
210126

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
216128

217129
Example prompts that work well with WinGet MCP integration:
218130

@@ -221,14 +133,13 @@ Example prompts that work well with WinGet MCP integration:
221133
- "Find packages for Docker on Windows"
222134
- "Install the latest version of Git"
223135

224-
## Available MCP tools
136+
## Available WinGet MCP commands
225137

226-
The WinGet MCP server currently provides the following tools:
138+
The WinGet MCP server currently supports the following commands:
227139

228140
### find
229141

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.
232143

233144
**Parameters:**
234145

@@ -252,64 +163,48 @@ This tool can install packages with your approval.
252163

253164
If you encounter connection issues between VS Code and the WinGet MCP server:
254165

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.
260171

261172
### Limited or no response from AI Agent
262173

263174
If the AI agent doesn't seem to be using WinGet MCP tools:
264175

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.
270180

271181
### Package installation issues
272182

273183
If package installation fails or behaves unexpectedly:
274184

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.
279189

280190
## Limitations
281191

282192
> [!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.**
286194
287195
Current limitations of the WinGet MCP server integration include:
288196

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]
298-
- [winget install command][07]
299-
- [winget search command][08]
300-
- [WinGet troubleshooting guide][05]
301-
- [Use MCP servers in VS Code][01]
302-
- [Model Context Protocol documentation][09]
303-
- [Windows Package Manager GitHub repository][10]
304-
305-
<!-- Link reference definitions -->
306-
[01]: https://code.visualstudio.com/docs/copilot/chat/mcp-servers
307-
[02]: https://marketplace.visualstudio.com/items?itemName=GitHub.copilot
308-
[03]: https://code.visualstudio.com/docs/copilot/overview
309-
[04]: https://code.visualstudio.com/docs/copilot/customization/mcp-servers
310-
[05]: ./troubleshooting.md
311-
[06]: index.md
312-
[07]: install.md
313-
[08]: search.md
314-
[09]: https://modelcontextprotocol.io/docs
315-
[10]: https://github.com/microsoft/winget-cli
197+
- **Agent behavior**: AI agents might not use the WinGet MCP server for every query, though specific prompting can encourage its use.
198+
- **Tool availability**: The integration currently supports only `find` and `install` commands. Future releases might add support for more commands.
199+
200+
## How WinGet MCP integrates with VS Code
201+
202+
The WinGet MCP server integrates with VS Code and AI agents as follows:
203+
204+
1. **VS Code Copilot** communicates with AI agents that can access MCP servers.
205+
1. **AI agents** use the MCP protocol to query the WinGet MCP server for information.
206+
1. **WinGet MCP server** processes requests and calls the appropriate WinGet CLI commands.
207+
1. **WinGet CLI** performs package searches and installations in the repository.
208+
1. **Results** flow back through the chain to provide enhanced assistance.
209+
210+
![WinGet MCP integration diagram](../../images/winget-mcp-integration-with-vscode.png)

0 commit comments

Comments
 (0)