安装命令会自动执行未固定版本的 npm 包
原文依据:3 处配置使用 `npx -y chrome-devtools-mcp@latest`:`latest` 会随发布变化,`-y` 又跳过安装确认。因此启动 MCP 时可能下载并执行一个用户未审查、且与上次不同的包版本。
若包的新版本、发布账户或依赖被破坏,代码可在启动 MCP 的本机权限范围内运行,影响工作区文件、环境变量或其他本机数据。这里没有证据表明此类破坏已经发生。
MCP 配置让 `npx` 使用 `-y` 运行带 `@latest` 标签的包。文档明确说 `-y` 跳过安装确认,所以首次运行或缓存变化时可能自动取得并执行用户未逐次确认、版本会变化的代码。`--isolated`仅隔离 Chrome 配置,不固定或验证 npm 包。
"chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest", "--isolated"] }查看另外 2 个位置
`-y` skips the npx install confirmation. By default the server launches Chrome with its own dedicated profile (under `~/.cache/chrome-devtools-mcp/`), separate from your personal browser; `--isolated` goes one step further and uses a temporary profile that is wiped when the browser closes. This is the right setup for most testing.Add the following to your project's `.mcp.json` or Claude Code settings: