Swift MCP GUI Server

Swift MCP GUI Server

MCP server that can execute commands such as keyboard input and mouse movement on macOS

NakaokaRei

OS Automation
Visit Server

README

Swift MCP GUI Server

A Model Context Protocol (MCP) server that allows controlling Mac OS X through SwiftAutoGUI. This server provides tools for programmatically controlling the mouse and keyboard through MCP clients.

Requirements

  • macOS 15.0 or later
  • Swift 6.0 or later
  • Xcode 16.0 or later

Installation

  1. Clone this repository:
git clone https://github.com/NakaokaRei/swift-mcp-gui.git
cd swift-mcp-gui
  1. Install
swift package experimental-install
  1. Add command to your MCP client.
{
  "mcpServers" : {
    "swift-mcp-gui" : {
      "command" : "/Users/USERNAME/.swiftpm/bin/swift-mcp-gui"
    }
  }
}

Available Tools

The server provides the following tools for controlling macOS:

1. Mouse Movement

  • Tool name: moveMouse
  • Input:
    • x: double (x-coordinate)
    • y: double (y-coordinate)
  • Moves the mouse cursor to the specified coordinates

2. Mouse Clicks

  • Tool name: mouseClick
  • Input:
    • button: String ("left" or "right")
  • Performs a mouse click at the current cursor position

3. Keyboard Input

  • Tool name: sendKeys
  • Input:
    • keys: Array of strings (key names)
  • Sends keyboard shortcuts or key combinations
  • Example keys: "command", "control", "option", "shift", "return", "space", "a", "1", etc.

4. Scrolling

  • Tool name: scroll
  • Input:
    • direction: String ("up", "down", "left", "right")
    • clicks: Integer (number of scroll clicks)
  • Performs scrolling in the specified direction

Security Considerations

This server has full control over your mouse and keyboard. Be careful when running it and only connect trusted MCP clients.

License

MIT License

Recommended Servers

@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
ThingsPanel MCP

ThingsPanel MCP

An integration server that connects AI models with ThingsPanel IoT platform, allowing AI assistants to interact with IoT devices through natural language for device control, data retrieval, and management operations.

Official
Python
Beamlit MCP Server

Beamlit MCP Server

An MCP server implementation that enables seamless integration between Beamlit CLI and AI models using the Model Context Protocol standard.

Official
TypeScript
Shell MCP Server

Shell MCP Server

A secure server that enables AI applications to execute shell commands in specified directories, supporting multiple shell types (bash, sh, cmd, powershell) with built-in security features like directory isolation and timeout control.

Local
Python
MCP Python Toolbox

MCP Python Toolbox

A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.

Local
Python
Command Executor MCP Server

Command Executor MCP Server

A Model Context Protocol server that allows secure execution of pre-approved commands, enabling AI assistants to safely interact with the user's system.

Local
JavaScript
DevEnvInfoServer

DevEnvInfoServer

An MCP server that provides detailed information about your development environment to the Cursor code editor, enabling more context-aware assistance.

Local
Python
Siri Shortcuts MCP Server

Siri Shortcuts MCP Server

Enables interaction with macOS Siri Shortcuts via the Model Context Protocol, allowing users to list, open, and run shortcuts dynamically with optional inputs.

Local
TypeScript
mcp-cli-exec MCP Server

mcp-cli-exec MCP Server

A CLI command execution server that enables running shell commands with structured output, providing detailed execution results including stdout, stderr, exit code, and execution duration.

Local
TypeScript