macOS GUI Control MCP MCP Server

$cd macOS-GUI-Control-MCP && npm install && npm install -g @anthropic-ai/mcpb && mcpb pack .
README.md

Enables comprehensive control over macOS GUI elements including mouse and keyboard

macOS GUI Control MCP - Full Power Edition

macOS のマウス、キーボード、画面キャプチャをフル制御できる MCP サーバー。 削除系コマンドのみブロック、それ以外は全機能使用可能

機能一覧

カテゴリ 機能 詳細
🖱️ マウス mouse_click 指定座標をクリック
mouse_double_click ダブルクリック
mouse_right_click 右クリック
mouse_move カーソル移動
mouse_drag ドラッグ操作
mouse_scroll スクロール (上下左右)
mouse_get_position 現在のカーソル位置取得
⌨️ キーボード keyboard_type テキスト入力
keyboard_press キー押下 (修飾キー対応)
keyboard_shortcut 共通ショートカット実行
📸 画面 screen_capture スクリーンショット (全画面/領域)
screen_get_size 画面サイズ取得
screen_get_color ピクセル色取得
🪟 ウィンドウ window_list 開いているウィンドウ一覧
window_focus アプリをアクティブ化
window_move ウィンドウ移動
window_resize ウィンドウリサイズ
🚀 フルパワー run_applescript AppleScript 実行
run_shell シェルコマンド実行

前提条件

1. cliclick インストール (必須)

brew install cliclick

# 確認
cliclick -V

2. macOS 権限設定

  1. システム設定 を開く
  2. プライバシーとセキュリティアクセシビリティ
  3. + ボタンで Claude を追加
  4. 同様に 画面収録 にも Claude を追加

3. Node.js 18+

node --version  # v18.0.0 以上

ビルド

cd macOS-GUI-Control-MCP

# 依存関係インストール
npm install

# MCPB CLI インストール
npm install -g @anthropic-ai/mcpb

# パッケージ化
mcpb pack .
# → macos-control-1.0.0.mcpb が生成される

インストール方法

方法 A: Claude Desktop にインストール (推奨)

A-1. ダブルクリック (最も簡単)
  1. macos-control-1.0.0.mcpb をダブルクリック
  2. Claude Desktop が開いてインストールダイアログ表示
  3. インストール をクリック
A-2. 設定画面から
  1. Claude Desktop → 設定デスクトップアプリ拡張機能
  2. 展開済み拡張機能をインストール をクリック
  3. .mcpb ファイルを選択

方法 B: Claude Code で直接使用

~/.claude.json に以下を追加:

{
  "mcpServers": {
    "macos-control": {
      "command": "node",
      "args": ["/path/to/macOS-GUI-Control-MCP/server/index.js"],
      "env": {
        "TIMEOUT": "30000",
        "LOG_OPERATIONS": "true"
      }
    }
  }
}

動作確認

新しいチャットで以下を試してみてください:

スクリーンショット撮って
マウスの現在位置教えて
Safari を開いて

使用例

マウス操作

「座標 500, 300 をクリックして」
「マウスを 100, 100 から 500, 500 にドラッグして」
「現在のカーソル位置を教えて」
「下に3回スクロールして」

キーボード操作

「Hello World とタイプして」
「Cmd+C を押して」
「コピーのショートカットを実行して」
「Enter キーを押して」

画面操作

「スクリーンショット撮って」
「画面サイズ教えて」
「座標 100, 100 のピクセル色を取得して」

ウィンドウ操作

「開いてるウィンドウ一覧見せて」
「Safari をアクティブにして」
「Terminal を座標 0, 0 に移動して」
「Finder のウィンドウを 800x600 にリサイズして」

フルパワー機能

「シェルで ls -la を実行して」
「AppleScript で Music アプリの現在の曲を取得して」
「シェルで pwd を実行して」

ブロックされるコマンド (削除のみ)

以下のパターンは安全のためブロックされます:

シェルコマンド

  • rm, rm -rf, rm -r
  • rmdir
  • unlink

AppleScript

  • delete file, delete folder, delete item
  • move ... to trash
  • empty trash

キーボードショートカット一覧

keyboard_shortcut で使用可能なショートカット:

ショートカット名 キー
copy Cmd+C
paste Cmd+V
cut Cmd+X
undo Cmd+Z
redo Cmd+Shift+Z
save Cmd+S
select_all Cmd+A
find Cmd+F
new Cmd+N
open Cmd+O
close Cmd+W
quit Cmd+Q
tab Cmd+T
refresh Cmd+R

環境変数

変数名 説明 デフォルト
TIMEOUT コマンドタイムアウト (ms) 30000
LOG_OPERATIONS 操作ログ出力 true

トラブルシューティング

cliclick が見つからない

brew install cliclick

アクセシビリティ権限エラー

  1. システム設定 → プライバシーとセキュリティ → アクセシビリティ
  2. Claude (またはターミナル) を追加
  3. アプリを再起動

画面収録権限エラー

  1. システム設定 → プライバシーとセキュリティ → 画面収録
  2. Claude (またはターミナル) を追加
  3. アプリを再起動

AppleScript エラー

一部の AppleScript 操作には追加の権限が必要な場合があります。 システム設定 → プライバシーとセキュリティ → オートメーション で許可を確認してください。

ライセンス

MIT

Tools (19)

mouse_clickClick at specified coordinates
mouse_double_clickPerform a double click
mouse_right_clickPerform a right click
mouse_moveMove the cursor to coordinates
mouse_dragDrag from one point to another
mouse_scrollScroll up, down, left, or right
mouse_get_positionGet current cursor position
keyboard_typeType text input
keyboard_pressPress a key with modifier support
keyboard_shortcutExecute common shortcuts like copy, paste, or save
screen_captureTake a screenshot of the full screen or a specific area
screen_get_sizeGet screen dimensions
screen_get_colorGet pixel color at coordinates
window_listList all open windows
window_focusActivate a specific application
window_moveMove a window to new coordinates
window_resizeResize a window
run_applescriptExecute AppleScript code
run_shellExecute shell commands

Environment Variables

TIMEOUTCommand timeout in milliseconds
LOG_OPERATIONSEnable operation logging

Configuration

claude_desktop_config.json
{"mcpServers":{"macos-control":{"command":"node","args":["/path/to/macOS-GUI-Control-MCP/server/index.js"],"env":{"TIMEOUT":"30000","LOG_OPERATIONS":"true"}}}}

Try it

Take a screenshot of my current screen.
Open Safari and move the window to the top left corner.
Type 'Hello World' into the active text field.
Run an AppleScript to get the current song playing in the Music app.
List all currently open windows on my Mac.

Frequently Asked Questions

What are the key features of macOS GUI Control MCP?

Full mouse control including clicks, drags, and scrolling via cliclick.. Keyboard automation with support for text typing and system shortcuts.. Window management for listing, focusing, moving, and resizing apps.. Safety filter that blocks destructive shell and AppleScript commands like 'rm' or 'empty trash'.. Screen interaction tools for capturing images and detecting pixel colors..

What can I use macOS GUI Control MCP for?

Automating repetitive UI tasks in macOS applications.. Creating visual walkthroughs or documentation by capturing screenshots automatically.. Controlling media players or system settings via AppleScript integration.. Testing macOS application layouts by resizing and moving windows.. Executing shell-based workflows directly through a chat interface..

How do I install macOS GUI Control MCP?

Install macOS GUI Control MCP by running: cd macOS-GUI-Control-MCP && npm install && npm install -g @anthropic-ai/mcpb && mcpb pack .

What MCP clients work with macOS GUI Control MCP?

macOS GUI Control MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use macOS GUI Control MCP with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free