anthropics / anthropics/claude-ai-mcp

"Control Chrome" MCP — add Linux support (chrome-native-host binary missing from Linux package)

オープン
#281 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
471
フォーク
76
PR マージ指標
30日以内にマージされた PR はありません

説明

### Problem

The "Control Chrome" MCP integration shows "macOS" as a requirement in Claude Desktop's extension marketplace and cannot be installed on Linux. However, **the code already supports Linux** — the issue is that the `chrome-native-host` binary is simply not included in the Linux `.deb` package.

### Technical Analysis

I extracted and analyzed the bundled `app.asar` from Claude Desktop for Linux (`/usr/lib/claude-desktop/node_modules/electron/dist/resources/app.asar`). The code already handles Linux:

```js
// from index.js (minified, variable names reconstructed)
const nativeHostBinary = process.platform === "win32" ? `${GdA}.exe` : GdA;
// GdA = "chrome-native-host"

if (app.isPackaged) {
if (process.platform === "darwin") {
// macOS: path.join(appDir, "Helpers", binary)
} else {
// Linux/Windows: path.join(process.resourcesPath, binary)
}
}
```

On Linux, `process.resourcesPath` resolves to:
```
/usr/lib/claude-desktop/node_modules/electron/dist/resources/
```

**The binary is not there.** Contents of that directory:
```
app.asar, app.asar.unpacked, cowork-plugin-shim.sh, locale JSONs,
smol-bin.x64.vhdx, TrayIcon PNGs — no chrome-native-host
```

The native messaging manifest (`com.anthropic.claude_browser_extension.json`) is also never written to `~/.config/google-chrome/NativeMessagingHosts/`.

### Why this is not a code issue

For comparison, **Claude Code's** Chrome MCP works perfectly on the same Linux machine:
- Native host: `/home/user/.claude/chrome/chrome-native-host` (shell script → `node claude-code --chrome-native-host`)
- Manifest: `~/.config/google-chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json`
- Chrome extension ID: `fcoeoabgfenejglbffodgkkbkcdhcgfn`

The underlying technology (Chrome Native Messaging + Chrome extension) is fully cross-platform. The Desktop code already handles the Linux path. The binary just needs to be compiled for Linux and included in the `.deb` package.

### Proposed Fix

1. Build `chrome-native-host` for `linux-amd64` (and ideally `linux-arm64`)
2. Include it in the `.deb` package under `resources/`
3. Write the native messaging manifest to `~/.config/google-chrome/NativeMessagingHosts/` (and `~/.config/chromium/` / `~/.config/BraveSoftware/Brave-Browser/`) on first run — the code already does this for macOS paths in `ySt()`

### Related

- #84 — same issue for Windows

### Environment

- Claude Desktop for Linux (`.deb`, Electron-based)
- Pop!_OS / Ubuntu (Linux 6.17.x, x86_64)
- Google Chrome, Brave, Chromium

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。