Moves the mouse cursor to the specified coordinates
Performs a mouse click at the current cursor position
Sends keyboard shortcuts or key combinations
Performs scrolling in the specified direction
Swift GUI Automation provides a Model Context Protocol server that enables programmatic control of macOS through mouse movements, clicks, keyboard inputs, and scrolling. Built on SwiftAutoGUI, this tool allows AI assistants to interact with the macOS interface directly, automating repetitive tasks and enabling new interaction patterns between AI and desktop applications.
Swift GUI Automation is a Model Context Protocol (MCP) server that enables programmatic control of macOS through mouse and keyboard automation. This server leverages SwiftAutoGUI to provide a bridge between AI assistants and the macOS desktop environment.
Before installing Swift GUI Automation, ensure your system meets these requirements:
Follow these steps to install and configure Swift GUI Automation:
git clone https://github.com/NakaokaRei/swift-mcp-gui.git
cd swift-mcp-gui
swift package experimental-install
This will install the executable to your Swift package manager's bin directory, typically at /Users/USERNAME/.swiftpm/bin/swift-mcp-gui
.
Once installed, the Swift GUI Automation server provides tools for controlling mouse movement, mouse clicks, keyboard input, and scrolling on macOS.
This server has full control over your mouse and keyboard. Exercise caution when running it and only connect trusted MCP clients. Be aware that malicious use could potentially control your computer, so ensure you understand the commands being executed.
If you encounter issues with permissions, you may need to:
Swift GUI Automation is available under the MIT License, allowing for both personal and commercial use with proper attribution.