swift -gui
MCP server that can execute commands such as keyboard input and mouse movement on macOS
claude mcp add --transport stdio nakaokarei-swift-mcp-gui /Users/USERNAME/.swiftpm/bin/swift-mcp-gui
How to use
This MCP server exposes a Swift-based GUI controller for macOS that leverages SwiftAutoGUI to programmatically control the mouse, keyboard, and screen interactions. It provides a suite of tools that can be invoked by MCP clients to simulate user input, capture screen data, and query display information. The available tools include mouse movement (moveMouse), mouse clicks (mouseClick), keyboard input (sendKeys), scrolling (scroll), screen size (getScreenSize), pixel color sampling (getPixelColor), full-screen capture (captureScreen), region capture (captureRegion), saving screenshots (saveScreenshot), and AppleScript execution (executeAppleScript and executeAppleScriptFile). These tools enable automation tasks such as UI testing, automated workflows, and macro-like control of macOS applications via MCP clients.
How to install
Prerequisites:\n- macOS 15.0 or later\n- Swift 6.0 or later\n- Xcode 16.0 or later\n\nInstallation steps:\n1. Clone the repository:\nbash\ngit clone https://github.com/NakaokaRei/swift-mcp-gui.git\ncd swift-mcp-gui\n\n2. Install the package:\nbash\nswift package experimental-install\n\n3. Add command to your MCP client configuration as shown below. Replace USERNAME with your actual user name:\njson\n{\n "mcpServers" : {\n "swift-mcp-gui" : {\n "command" : "/Users/USERNAME/.swiftpm/bin/swift-mcp-gui"\n }\n }\n}\n
Additional notes
Notes:\n- This server requires macOS accessibility permissions to control the mouse and keyboard. Ensure you grant the proper permissions in System Settings (Security & Privacy) under Accessibility.\n- The SwiftMCP GUI server is designed for macOS environments and relies on SwiftAutoGUI for input automation.\n- If the binary path changes, update the mcp_config accordingly.\n- No additional environment variables are required by default, but you can extend environment settings in your MCP client as needed.
Related MCP Servers
Scrapling
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
apple-mail
MCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language
mirroir
MCP server for controlling a real iPhone via macOS iPhone Mirroring...and any MacOs app. Screenshot, tap, swipe, type — from any MCP client.
mcp-jest
Automated testing for Model Context Protocol servers. Ship MCP Servers with confidence.
claude-command-runner
Swift-based MCP server that bridges Claude Desktop with terminal applications, enabling seamless command execution with intelligent output retrieval. Features auto-capture, SQLite history, and Warp Terminal integration
mcp-jira-stdio
MCP server for Jira integration with stdio transport. Issue management, project tracking, and workflow automation via Model Context Protocol.