macos-computer-use
🍏 macOS Computer Use (MCP Server)
超高速でネイティブな Model Context Protocol (MCP) サーバー。macOS上でLLMや自律エージェントに完全な画面表示の確認とデスクトップ自動化機能を提供します。物理的なマウスやキーボードのフォーカスを奪うことはありません。
AppleネイティブのCoreGraphics、Vision OCR(VNRecognizeTextRequest)、およびプロセスレベルの直接イベントルーティング(CGEvent.postToPid)を活用した、コンパイル済みSwiftコアを基盤としています。
⚡ 主な特長
🎯 サブ30ミリ秒のApple Vision OCR(
find_text/click_text): 盲目的な $(x, y)$ 座標推測は不要。エージェントはApple Neural Engineのアクセラレーションにより、ボタン、ラベル、テキストプレースホルダーを名前でピクセル精度で見つけます。🛡️ 非干渉のバックグラウンド実行: グローバルなmacOSハードウェアイベントタップから分離されています。クリック、スクロール、キー入力を特定のアプリケーションPIDに直接ターゲット設定できるため、IDEやブラウザで作業を続けながら操作できます。
👁️ 仮想カーソルオーバーレイ(
mark_cursor): エージェントのターゲット座標がスクリーンショットフレーム上に視覚的に描画されます(シアンのターゲットリング + マゼンタのパルスドット)。画面上の物理マウスは動かしません。⚡ リアクティブなUI同期(
wait_for_text): 盲目のsleep()タイムアウトを、動的なオートコンプリートドロップダウン、モーダル、状態変化が出現した瞬間に解決する高速OCRポーリングループに置き換えます。🖼️ ウィンドウ分離スクリーンキャプチャ: ターゲットアプリケーションのバッファをバックグラウンドでクリーンにキャプチャします(
screencapture -l <wid> -o -x)。ウィンドウを前面に表示したり、重なったウィンドウをキャプチャしたりしません。
🛠️ 公開ツール
ツール | 説明 | 主要パラメータ |
| Apple Vision OCRを使用して任意のボタン、ラベル、UIテキストを見つけ、その正確な中心をスムーズにクリックします。 |
|
| 画面上またはウィンドウ固有のテキストを検査し、正確なバウンディングボックスと論理座標を返します。 |
|
| 期待したテキストが表示されるまで(オートコンプリートドロップダウン、トースト、シート)、対象ウィンドウ/画面をリアクティブにポーリングします。 |
|
| オプションの仮想カーソルレンダリングを備え、ディスプレイ全体または特定のバックグラウンドアプリケーションウィンドウをキャプチャします。 |
|
| 開いているアプリケーションウィンドウ、プロセスID( |
|
| 論理 |
|
| マウスカーソルを |
|
| マウスを |
|
| アクティブな入力フィールドにプレーンテキストを注入します(または、対象プロセスのキューに直接)。 |
|
| 修飾キーを伴う特殊キーまたはキーボードショートカットを押します。 |
|
| マウスホイールを垂直および水平にスクロールします。 |
|
| macOSアプリケーションを起動するか、前面に表示します。 |
|
| 現在アクティブな最前面アプリケーション名とウィンドウタイトルを返します。 | None |
| macOSのアクセシビリティとUI階層の詳細な検査を行うカスタムAppleScriptを実行します。 |
|
🚀 インストールとセットアップ
1. 前提条件
macOS 13.0+(Apple SiliconまたはIntel)
Node.js 18+
Xcode Command Line Tools(ネイティブSwiftバイナリをコンパイルするため):
xcode-select --install
2. クローンとビルド
git clone https://github.com/johnexzy/macos-computer-use.git
cd macos-computer-use
npm install(postinstall スクリプトは、native_helper.swift を最適化されたネイティブバイナリに自動的にコンパイルします)。
🔒 必要なmacOS権限
デスクトップキャプチャと入力シミュレーションを許可するには、システム設定 > プライバシーとセキュリティ でホストアプリケーション(Terminal、iTerm2、Antigravity、Cursor、VS Code)に権限を付与してください:
画面収録とシステムオーディオ収録:
screenshotとビジュアルOCRに必要です。アクセシビリティ:
mouse_click、type_text、press_keyに必要です。
🔌 MCP設定
このサーバーをMCPクライアント設定に追加してください:
Antigravity / Claude Desktop / Cursor / Windsurf
mcp_config.json / claude_desktop_config.json に追加してください:
{
"mcpServers": {
"macos-computer-use": {
"command": "node",
"args": ["/absolute/path/to/macos-computer-use/server.mjs"]
}
}
}🧪 ネイティブSwiftヘルパーを直接テストする
ターミナルからネイティブバイナリを直接テストできます:
# Display resolution and scaling
./native_helper size
# List active Chrome windows in Z-order
./native_helper list_windows "Google Chrome"
# Find a button or text on screen with Apple Vision OCR in ~30ms
./native_helper find_text "Search" "Google Chrome"
# Reactively wait for dynamic text to appear
./native_helper wait_for_text "quantum" "Google Chrome" nil 5.0📄 ライセンス
MIT © John Oba
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/johnexzy/macos-computer-use'
If you have feedback or need assistance with the MCP directory API, please join our Discord server