nakaokarei_swift_mcp_gui

nakaokarei_swift_mcp_gui

by NakaokaRei
An MCP server for programmatically controlling mouse and keyboard inputs on macOS.

Swift MCP GUI Server

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

Requirements

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

Installation

  1. Clone this repository:

shell git clone https://github.com/NakaokaRei/swift-mcp-gui.git cd swift-mcp-gui

  1. Install:

shell swift package experimental-install

  1. Add command to your MCP client:

json { "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)
  • Functionality: Moves the mouse cursor to the specified coordinates.

2. Mouse Clicks

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

3. Keyboard Input

  • Tool name: sendKeys
  • Input:
  • keys: Array of strings (key names)
  • Functionality: 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)
  • Functionality: Performs scrolling in the specified direction.

Security Considerations

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

License

MIT License

Features & Capabilities

Categories
mcp_server model_context_protocol swift macos automation mouse_control keyboard_control swiftautogui

Implementation Details

Stats

0 Views
8 GitHub Stars

Repository Info

NakaokaRei Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300