mcpField
M
mac-control

mac-control

github.com/aiagentwithdhruvProductivity20114 installsUpdated 15w ago
Repository

About mac-control

mac-control is a skill for controlling a Mac through natural-language requests, using local macOS commands. It covers app, display, audio, file search, clipboard, notification, and screenshot tasks, with command safeguards.

Key features

  1. 01Launch, quit, and switch apps
  2. 02Toggle dark mode and set volume
  3. 03Search files and open folders
  4. 04Read and write clipboard content
  5. 05Send notifications and play sounds
  6. 06Capture screen or front window

Use cases

  1. 01Switching apps during a task
  2. 02Finding a document with Spotlight
  3. 03Copying text to the clipboard
  4. 04Capturing a screenshot of a window

MCP support

The skill uses the `macos_mcp.py` MCP server, which exposes tools for system information, app control, display and audio settings, notifications, file search, clipboard, and screenshots.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aiagentwithdhruv/skills --skill mac-control

After installing, type/mac-controlin Claude Code to confirm it loaded.

Details

From the project README

macOS Control — AI Mac Automation

Give Claude direct control of your Mac through 15 MCP tools. Open apps, toggle dark mode, search files, take screenshots, manage clipboard — all via natural language.

Location

Project: /Users/apple/Aiwithdhruv/AI Development/Claude/Mac-Automation/ MCP Server: Mac-Automation/macos_mcp.py

Tools Reference

System (read-only)
get_system_info()                    # macOS version, chip, RAM, uptime
get_running_apps()                   # All visible running apps
get_disk_usage()                     # Storage per volume
App Control
open_app(app_name="Safari")          # Launch app (validated against /Applications/)
close_app(app_name="Notes")          # Graceful quit via AppleScript
switch_to_app(app_name="Terminal")   # Bring to foreground
Display & Audio
toggle_dark_mode()                   # Switch light <-> dark (instant visual)
set_volume(level=50)                 # 0-100, auto-unmutes
Notifications
send_notification(title="Hey", message="Class starting!", sound="Glass")
play_sound(sound_name="Ping")        # 14 system sounds available
Files & Search
spotlight_search(query="invoice.pdf", folder="~/Documents", limit=20)
open_folder(folder_path="~/Desktop") # Opens in Finder
Clipboard
get_clipboard()                      # Read current clipboard
set_clipboard(text="Hello World")    # Write to clipboard
Screenshot
take_screenshot(region="full")       # Saves PNG to Desktop
take_screenshot(region="window")     # Front window only

Schema

Inputs
NameTypeRequiredDescription
app_namestrvariesApp name without .app (e.g., 'Safari')
levelintvariesVolume 0-100
titlestrvariesNotification title
messagestrvariesNotification body
soundstrnoSound name (default/Glass/Ping/Pop/etc.)
querystrvariesSpotlight search query
folderstrnoFolder to scope search
textstrvariesText for clipboard
regionstrnoScreenshot region (full/window)
Outputs
NameTypeDescription
resultstrHuman-readable result or error message
Credentials
NameTypeRequiredDescription
(none)——No credentials needed — uses local macOS commands
Composable With
  • ghost-browser — screenshot → analyze → automate browser
  • google-mcp — search files → email attachment
  • instantly-campaigns — clipboard → email templates
Cost

Free — stdlib only, no API calls.

Safety

  • Blocked keywords: rm, sudo, shutdown, format, erase, passwd, kill
  • App names validated against /Applications/
  • AppleScript strings sanitized
  • 10s timeout on all commands
  • No shell=True anywhere

Comments

Markdown supported