Skip to main content

MCP server package for running Python with pyautogui instrumentation.

Project description

MCP server for simplest GUI agent 🕹️🤖

pyautogui_mcp_server packages a Streamable HTTP MCP server for running Python code with pyautogui instrumentation.

It is designed for GUI automation workflows where plain pyautogui execution is not enough. The package adds MCP-friendly output handling, and richer screenshots.

✨ What this package adds

Compared with running raw pyautogui calls directly, this library adds extra effort in the following areas:

  • Shared Python globals across tool calls.
  • Captured stdout, stderr, and final expression results in one MCP response stream.
  • Inline screenshot delivery as MCP image content instead of requiring manual file handling.
  • Annotated mouse-operation previews that show the target point or path before the action runs.
  • Screenshot normalization so captured images line up better with logical screen coordinates.

🛠️ Tool response example

<stdout>
Cut the right rope by dragging left to right through it.
</stdout>
<pyautogui-mcp.dragTo x=860 y=430 duration=0.2 button='left' 
    time_offset="T+1.1s" pyautogui.size=(1440, 900)>
cut-the-rope-by-gui-agent
</pyautogui-mcp.dragTo>

📦 Installation

pip install pyautogui_mcp_server

For local development:

pip install -e .[dev]

🚀 Run the MCP server

Use the module entrypoint:

python -m pyautogui_mcp_server --host 127.0.0.1 --port 9300

Or use the installed console script:

pyautogui-mcp-server --port 9300

Show CLI help:

python -m pyautogui_mcp_server --help

The server exposes a run_python_with_pyautogui MCP tool that executes Python with instrumented pyautogui behavior.

📄 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyautogui_mcp_server-0.1.3.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyautogui_mcp_server-0.1.3-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file pyautogui_mcp_server-0.1.3.tar.gz.

File metadata

  • Download URL: pyautogui_mcp_server-0.1.3.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for pyautogui_mcp_server-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e7b11f2cea62d2dad9b4f8c097a3892cf05482cfb9523e9eaedaa8807c769f64
MD5 258bffd9cb9724b9280139f2998d4c13
BLAKE2b-256 01f18fb8bfad0b28a2782dee14904efd166a4ccf4d12d50264b34cd33a9add26

See more details on using hashes here.

File details

Details for the file pyautogui_mcp_server-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyautogui_mcp_server-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 20f162b69e1c562e09a7045e6aed0e94960b4892d4e39b386d42f00068a4fdc0
MD5 c0bea25073a534656726e1b0a8fd5569
BLAKE2b-256 6f8609a5f7414783d3cf2ebbf5ea82b31630189a3cb09797efbb4ead5236e3ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page