PyMCPAutoGUI
PyMCPAutoGUI 🖱️⌨️🖼️ - MCP による GUI 自動化
AIエージェントの能力を強化! ✨ PyMCPAutoGUIは、AIエージェント(Cursorやその他のMCP互換環境のエージェントなど)とコンピューターのグラフィカルユーザーインターフェース(GUI)間の橋渡しを提供します。これにより、エージェントは人間のユーザーと同じように、画面👁️を表示し、マウス🖱️とキーボード⌨️を操作し、ウィンドウ🪟と対話できるようになります。
面倒なGUI手動タスクはもう終わりにして、AIに重労働を任せましょう💪。反復的なアクションの自動化、GUIのテスト、強力なAIアシスタントの構築に最適です🤖。
🤔 PyMCPAutoGUI を選ぶ理由は何ですか?
🤖 エージェントを強化: AI エージェントにデスクトップ アプリケーションと直接対話する権限を与えます。
**✅ シンプルな統合:**カーソルエディターなどのMCP対応クライアントとシームレスに連携します。プラグアンドプレイですぐに使えます!
**🚀 使い方は簡単:**シンプルなサーバーコマンドですぐに始められます。本当に、こんなに簡単です。
**🖱️⌨️ 包括的なコントロール:**実績のあるPyAutoGUIとPyGetWindowからの幅広い GUI 自動化機能を提供します。
**🖼️ 画面認識:**スクリーンショットを撮ったり、画面上の画像を見つけたりするためのツールが含まれています。エージェントに見せましょう!
**🪟 ウィンドウ管理:**ウィンドウの位置、サイズ、状態(最小化、最大化)などを制御します。デスクトップを整理整頓しましょう!
**💬 ユーザーインタラクション:**ユーザーとコミュニケーションをとるために、アラート、確認、プロンプトボックスを表示します。
Related MCP server: windows-computer-use-mcp
🛠️ サポートされている環境
オペレーティング システム: Windows、macOS、Linux (各 OS で
pyautoguiに適切な依存関係が必要です)Python: 3.11+ 🐍
**MCP クライアント:**カーソル エディター、モデル コンテキスト プロトコル (MCP)をサポートする任意のクライアント
🚀 はじめに - とても簡単です!
1. インストール(推奨:仮想環境を使用!)
仮想環境を使用すると、プロジェクトの依存関係が整理されます。
# Create and activate a virtual environment (example using venv)
python -m venv .venv
# Windows PowerShell
.venv\Scripts\Activate.ps1
# macOS / Linux bash
source .venv/bin/activate
# Install using pip (from PyPI or local source)
# Make sure your virtual environment is active!
pip install pymcpautogui # Or pip install . if installing from local source(注: pyautoguiは、スクリーンショット用の Linux のscrotのようなシステム依存関係がある可能性があります。OS 固有のインストール要件については、 pyautoguiドキュメントを確認してください。)
2. MCPサーバーの実行
インストールが完了したら、ターミナルからサーバーを実行するだけです。
# Make sure your virtual environment is activated!
python -m pymcpautogui.serverサーバーが起動し、接続を待機します(デフォルトはポート6789)。次の出力を確認してください。
INFO: Started server process [XXXXX]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:6789 (Press CTRL+C to quit)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がすでに存在する場合は、mcpServersオブジェクト内に"PyMCPAutoGUI": { ... }部分を追加するだけです。)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
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 Servers
- Alicense-qualityCmaintenanceGUI automation MCP server that enables AI agents to see and control the Windows desktop using a local Vision LLM (Ollama), supporting screenshot analysis, mouse/keyboard actions, and autonomous task execution.4MIT
- Alicense-qualityCmaintenanceAn MCP server that gives AI agents human-like control over Windows via visual perception and simulated mouse and keyboard input, enabling automation of any application without APIs.592MIT
- Alicense-qualityAmaintenanceAn MCP server that translates human GUI actions into machine-executable commands, enabling AI agents to control real software applications like Zoom, Excel, and WeChat via natural language or API calls.1MIT
- Alicense-qualityCmaintenanceA local, dependency-free MCP server that gives AI agents controlled access to the active Windows desktop, enabling automated interaction with applications through screenshots, clicks, typing, and window management.79MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for AI dialogue using various LLM models via AceDataCloud
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/kitfactory/PyMCPAutoGUI'
If you have feedback or need assistance with the MCP directory API, please join our Discord server