macOS automation via Hammerspoon β 75 tools for windows, Spaces, audio, Bluetooth, and more
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Give AI agents deep control over macOS β windows, audio, Bluetooth, Spaces, Focus mode, and 200+ OS APIs β through one MCP server.
An MCP server that bridges AI agents to Hammerspoon β the most powerful macOS automation tool available. Unlike screenshot-and-click tools, this gives agents programmatic OS-level access: manage windows by ID, switch audio devices by name, move apps between Spaces, toggle Focus mode, and subscribe to real-time OS events.
75 tools. 12 subscribable resources. Zero native dependencies.
Note: The server auto-discovers the
hsbinary β it checks~/.local/bin/hs,/usr/local/bin/hs,/opt/homebrew/bin/hs, and the app bundle path. You don't needhson your PATH if Hammerspoon is installed to/Applications.
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Add to .vscode/mcp.json:
Add to ~/.aws/amazonq/mcp.json:
| Tool | Description |
|---|---|
hs_list_windows | All visible windows with app, title, frame, id |
hs_focus_window | Bring window to front by id or title match |
hs_move_window | Move/resize window by id |
hs_window_layout | 16 presets (halves, thirds, quarters, grid, cascade, centerβ¦) + custom fractional layouts |
hs_save_layout | Snapshot all window positions as a named layout |
hs_restore_layout | Restore a saved layout (matches by app + title) |
hs_list_layouts | List saved layout names |
| Tool | Description |
|---|---|
hs_spaces_list | All spaces per screen with active markers |
hs_spaces_active | Currently focused space + screen |
hs_spaces_goto | Switch by ID or index |
hs_spaces_move_window | Move window to another space (optionally follow) |
hs_spaces_add | Create a new space |
hs_spaces_remove | Remove a space (safety checks) |
hs_spaces_windows | Windows on a specific space |
hs_spaces_window_spaces | Which space(s) a window is on |
hs_spaces_mission_control | Toggle Mission Control / ExposΓ© / Launchpad / Show Desktop |
| Tool | Description |
|---|---|
hs_list_apps | Running applications with bundle ID, PID, hidden state |
hs_launch_app | Launch or activate an app by name |
hs_kill_app | Quit an app |
| Tool | Description |
|---|---|
hs_click | Click at coordinates with button + modifier options |
hs_type | Type text (Unicode, CJK, emoji) |
hs_hotkey | Press key combo (e.g. "cmd+shift+4") |
| Tool | Description |
|---|---|
hs_screenshot | Capture full screen or region (base64 PNG) |
hs_screens | Display info (resolution, name, rotation) |
hs_mouse_position | Current cursor coordinates |
| Tool | Description |
|---|---|
hs_audio_devices | List all input/output with volume, mute, transport type |
hs_audio_default | Get/set default devices (fuzzy name match) |
hs_audio_volume | Volume on any specific device (0β100) |
hs_audio_mute | Mute/unmute/toggle any device |
hs_audio_datasources | List/switch data sources (speakers vs headphones) |
hs_audio_watch | Watch for device changes |
| Tool | Description |
|---|---|
hs_bluetooth_status | Power state and discoverability |
hs_bluetooth_power | On / off / toggle |
hs_bluetooth_devices | List paired or connected devices |
hs_bluetooth_connect | Connect by name (fuzzy) or MAC address |
hs_bluetooth_disconnect | Disconnect a device |
Requires blueutil:
brew install blueutil
| Tool | Description |
|---|---|
hs_focus_status | Check if DND/Focus is active + profile name |
hs_focus_toggle | Toggle via Control Center (no setup needed) |
hs_focus_shortcut | Enable/disable via macOS Shortcuts (most reliable) |
hs_focus_install_shortcut | One-time setup guide |
hs_focus_schedule | DND for N minutes with auto-disable |
hs_focus_cancel_timer | Cancel scheduled disable |
| Tool | Description |
|---|---|
hs_battery | Charge %, power source, time remaining |
hs_wifi | Current SSID and interface details |
hs_volume | System volume get/set |
hs_dark_mode | Get/toggle dark mode |
hs_notify | Post a macOS notification |
hs_clipboard | Read/write system pasteboard |
| Tool | Description |
|---|---|
hs_brightness | Get/set screen brightness (0β100) |
| Tool | Description |
|---|---|
hs_timer_start | Named countdown with notification on fire |
hs_timer_cancel | Cancel by name |
hs_timer_list | List active timers |
| Tool | Description |
|---|---|
hs_finder_selection | Get currently selected Finder items |
hs_finder_open | Open/reveal path in Finder |
hs_trash | Move to Trash (reversible) |
hs_quicklook | Quick Look preview |
| Tool | Description |
|---|---|
hs_system_info | CPU, memory, thermal state, uptime |
hs_caffeinate | Prevent sleep for N minutes |
hs_execute | Run shell command (user environment) |
hs_open_url | Open URL in browser or specific app |
hs_alert | HUD-style on-screen overlay message |
| Tool | Events |
|---|---|
hs_watch_apps | App activated, launched, terminated, hidden |
hs_watch_wifi | Network changes |
hs_watch_usb | Device connect/disconnect |
hs_watch_battery | Charge level, power source |
hs_watch_screens | Display configuration |
hs_watch_paths | Filesystem changes |
hs_watch_sleep | Sleep/wake/lock/unlock |
hs_watch_clipboard | Every pasteboard change |
hs_watch_clipboard_history | Ring buffer with source app tracking |
hs_get_clipboard_history | Read the full buffer |
hs_watch_urls | Incoming hammerspoon://mcp/... URLs |
hs_unwatch | Stop a watcher |
hs_list_watchers | List active watchers |
| Tool | Description |
|---|---|
hs_eval | Execute arbitrary Lua in the Hammerspoon runtime |
This gives access to all 200+ Hammerspoon modules not covered by dedicated tools β USB details, serial ports, network interfaces, Canvas drawing, menubar items, etc.
MCP clients can subscribe to resource URIs and receive push notifications when OS events fire:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/hammerspoon)<a href="https://allmcps.com/mcp/hammerspoon"><img src="https://allmcps.com/api/badge/hammerspoon?style=directory" alt="Hammerspoon on AllMCPs" /></a>