Hammerspoon MCP
Control macOS through Hammerspoon: windows, apps, and API search. Injection-safe by…
- Pricing
- Open source
- Runs
- Locally
- Version
- 0.4.0
- Listing updated
- today
About Hammerspoon MCP
Hammerspoon MCP is an open-source MCP server. It runs locally on your machine and is started by your AI client.
Control macOS through Hammerspoon: windows, apps, and API search. Injection-safe by design.
Install
Run in a terminal
claude mcp add hammerspoon-mcp -- npx -y @vukvukovich/hammerspoon-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"hammerspoon-mcp": {
"command": "npx",
"args": [
"-y",
"@vukvukovich/hammerspoon-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"hammerspoon-mcp": {
"command": "npx",
"args": [
"-y",
"@vukvukovich/hammerspoon-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"hammerspoon-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@vukvukovich/hammerspoon-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"hammerspoon-mcp": {
"command": "npx",
"args": [
"-y",
"@vukvukovich/hammerspoon-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"hammerspoon-mcp": {
"command": "npx",
"args": [
"-y",
"@vukvukovich/hammerspoon-mcp"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
HS_MCP_TOOLSWhich tools to expose. "safe" (default) exposes inspection, window management, and system tools only. "all" additionally exposes hs_eval, hs_applescript, and hs_ui_press, which run arbitrary Lua and AppleScript and press UI elements - anything the user can do.HS_MCP_TRANSPORTHow Lua reaches Hammerspoon. "socket" (default) keeps one persistent Unix domain socket, self-installed on first call, with automatic fallback to spawning; "spawn" runs one hs process per call.HS_MCP_HS_PATHExplicit path to the Hammerspoon hs command line tool. Only needed when Hammerspoon is installed somewhere unusual.HS_MCP_DOCS_PATHExplicit path to Hammerspoon's bundled docs.json, used by hs_api_search.HS_MCP_LOG_LEVELLog verbosity on stderr: debug, info (default), warn, or error.
Pricing
Open source
Hammerspoon MCP FAQ
Is Hammerspoon MCP free?
Yes. Hammerspoon MCP is open source, so you can use and self-host it for free.
How do I add Hammerspoon MCP to Claude Code?
Run this command in your terminal: claude mcp add hammerspoon-mcp -- npx -y @vukvukovich/hammerspoon-mcp
Where this comes from
- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.