Skip to content

ZhanZiyuan/winget-mcp

Repository files navigation

WinGet MCP

English | 简体中文

GitHub last commit GitHub License GitHub Downloads (all assets, all releases)

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.

Features

  • Package Discovery: Search for packages in the WinGet repository using the /winget:find command 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.

Prerequisites

Installation & Setup

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

    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.json file in this folder. Locate the mcpServers.winget-mcp.command field 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.

Usage

Commands

  • 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?"

Skills

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.

License

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.