anthropics / anthropics/claude-code

[BUG] desktop-commander plugin fails to start on Windows — npm error Invalid Version: (empty version spec)

未关闭
#93,134 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:mcp area:plugins bug platform:windows
主要语言
Python
星标
145k
派生
23.1k
PR 合并指标
PR 指标待抓取

描述

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

Filed against: Claude plugin distribution / desktop-commander plugin manifest
(not the upstream @wonderwhy-er/desktop-commander package, which runs correctly
standalone — see "Evidence" below).

Summary

The desktop-commander plugin's MCP server never starts. npm exits during launch
with Invalid Version: and an empty version value, before the server process runs.
The client then reports CONNECTION_CLOSED. Reproduces on every session start and
survives a plugin reinstall.

Environment


  |  
-- | --
OS | Windows 11 Pro 10.0.26200
Node | v24.19.0
npm | v11.17.0
Package | @wonderwhy-er/desktop-commander
Client | Claude desktop app, packaged (MSIX) install, Cowork mode
Global install | present and functional at %APPDATA%\npm\desktop-commander.cmd

Observed error

From the client's MCP log (mcp-logs-plugin-desktop-commander-desktop-commander/*.jsonl):

{"debug":"Starting connection with timeout of 30000ms"}

{"error":"Server stderr: npm error Invalid Version: \nnpm error A complete log of this run can be found in: ...\\npm-cache\\_logs\\...-debug-0.log\n"}
{"debug":"Connection failed after 6526ms (CONNECTION_CLOSED): Connection closed"}
{"error":"Connection failed (CONNECTION_CLOSED): Connection closed"}

Note the empty value after Invalid Version: — npm received a package specifier
with no version (e.g. a trailing @ with nothing following it).

Identical failure captured in three separate sessions, ~6s each:


  • 2026-09-09T15-19-27

  • 2026-09-09T15-20-16

  • 2026-09-09T15-24-04

Reproduction


  1. Windows 11, Node 24.19.0, npm 11.17.0, packaged Claude desktop app.

  2. Install the desktop-commander plugin.

  3. Start a session.

  4. Server fails to connect; log shows the error above. No tools are exposed.

Evidence this is not a local environment problem


  • npx @wonderwhy-er/desktop-commander run manually works — it blocks on stdin
    awaiting JSON-RPC, which is correct stdio-server behavior.

  • Node and npm are on PATH and current.

  • The package is installed globally and its shims exist and run.

  • No proxy; registry reachable (other plugins' servers install and start fine from
    the same npm cache in the same session — e.g. @modelcontextprotocol/server-pdf
    logs exit 0).

  • Uninstalling and reinstalling the plugin does not change the result.

Suspected cause

The plugin manifest's server definition passes an empty or malformed version
specifier. The client invokes servers as:

npm exec --yes -- <package> <args>

so a spec like @wonderwhy-er/desktop-commander@ (trailing @, no version) would
produce exactly this npm error before the server is reached.

Suggested fix

Either pin an explicit version, or omit the @ entirely:

@wonderwhy-er/desktop-commander@latest

@wonderwhy-er/desktop-commander

Workaround attempted

Repointing the server at the working global install
(command: %APPDATA%\npm\desktop-commander.cmd, args: []) would bypass npm
version resolution, but the plugin's manifest file could not be located on disk —
it appears to live in a generated per-session directory, so a hand edit would not
persist in any case.

Impact

The plugin is entirely unusable on this configuration. Its skills load and are
offered to the model, but every tool they depend on is absent, so the skills
trigger and then cannot execute.

### What Should Happen?

I expect new 'desktop-commander' plugin for Windows distro, that will work.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

Windows 11, Node 24.19.0, npm 11.17.0, packaged Claude desktop app.
Install the desktop-commander plugin.
Start a session.
Server fails to connect; log shows the error above. No tools are exposed.

### Claude Model

Opus

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

Claude 1.49585.0.0

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

Windows Terminal

### Additional Information

_No response_

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by finding the desktop-commander plugin manifest or server definition used by the Claude desktop plugin distribution. Compare its package spec with the reported npm exec form and reproduce with the Windows/Node/npm versions from the issue. Done means the manifest no longer passes an empty version spec and the MCP server starts without CONNECTION_CLOSED.

由索引模型根据 Issue 内容生成。

评估

技术栈
node.js
领域
desktop, tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
62/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。