PyMCPAutoGUI 🖱️⌨️🖼️ - MCP による GUI 自動化
AIエージェントの能力を強化! ✨ PyMCPAutoGUIは、AIエージェント(Cursorやその他のMCP互換環境のエージェントなど)とコンピューターのグラフィカルユーザーインターフェース(GUI)間の橋渡しを提供します。これにより、エージェントは人間のユーザーと同じように、画面👁️を表示し、マウス🖱️とキーボード⌨️を操作し、ウィンドウ🪟と対話できるようになります。
面倒なGUI手動タスクはもう終わりにして、AIに重労働を任せましょう💪。反復的なアクションの自動化、GUIのテスト、強力なAIアシスタントの構築に最適です🤖。
🤔 PyMCPAutoGUI を選ぶ理由は何ですか?
🤖 エージェントを強化: AI エージェントにデスクトップ アプリケーションと直接対話する権限を与えます。
**✅ シンプルな統合:**カーソルエディターなどのMCP対応クライアントとシームレスに連携します。プラグアンドプレイですぐに使えます!
**🚀 使い方は簡単:**シンプルなサーバーコマンドですぐに始められます。本当に、こんなに簡単です。
**🖱️⌨️ 包括的なコントロール:**実績のあるPyAutoGUIとPyGetWindowからの幅広い GUI 自動化機能を提供します。
**🖼️ 画面認識:**スクリーンショットを撮ったり、画面上の画像を見つけたりするためのツールが含まれています。エージェントに見せましょう!
**🪟 ウィンドウ管理:**ウィンドウの位置、サイズ、状態(最小化、最大化)などを制御します。デスクトップを整理整頓しましょう!
**💬 ユーザーインタラクション:**ユーザーとコミュニケーションをとるために、アラート、確認、プロンプトボックスを表示します。
🛠️ サポートされている環境
オペレーティング システム: Windows、macOS、Linux (各 OS で
pyautogui
に適切な依存関係が必要です)Python: 3.11+ 🐍
**MCP クライアント:**カーソル エディター、モデル コンテキスト プロトコル (MCP)をサポートする任意のクライアント
🚀 はじめに - とても簡単です!
1. インストール(推奨:仮想環境を使用!)
仮想環境を使用すると、プロジェクトの依存関係が整理されます。
(注:
2. MCPサーバーの実行
インストールが完了したら、ターミナルからサーバーを実行するだけです。
サーバーが起動し、接続を待機します(デフォルトはポート6789)。次の出力を確認してください。
GUI 自動化の魔法が必要な間は、このターミナルを実行したままにしておいてください! ✨
✨ カーソルエディターとのシームレスな統合
コーディング ワークフロー内で直接 GUI を自動化するには、PyMCPAutoGUI をカーソル (@ シンボル) に接続します。
**MCP 構成を開く:**カーソルで、コマンド パレット (
Ctrl+Shift+P
またはCmd+Shift+P
) を使用して、「MCP: mcp.json 構成ファイルを開く」を見つけます。**PyMCPAutoGUI 設定を追加:**この設定を
mcp.json
に追加またはマージします。必要に応じてパスを調整してください(特に Cursor がプロジェクトルートから実行されていない場合)。{ "mcpServers": { // ... other MCP server configs if any ... "PyMCPAutoGUI": { // Sets the working directory. ${workspaceFolder} is usually correct. "cwd": "${workspaceFolder}", // Command to run Python. 'python' works if the venv is active in the terminal // where Cursor was launched, or specify the full path. "command": "python", // Or ".venv/Scripts/python.exe" (Win) or ".venv/bin/python" (Mac/Linux) // Arguments to start the server module. "args": ["-m", "pymcpautogui.server"] } // ... other MCP server configs if any ... } }(ヒント:
mcp.json
。カーソルがサーバーを検出します。**自動化!**カーソルチャットで
@PyMCPAutoGUI
を使用します。例:
@PyMCPAutoGUI move_to(x=100, y=200)``@PyMCPAutoGUI write(text='Automating with AI! 🎉', interval=0.1)``@PyMCPAutoGUI screenshot(filename='current_screen.png')``@PyMCPAutoGUI activate_window(title='Notepad')
🧰 利用可能なツール
PyMCPAutoGUI はpyautogui
とpygetwindow
のほとんどの関数を公開します。例としては以下が挙げられます。
マウス 🖱️:
move_to
、click
、move_rel
、drag_to
、drag_rel
、scroll
、mouse_down
、mouse_up
、get_position
キーボード⌨️:
write
、press
、key_down
、key_up
、hotkey
スクリーンショット 🖼️:
screenshot
、locate_on_screen
、locate_center_on_screen
ウィンドウ 🪟:
get_all_titles
、get_windows_with_title
、get_active_window
、activate_window
、minimize_window
、maximize_window
、restore_window
、move_window
、resize_window
、close_window
ダイアログ💬:
alert
、confirm
、prompt
、password
設定⚙️:
set_pause
、set_failsafe
完全なリストと詳細については、 pymcpautogui/server.py
ファイルを確認するか、MCP クライアントで@PyMCPAutoGUI list_tools
を使用してください。
📄 ライセンス
このプロジェクトはMITライセンスに基づいています。詳細はLICENSEファイルをご覧ください。自動化を楽しみましょう!😄
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
AI エージェントと GUI 自動化機能を橋渡しする MCP サーバー。これにより、AI エージェントがマウス、キーボード、ウィンドウを制御し、スクリーンショットを撮ってデスクトップ アプリケーションと対話できるようになります。
Related MCP Servers
- -securityAlicense-qualityProvides automated GUI testing and control capabilities through an MCP server that enables mouse movements, keyboard input, screen captures, and image recognition across Windows, macOS, and Linux.Last updated -27MIT License
- -securityAlicense-qualityMCP server that provides computer control capabilities including mouse movements, keyboard actions, screenshot capture with OCR, and window management through a unified API.Last updated -48MIT License
- AsecurityAlicenseAqualityA powerful MCP server that provides interactive user feedback and command execution capabilities for AI-assisted development, featuring a graphical interface with text and image support.Last updated -139MIT License
- -securityAlicense-qualityAn MCP server that provides AI with real-time screen monitoring capabilities and UI element intelligence, allowing AI to observe, analyze, and interact with screen content through features like smart clicking and text extraction.Last updated -57MIT License