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:

  • Fresh Python execution state for every tool call.
  • 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 in a fresh interpreter state 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.2.tar.gz (15.1 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.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyautogui_mcp_server-0.1.2.tar.gz
  • Upload date:
  • Size: 15.1 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.2.tar.gz
Algorithm Hash digest
SHA256 6a3b1f22b57f0ad025ee08c22f16073317592db767455ebe2b968e4e3bfe6b8e
MD5 8226895247e9c50204d9be6609587fec
BLAKE2b-256 945f1690938e5166e8d05dd93bbf819095e0a7742f66316defec05f8cec3e496

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyautogui_mcp_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6fc7e0472597588b591ba3e33fff72f70de39d72e98e61f0b0c66e9912979b
MD5 1fdefc2f30a5842c521d2925dc429df2
BLAKE2b-256 ec100a4c1478f9fad312be120967d481d075643e62804c1037be76d1c33030ca

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