Skip to main content

Expose PyAutoGUI through MCP.

Project description

PyAutoGUI-MCP exposes MCP tools dynamically from the PyAutoGUI API. It does not manually reimplement or wrap each function: it auto-registers the available API.

Install with pip

pip install pyautogui-mcp

Run the server:

pyautogui-mcp --transport stdio
pyautogui-mcp --transport http --host 127.0.0.1 --port 8000

MCP client config example:

{
  "mcpServers": {
    "pyautogui-mcp": {
      "command": "pyautogui-mcp",
      "args": ["--transport", "stdio"]
    }
  }
}

Run with uv

Dependencies are declared in pyproject.toml, so uv can resolve and run directly:

{
  "mcpServers": {
    "pyautogui-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/full/path/to/pyautogui-mcp",
        "run",
        "python",
        "-m",
        "pyautogui_mcp"
      ]
    }
  }
}

You can also launch manually:

uv run python -m pyautogui_mcp --transport stdio
uv run python -m pyautogui_mcp --transport http --host 127.0.0.1 --port 8000

Use in your own project

Import only what you need and run it under your own server lifecycle:

from pyautogui_mcp import mcp, register_pyautogui_api

register_pyautogui_api(prefix="pyautogui_")
mcp.run()  # or mcp.run(transport="http", host="127.0.0.1", port=8000)

Other exports:

from pyautogui_mcp import pyautogui_diagnose, pyautogui_tools

Desktop control notes

  • The server runs actions on the machine where it is launched (current desktop/display).
  • PyAutoGUI requires a real GUI session; headless environments will fail.
  • Safety: moving the mouse to a corner triggers the PyAutoGUI failsafe.
  • Optional pause between actions via PYAUTOGUI_PAUSE=0.1.

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-2026.1.101330.tar.gz (7.2 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-2026.1.101330-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pyautogui_mcp-2026.1.101330.tar.gz.

File metadata

  • Download URL: pyautogui_mcp-2026.1.101330.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.14

File hashes

Hashes for pyautogui_mcp-2026.1.101330.tar.gz
Algorithm Hash digest
SHA256 00dc012247651a40a5e1bb95d39c6e939365d5bdee0d1977174ca882151fbe3e
MD5 bd9838e0e9996577a795d1bc6099b454
BLAKE2b-256 24f3d78fa4e2ba78d399100743c8e8704458de6277ca7629f0a74818a6f9212f

See more details on using hashes here.

File details

Details for the file pyautogui_mcp-2026.1.101330-py3-none-any.whl.

File metadata

File hashes

Hashes for pyautogui_mcp-2026.1.101330-py3-none-any.whl
Algorithm Hash digest
SHA256 691856a705276abe427d01cec7488e299152abe98b1e554b250d624b953ec5bf
MD5 6edc0f9f7debb0d08d056a8a5ac10abc
BLAKE2b-256 18861b88e847f58344fe025d14b76238c0a17b40e45f286a55c5f81e5c4f3d89

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