https://github.com/NakaokaRei/swift-mcp-gui
MCP Sever for manipulating macOS
https://github.com/NakaokaRei/swift-mcp-gui
Last synced: 26 days ago
JSON representation
MCP Sever for manipulating macOS
- Host: GitHub
- URL: https://github.com/NakaokaRei/swift-mcp-gui
- Owner: NakaokaRei
- License: mit
- Created: 2025-03-20T08:12:45.000Z (28 days ago)
- Default Branch: master
- Last Pushed: 2025-03-20T08:41:09.000Z (28 days ago)
- Last Synced: 2025-03-20T09:27:50.859Z (28 days ago)
- Language: Swift
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - NakaokaRei/swift-mcp-gui - キーボード入力やマウス移動などのコマンドが実行できるMCPサーバー (サーバー実装 / 🛠️ <a name="other-tools-and-integrations"></a>その他のツールと統合)
README
# Swift MCP GUI Server
A Model Context Protocol (MCP) server that allows controlling Mac OS X through [SwiftAutoGUI](https://github.com/NakaokaRei/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:
```bash
git clone https://github.com/NakaokaRei/swift-mcp-gui.git
cd swift-mcp-gui
```2. Install
```bash
swift package experimental-install
```3. 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)
- 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