PyAutoGUI-MCP

PyAutoGUI-MCP

Exposes PyAutoGUI desktop automation functions as MCP tools, enabling mouse control, keyboard input, and screenshot capture.

Category
Visit Server

README

<div align="center"> <a target="_blank" href="https://github.com/chigwell/pyautogui-mcp"> <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=200&section=header&text=PyAutoGUI-MCP&fontSize=50&fontAlignY=35&animation=fadeIn&fontColor=FFFFFF&descAlignY=55&descAlign=62" alt="Telegram MCP Server" width="100%" /> </a> </div>

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).

Tool Inputs (common) Output
pyautogui_screenshot imageFilename (optional), region (optional [left, top, width, height]) MCP image content (PNG bytes)
pyautogui_screenshot_encoded format (png/jpeg), quality (1-95, JPEG only), region MCP image content (PNG/JPEG bytes)
pyautogui_position none cursor coordinates { "x": int, "y": int }
pyautogui_click x, y, clicks, button, interval, duration null (mouse click performed)
pyautogui_doubleClick x, y, button, interval, duration null (double-click performed)
pyautogui_rightClick x, y, interval, duration null (right-click performed)
pyautogui_moveTo x, y, duration null (mouse moved)
pyautogui_moveRel xOffset, yOffset, duration null (mouse moved relative)
pyautogui_dragTo x, y, duration, button null (drag performed)
pyautogui_dragRel xOffset, yOffset, duration, button null (drag performed)
pyautogui_write message, interval null (text typed)
pyautogui_typewrite message, interval null (text typed)
pyautogui_press keys, presses, interval null (key press performed)
pyautogui_hotkey keys, interval null (hotkey chord performed)
pyautogui_scroll clicks, x, y null (scroll performed)
pyautogui_tools none tool list { note, tools:[{name, description}] }
pyautogui_diagnose none { python, platform, deps } diagnostic info

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured