claude-linux-mcp
Linux Desktop — Claude Desktop拡張機能
Claude DesktopにLinux/X11の完全なデスクトップ制御機能(スクリーンショット、マウス、キーボード、ウィンドウ管理、クリップボード、アプリ起動)を提供する拡張機能です。
Windows-MCPのLinux版としての役割を果たします。claude-terminal-mcpと組み合わせて使用するように構築されており、ターミナルがシェルを、本拡張機能がGUIを操作します。
⚠️ セキュリティ — 最初に必ずお読みください
この拡張機能をインストールすると、Claudeにデスクトップの完全な制御権が与えられます。 キーボードとマウスでできることはすべて、Claudeがこのツールを通じて実行可能です:
マウスをどこへでも移動させ、あらゆる場所をクリックする(ダイアログ、「はい」ボタン、開いているチャットウィンドウの送信ボタンなど)
現在フォーカスされているウィンドウに文字を入力する(パスワードフィールドを含む)
クリップボードの読み書きを行う(最近コピーしたものはすべて閲覧可能)
アプリケーションを起動する
ウィンドウを閉じる(未保存の作業を含む)
このインストールは、誰かがあなたのデスクに座り、キーボードとマウスを物理的に操作できるようにすることと同等です。Claudeに触れられたくない機密データがあるマシン、共有システム、またはチャットを放置する可能性がある場合にはインストールしないでください。
claude-terminal-mcpで使用されているような拒否リスト形式の保護は、ここではあまり適用されません。マウスのクリックは単なるクリックであり、意図をパターンマッチングすることはできないためです。v0.1における安全策は以下の通りです:(1) このREADMEでの正直な説明、(2) システム状態を変更するすべてのツールに対する destructiveHint: true アノテーション(Claude自身の推論レイヤーが認識できるようにするため)、(3) インストールフローで明示的な「拡張機能開発者モード」(赤い「未検証」の警告)が必要であること。
Related MCP server: desktop-mcp
機能
14種類のツール:
ツール | 目的 |
| フルスクリーン( |
| 表示されているウィンドウをID/PID/ジオメトリ/タイトルで列挙します。 |
| ウィンドウを最前面に表示します。 |
| ウィンドウの移動/リサイズを行います。 |
| ウィンドウを正常に閉じるよう要求します。 |
| ポインタを絶対画面座標に移動します。 |
| 左/中央/右クリック。座標はオプション。 |
| ドラッグ操作。 |
| Nクリック分、上下左右にスクロールします。 |
| フォーカスされたウィンドウに文字列を入力します。 |
|
|
| CLIPBOARD選択範囲をテキストとして読み取ります。 |
| 文字列をCLIPBOARDに書き込みます。 |
| アプリケーションをデタッチ状態で起動します(例: |
すべて、よく知られた小さなX11 CLIツールを呼び出す仕組みであり、npmの依存関係はありません。
要件
ディスプレイサーバー: X11。Waylandはv0.1ではサポートされていません。Waylandのセキュリティモデルはプロセス間入力インジェクションを意図的にブロックするためです。現在のセッションを確認するには:
echo $XDG_SESSION_TYPEwaylandと表示された場合は、ログアウトしてログイン画面で「Ubuntu on Xorg」(またはお使いのディストリビューションの同等のもの)を選択してください。
システムツール(初回のみインストール):
sudo apt install xdotool wmctrl xclipgnome-screenshotはUbuntu GNOMEに同梱されています。別のデスクトップ環境を使用している場合は、スクリーンショットツールをインストールしてください:
# One of:
sudo apt install gnome-screenshot # GNOME, works everywhere
sudo apt install scrot # Minimal CLI
sudo apt install maim # Modern replacement for scrotOCR(オプション、screenshot_text用 — v0.2で追加):
sudo apt install tesseract-ocr tesseract-ocr-eng
# Add tesseract-ocr-<lang> for other languages (fra, deu, nld, …).tesseractがインストールされていない場合、screenshot_textのみが使用不可となり、他の14個のツールは通常通り動作します。
Claude Desktop: Linux版 ≥ 0.10.0(最新のNodeがバンドルされているため、システム側のNodeは不要です)。
インストール
最新リリースから
LinuxDesktop.mcpbをダウンロードします。Claude Desktop → Settings → Extensions → Extension Developer セクション → Install Extension →
.mcpbファイルを選択します。赤い「developer info not verified by Anthropic」という警告を確認します。ソースを信頼できる場合は Install をクリックします。
All extensions に戻り、Linux Desktop がオンになっていることを確認します。
チャット内でコネクタ/ツールピッカーを開き、その会話に対して Linux Desktop を有効にします。
最初のツール呼び出し時に、サーバーが不足しているX11ユーティリティを検出し、「sudo apt install … でインストールしてください」という明確なエラーを返します。何が不足しているかを知るためにREADMEをすべて読む必要はありません。
使用例
Claudeに以下のように尋ねてみてください:
「スクリーンショットを撮って、画面に何が映っているか教えて。」
「開いているウィンドウをリストアップして。」
「Firefoxウィンドウにフォーカスして。」
「gnome-terminalを開いて、その中で
nvtopと入力して。」「'hello world' をクリップボードにコピーして。」
「Claude Desktopウィンドウを画面の左上隅にドラッグして、800×600にリサイズして。」
「アクティブなウィンドウで3回下にスクロールして。」
既知の制限事項 (v0.1)
X11のみ。 Waylandは全く異なるアプローチ(
ydotool+ 特権デーモン、スクリーンショット用のポータルAPI)が必要です。Waylandサポートの追加はロードマップにありますが、簡単ではありません。AT-SPI UIインスペクションなし。 v0.1は座標とウィンドウタイトルで動作します。セマンティックな(「送信ボタンをクリック」のような)ターゲット指定にはAT-SPIインスペクションが必要ですが、これはElectron/Chromiumアプリでは複雑であり、v0.2で重点的に取り組む予定です。
OCRなし。 スクリーンショットはPNGであり、Claudeは視覚機能で読み取ります。ほとんどのユースケースではうまく機能しますが、「画面上の『キャンセル』という単語を見つけてクリックする」といった組み込みのプリミティブはありません。
「Tool result could not be submitted」という黄色いバナー。 装飾的なもので、動的ツール読み込みステップで発生します。標準のFilesystem拡張機能にも影響します。この拡張機能のバグではありません。
プライバシーポリシー
データはマシンから外部へ送信されません。 この拡張機能は完全にローカルで実行されます:
データ収集: なし。拡張機能は外部への通信、テレメトリの送信、独自のネットワークリクエストの実行を行いません。
データの使用と保存: スクリーンショットは
/tmp/claude-linux-mcp/shots/に保存され、Claudeが同じ会話内で後から参照できるようにします。それ以外は拡張機能自体によって永続化されることはありません。クリップボード:
clipboard_get()は現在X11のCLIPBOARD選択範囲にあるものを読み取り、ツール結果としてClaude Desktopに渡します。これはチャットへの貼り付けと同じように扱ってください。機密データがクリップボードにある場合は、実行しないでください。第三者への共有: なし。この拡張機能によってAnthropic、拡張機能の作成者、または第三者にデータが送信されることはありません。(Claude Desktop自体は、通常のチャットフローの一部としてツール入力/出力をAnthropicに送信しますが、これはAnthropicとユーザー間の関係であり、本拡張機能とは無関係です。)
保持:
/tmp/claude-linux-mcp/は再起動のたびにクリアされます。手動でクリアするにはrm -rf /tmp/claude-linux-mcpを実行してください。権限スコープ: すべてのツールはユーザー自身の権限で実行されます。ターミナルで入力したりマウスで行ったりする操作と同じです。
連絡先 / 質問: https://github.com/LukeLamb/claude-linux-mcp/issues でIssueを作成してください。
ライセンス
MIT。自由に使用してください。帰属表示を歓迎しますが、保証はありません。
Available Tools
15 toolsclipboard_getARead-only
Read the current X11 CLIPBOARD selection as text.
Inputs: no named parameters.
clipboard_setADestructive
Write a string to the X11 CLIPBOARD selection.
Inputs: text (required).
close_windowADestructive
Request a window matching the given title pattern to close (gracefully, via the WM close hint).
Inputs: title_pattern (required).
focus_windowADestructive
Bring a window matching the given title pattern (substring, case-insensitive per wmctrl) to the foreground.
Inputs: title_pattern (required).
key_pressADestructive
Press a keyboard combination using xdotool's keysym notation. Examples: 'ctrl+c', 'alt+Tab', 'super', 'Return', 'Escape', 'Page_Down'.
Inputs: combo (required).
launch_appADestructive
Launch an application via a shell command (e.g. "firefox", "gnome-terminal", "code /path/to/project"). The process is detached from this server.
Inputs: command (required).
list_windowsARead-only
List all visible windows with id, pid, desktop, geometry (x/y/width/height), hostname, and title.
Inputs: no named parameters.
mouse_clickADestructive
Click a mouse button. If x and y are provided, the pointer moves there first; otherwise clicks at the current pointer location.
Inputs: button, x, y.
mouse_dragBDestructive
Drag from (x1, y1) to (x2, y2) while holding the given button (default left).
Inputs: x1 (required), y1 (required), x2 (required), y2 (required), +1 more.
mouse_moveADestructive
Move the mouse pointer to absolute screen coordinates (x, y).
Inputs: x (required), y (required).
mouse_scrollADestructive
Scroll in a direction (up/down/left/right) by N clicks (default 3).
Inputs: direction (required), amount.
move_windowADestructive
Move and/or resize a window matching the given title pattern. Any of x, y, width, height omitted leaves that dimension unchanged.
Inputs: title_pattern (required), x, y, width, +1 more.
screenshotARead-only
Capture a screenshot of the full screen (or the active window if active_window=true). Saves a PNG under /tmp/claude-linux-mcp/shots/ and returns the path.
Inputs: path, active_window.
screenshot_textARead-only
Take a screenshot and OCR it with tesseract. Returns the recognized text plus the path to the underlying PNG. Use when Claude needs to READ what is on screen (log windows, error dialogs, terminal output in non-focused windows) rather than just see the image. Requires tesseract-ocr installed.
Inputs: active_window, path, lang.
type_textADestructive
Type a string into the currently-focused window (emits keystrokes). Use key_press for special/modifier combos.
Inputs: text (required), delay.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool has a clearly distinct purpose covering clipboard operations, window management, keyboard input, mouse actions, app launching, and screenshot capture. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., clipboard_get, close_window, mouse_click). The naming scheme is predictable and easy to parse.
15 tools is perfectly scoped for a desktop automation MCP server. Each tool addresses a distinct action without unnecessary redundancy, covering the essential operations for window management, input, and clipboard.
The tool surface covers the full lifecycle of desktop automation: window discovery and manipulation, input simulation (keyboard, mouse, clipboard), app launching, and screenshot capture with optional OCR. No obvious gaps are present for typical use cases.
Maintenance
Related MCP Connectors
Lets Claude, ChatGPT and other AI chats work on your Linux computers: terminal, files and browser.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Related MCP Servers
- AlicenseAqualityCmaintenanceGive Claude Desktop terminal, filesystem, and background-job access on your local Linux machine. Zero-dependency MCP extension, MIT-licensed.85MIT
- AlicenseAqualityDmaintenanceEnables LLMs to capture desktop screenshots and control the mouse and keyboard on Linux, including Wayland, through MCP.111MIT
- AlicenseAqualityBmaintenanceEnables Claude Code and Codex to see and drive an X11 desktop through screenshots, mouse, keyboard, and accessibility-tree actions while keeping the user's own pointer and focus separate.18Apache 2.0
- AlicenseNot gradedqualityBmaintenanceGrants Claude Code desktop-control capabilities on Linux, including screenshots, mouse movement and clicks, keyboard input, window listing and focusing, and clipboard access.3MIT