Skip to main content
Glama
kitfactory

PyMCPAutoGUI

by kitfactory

PyMCPAutoGUI 🖱️⌨️🖼️ - MCP による GUI 自動化

ライセンス: MIT

AIエージェントの能力を強化! ✨ PyMCPAutoGUIは、AIエージェント(Cursorやその他のMCP互換環境のエージェントなど)とコンピューターのグラフィカルユーザーインターフェース(GUI)間の橋渡しを提供します。これにより、エージェントは人間のユーザーと同じように、画面👁️を表示し、マウス🖱️とキーボード⌨️を操作し、ウィンドウ🪟と対話できるようになります。

面倒なGUI手動タスクはもう終わりにして、AIに重労働を任せましょう💪。反復的なアクションの自動化、GUIのテスト、強力なAIアシスタントの構築に最適です🤖。

🤔 PyMCPAutoGUI を選ぶ理由は何ですか?

  • 🤖 エージェントを強化: AI エージェントにデスクトップ アプリケーションと直接対話する権限を与えます。

  • **✅ シンプルな統合:**カーソルエディターなどのMCP対応クライアントとシームレスに連携します。プラグアンドプレイですぐに使えます!

  • **🚀 使い方は簡単:**シンプルなサーバーコマンドですぐに始められます。本当に、こんなに簡単です。

  • **🖱️⌨️ 包括的なコントロール:**実績のあるPyAutoGUIPyGetWindowからの幅広い 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 をカーソル (@ シンボル) に接続します。

  1. **MCP 構成を開く:**カーソルで、コマンド パレット ( Ctrl+Shift+PまたはCmd+Shift+P ) を使用して、「MCP: mcp.json 構成ファイルを開く」を見つけます。

  2. **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": { ... }部分を追加するだけです。)

  3. mcp.jsonを保存します。カーソルがサーバーを検出します。

  4. **自動化!**カーソルチャットで@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 はpyautoguipygetwindowのほとんどの関数を公開します。例としては以下が挙げられます。

  • マウス 🖱️: move_toclickmove_reldrag_todrag_relscrollmouse_downmouse_upget_position

  • キーボード⌨️: writepresskey_downkey_uphotkey

  • スクリーンショット 🖼️: screenshotlocate_on_screenlocate_center_on_screen

  • ウィンドウ 🪟: get_all_titlesget_windows_with_titleget_active_windowactivate_windowminimize_windowmaximize_windowrestore_windowmove_windowresize_windowclose_window

  • ダイアログ💬: alertconfirmpromptpassword

  • 設定⚙️: set_pauseset_failsafe

完全なリストと詳細については、 pymcpautogui/server.pyファイルを確認するか、MCP クライアントで@PyMCPAutoGUI list_toolsを使用してください。

📄 ライセンス

このプロジェクトはMITライセンスに基づいています。詳細はLICENSEファイルをご覧ください。自動化を楽しみましょう!😄

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    -
    quality
    C
    maintenance
    GUI 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.
    4
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    An 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.
    59
    2
    MIT
  • A
    license
    -
    quality
    A
    maintenance
    An 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.
    1
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    A 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.
    79
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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