-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Relevant area(s)
WinGet CLI
Relevant command(s)
winget mcp
Brief description of your issue
The MCP server can't install packages when invoked with the "source" parameter (e.g., "source":"winget"). It can install without this parameter.
Steps to reproduce
-
Connect to the WinGet MCP server in any program. The following example uses OpenAI Codex, but it can be replicated in other programs like Cherry Studio. The configuration is as follows:
[mcp_servers.winget-mcp] command = "C:\\Users\\<username>\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\\WindowsPackageManagerMCPServer.exe" type = "stdio"
-
Prompt the model to install Codex. For example:
Could you find and install Codex with WinGet? Please choose the one from OpenAI.
Expected behavior
The package should be installed properly.
Actual behavior
The model tries to install OpenAI Codex, but the function failed:
tool running...
winget-mcp.install-winget-package({"identifier":"OpenAI.Codex","source":"winget"})
tool success, duration: 139ms
winget-mcp.install-winget-package({"identifier":"OpenAI.Codex","source":"winget"})
{"message": "Did not find a package with the requested identifier", "identifier": "OpenAI.Codex",
"source": "winget", "packages": []}
Ask the model to install this package again without the source parameter (e.g., Could you retry installing without the "source" parameter?), and it'll success this time.
tool running...
winget-mcp.install-winget-package({"identifier":"OpenAI.Codex"})
tool success, duration: 4.65s
winget-mcp.install-winget-package({"identifier":"OpenAI.Codex"})
{"message": "Install completed successfully", "installedPackageInformation": {"identifier":
"OpenAI.Codex", "name": "Codex CLI", "source": "winget", "isInstalled": true, "installedVersion":
"0.31.0", "installedLocation": "C:\\Users\\SpecterShell\\AppData\\Local\\Microsoft\\WinGet\
\Packages\\OpenAI.Codex_Microsoft.Winget.Source_8wekyb3d8bbwe", "isUpdateAvailable": false}}
Environment
Windows Package Manager (Preview) v1.12.170-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.5074
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.27.170.0