English | 简体中文
This extension integrates the Windows Package Manager (WinGet) with the Gemini CLI using the Model Context Protocol (MCP). It allows you to search for software packages and generate installation commands directly within your conversation with Gemini.
- Package Discovery: Search for packages in the WinGet repository using the
/winget:findcommand or natural language. - Installation Helper: Generate installation commands with safety warnings using
/winget:install. - Environment Setup: specialized "Package Manager Expert" skill that helps you architect and install full development environments (e.g., "Setup a Python dev environment").
- Language Aware: The extension detects your language (English/Chinese) and adapts its output accordingly.
- OS: Windows 10 (1809+) or Windows 11.
- Software:
- Gemini CLI installed.
- App Installer (WinGet) installed and up to date.
-
Open a command prompt and enter the
winget mcpcommand. The result displays the JSON configuration fragment that shows the path to theWindowsPackageManagerMCPServer.exefile.winget mcp
If the following error occurs: Unrecognized command: 'mcp'
Verify that the App Installer application is up to date on the device. This can be verified in the Store application.
-
Configure the Extension: Open the
gemini-extension.jsonfile in this folder. Locate themcpServers.winget-mcp.commandfield and replace the existing path with the one you found in the previous step."mcpServers": { "winget-mcp": { "type": "stdio", "command": "C:\\Users\\<username>\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\\WindowsPackageManagerMCPServer.exe", "args": [], "env": {} } }
Note: Ensure you double the backslashes (
\\) in the JSON file path. -
Once you have updated the configuration file, link the extension to Gemini CLI:
gemini extensions link .Or install the extension using the following command:
gemini extensions install https://github.com/ZhanZiyuan/winget-mcp
After running this command, restart your Gemini CLI session.
-
Find a Package:
/winget:find "Visual Studio Code"Or just ask: "Find a pdf reader for me."
-
Install a Package:
/winget:install "Microsoft.VisualStudioCode"Or just ask: "How do I install Chrome?"
This extension includes a Package Manager Expert skill. It activates automatically when you have complex requests.
- Example: "I want to setup a complete web development environment with Node.js, VS Code, and Git."
- The agent will break this down, verify package IDs for each tool, and provide a comprehensive installation plan.
This project is licensed under the GPLv3 License - see the LICENSE file for details.
Based on the Getting started with Gemini CLI extensions and Use the Windows Package Manager MCP Server for package management with AI agents.