Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mcp-chocolatey) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MCP Chocolatey
Chocolatey on the Model Context Protocol โ searchable, installable, upgradable via tools.
๐ Quick start (Claude Desktop)
Add this entry to claude_desktop_config.json
(Windows path: C:\Users\<you>\AppData\Roaming\Claude\claude_desktop_config.json
).
{
"mcpServers": {
"chocolatey": {
"command": "npx",
"args": ["-y", "mcp-chocolatey"],
"env": {
"NPX_SILENT": "1",
"npm_config_loglevel": "silent"
}
}
}
}
Restart Claude Desktop. Then try:
- "List installed Chocolatey packages" (uses
choco_list
) - "Search for 7zip on Chocolatey" (uses
choco_search
) - "Check outdated Chocolatey packages" (uses
choco_outdated
)
๐ก Tip: If your environment chatters on
npx
, you can run Node directly:command: "node"
,args: ["C:\Users\<you>\AppData\Roaming\npm\node_modules\mcp-chocolatey\src\server.js"]
.
๐ HTTP bridge
- Start locally:
npm run start:http
(listens onhttp://127.0.0.1:11435/mcp
) - Required headers:
Accept: application/json, text/event-stream
andContent-Type: application/json
- Example request (PowerShell):
$uri = 'http://127.0.0.1:11435/mcp'
$headers = @{ Accept = 'application/json, text/event-stream' }
$body = '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Invoke-RestMethod -Uri $uri -Method Post -ContentType 'application/json' -Headers $headers -Body $body
If you expose via ngrok, be aware youโre exposing package management endpointsโuse only if you understand the risk.
โจ What you get
- โก Fully typed MCP tools backed by Chocolatey CLI
- ๐ง Zero configuration โ uses your existing
choco
install - ๐ฅ๏ธ Works in standard Windows terminals and Claude Desktop
๐ ๏ธ Tools implemented (key flags)
choco_list
โ list local packages (localOnly
,exact
,id
)choco_search
โ search remote (query
,exact
,prerelease
)choco_install
โ install (id
,version?
,prerelease?
,force?
,source?
,yes
,failOnStdErr?
,timeoutSec?
,extraArgs?[]
)choco_upgrade
โ upgrade (id | 'all'
,prerelease?
,force?
,source?
,yes
,failOnStdErr?
,timeoutSec?
,extraArgs?[]
)choco_uninstall
โ uninstall (id
,version?
,force?
,yes
,timeoutSec?
,extraArgs?[]
)choco_info
โ package info (id
,exact?
,verbose?
)choco_outdated
โ list outdated (ignorePinned?
,includePrerelease?
)choco_pin
โ add/remove/list pinschoco_feature
โ list/enable/disable featureschoco_source
โ list/add/remove/enable/disable/update sources (name
,source
,user
,password
supported where relevant)choco_config
โ list/get/set/unset config valueschoco_help
โ passthrough help
โ ๏ธ Admin vs non-admin
- Many installs/upgrades/uninstalls require elevation. When not elevated, operations may fail or be scoped perโuser. The server adds a warning prefix in nonโadmin sessions.
- Destructive operations require
yes=true
. If omitted or false, the server returns an error and does not execute.
โฑ๏ธ Timeouts and concurrency
- Default timeout: 15 minutes (env:
MCP_CHOCOLATEY_TIMEOUT_MS
) - Max concurrency: 1 (env:
MCP_CHOCOLATEY_MAX_CONCURRENCY
) - Override
CHOCO_BIN
ifchoco
isnโt on PATH.
๐ง Troubleshooting
"Unexpected token โฆ not valid JSON" in Claude logs
Any nonโJSON text on stdout can break MCP. This package avoids stdout noise; however, some environments make npx
chatty. Fix: add the env shown above (NPX_SILENT
, npm_config_loglevel
) or run node
directly to the server script.
choco
not found
Ensure Chocolatey is on PATH. Typical locations:
- System install:
C:\\ProgramData\\chocolatey\\bin
- Per-user install:
C:\\Users\\<you>\\AppData\\Local\\Programs\\Chocolatey\\bin
If itโs elsewhere, set CHOCO_BIN
env var to the full path to choco.exe
.
๐๏ธ Local development
# Start in stdio mode (stdout must be clean for MCP)
npm run start:stdio
๐ License
MIT