Skip to content
Conduit

mcp server

pyautogui-mcp

MCP server exposing PyAutoGUI for desktop automation with dynamic tool registry and stdio/http transports.

chigwell/pyautogui-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "pyautogui-mcp": {
      "command": "uvx",
      "args": [
        "pyautogui-mcp"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 21, 2026

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.

Tool examples

Tool names are exposed with the default pyautogui_ prefix (configurable with --prefix).

ToolInputs (common)Output
pyautogui_screenshotimageFilename (optional), region (optional [left, top, width, height])MCP image content (PNG bytes)
pyautogui_screenshot_encodedformat (png/jpeg), quality (1-95, JPEG only), regionMCP image content (PNG/JPEG bytes)
pyautogui_positionnonecursor coordinates { "x": int, "y": int }
pyautogui_clickx, y, clicks, button, interval, durationnull (mouse click performed)
pyautogui_doubleClickx, y, button, interval, durationnull (double-click performed)
pyautogui_rightClickx, y, interval, durationnull (right-click performed)
pyautogui_moveTox, y, durationnull (mouse moved)
pyautogui_moveRelxOffset, yOffset, durationnull (mouse moved relative)
pyautogui_dragTox, y, duration, buttonnull (drag performed)
pyautogui_dragRelxOffset, yOffset, duration, buttonnull (drag performed)
pyautogui_writemessage, intervalnull (text typed)
pyautogui_typewritemessage, intervalnull (text typed)
pyautogui_presskeys, presses, intervalnull (key press performed)
pyautogui_hotkeykeys, intervalnull (hotkey chord performed)
pyautogui_scrollclicks, x, ynull (scroll performed)
pyautogui_toolsnonetool list { note, tools:[{name, description}] }
pyautogui_diagnosenone{ python, platform, deps } diagnostic info

Use pyautogui_tools to list the exact tool set for your environment and PyAutoGUI version.

↑↓ navigate openesc close