
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
mcp-pyautogui
implements a Model Context Protocol (MCP) server for PyAutoGUI. It provides control of mouse, keyboard, and screen interactions, allowing AI systems to automate tasks on a host machine.
The server runs over stdio
transport and provides tools for clicking, typing, taking screenshots, and more, with a focus on simplicity and reliability. It’s designed for developers and AI enthusiasts looking to integrate desktop automation into their workflows.
You'll also have to grant the relevant permissions.
Use pip
to install the server.
pip install mcp-pyautogui
You can then run the following comand to determine the location at which the server was installed:
which mcp-pyautogui
# Sample output:
# /Users/bob/miniconda3/envs/desk/bin/mcp-pyautogui
Use that location when you're adding mcp-pyautogui
to your claude_desktop_config.json
file. Here's a sample configuration:
{
"mcpServers": {
"mcp-pyautogui": {
"command": "/Users/bob/miniconda3/envs/desk/bin/mcp-pyautogui",
"args": [
""
]
}
}
}
If you followed the above installation steps, you don't need to do anything else. Just use Claude Desktop and you should see all the tools this MCP server offers automatically. You could test this server by saying something like "can you click at (200,200) ?".
The server runs over stdio
transport, meaning it communicates through standard input/output. To use it, connect an MCP-compatible client (e.g., an AI assistant or custom script) that can send JSON-RPC commands and receive responses.
click(100, 200)
→ Returns true if successful.type_text("hello")
→ Returns true.take_screenshot("screenshot.png")
→ Saves to screenshot.png.get_mouse_position()
→ Returns (500, 300) (example).hotkey("ctrl c")
→ Returns true.get_os()
→ Returns "Windows" (if on Windows).click(x, y)
: Left-click at coordinates (x, y).
x: int
, y: int
bool
right_click(x, y)
: Right-click at coordinates (x, y).
x: int
, y: int
bool
move_to(x, y)
: Move mouse to coordinates (x, y) over 3 seconds.
x: int
, y: int
bool
drag_to(x, y, duration)
: Drag mouse to (x, y) over specified duration (default 1.0s).
x: int
, y: int
, duration: float
bool
type_text(text)
: Type the given text.
text: str
bool
press_key(key)
: Press and release a single key (e.g., 'enter'
, 'space'
, 'a'
).
key: str
bool
hotkey(keys)
: Press multiple keys together (e.g., 'ctrl c'
). Space-separated string.
keys: str
bool
scroll(amount)
: Scroll up (positive) or down (negative) by amount.
amount: int
bool
take_screenshot(filename)
: Save a screenshot to the specified file (e.g., 'screen.png'
).
filename: str
bool
get_mouse_position()
: Get current mouse coordinates as (x, y).
str
get_os()
: Get the current OS name (e.g., 'Windows'
, 'macOS'
, 'Linux'
).
str
double_click(x, y)
: Perform a double-click at the given (x, y) coordinates.
x: int
, y: int
bool
get_screen_size()
: Get the screen resolution as (width, height).
str
pixel_color(x, y)
: Get the RGB color of the pixel at (x, y). Returns (r, g, b).
x: int
, y: int
str
FAQs
A powerful MCP server for PyAutoGUI
We found that mcp-pyautogui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.