hammerspoon-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HS_MCP_TOOLS | No | Which tiers to register. 'all' adds the unsafe tier (hs_eval). | safe |
| HS_MCP_HS_PATH | No | Absolute path to the hs binary. Set this if your install is somewhere unusual. | |
| HS_MCP_DOCS_PATH | No | Absolute path to Hammerspoon's bundled API documentation JSON, used by hs_api_search. | |
| HS_MCP_LOG_LEVEL | No | Verbosity of the stderr log. Logs never touch stdout, which carries the protocol. | info |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| hs_healthA | Verify that Hammerspoon is running and reachable, and report its version. Call this first when any other tool fails, because it distinguishes a setup problem from a tool problem. |
| hs_api_searchA | Search Hammerspoon's own API documentation for functions, methods, constants, and modules. Returns exact signatures. Use this before writing Lua so calls are correct the first time, rather than discovering a wrong name from a runtime error. |
| hs_list_windowsA | List every visible window with its id, owning application, title, frame, and screen. Window ids are what hs_focus_window and hs_move_window operate on, so call this first. |
| hs_focus_windowA | Bring a window to the front, selected by id (exact) or by a substring of its title. The matched window is returned so you can confirm the right one was chosen. |
| hs_move_windowA | Set the position and/or size of a window by id, in screen pixels. Omitted fields keep their current value. Use hs_screens to learn the available coordinate space. |
| hs_window_layoutA | Snap a window to a named position such as left-half or quarter-top-left, computed from the screen size so no pixel arithmetic is needed. Defaults to the focused window. Positions respect the menu bar and Dock. |
| hs_list_appsA | List running applications with pid, bundle identifier, window count, and which one is frontmost. |
| hs_launch_appA | Launch an application by name, or focus it if it is already running. Use the name as it appears in Finder, for example "Safari". |
| hs_focus_appA | Bring an already-running application to the front. Unlike hs_launch_app this never starts anything, so it fails if the application is not running. |
| hs_screensA | List connected screens with their coordinate frames. frame excludes the menu bar and Dock, fullFrame includes them. Use these bounds when computing arguments for hs_move_window. |
| hs_console_tailA | Return the most recent lines from the Hammerspoon console. This is where Lua errors and print output from the user configuration appear, so it is the first place to look when a config change misbehaves. |
| hs_notifyA | Display a transient alert on screen through Hammerspoon. Useful for telling the user something without stealing focus. |
| hs_reload_configA | Reload ~/.hammerspoon/init.lua. Use after editing the user configuration. The reload is scheduled a moment ahead so this call can return first, and it resets all in-memory state held by the configuration. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vukvukovich/hammerspoon-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server