Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Hammerspoon MCP

by vukvukovichversion 0.4.0i★ 1iRuns on your computerRepository ↗
Registry nameio.github.vukvukovich/hammerspoon-mcp

How to install

What it does

Control macOS through Hammerspoon: windows, apps, and API search. Injection-safe by design.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Design, images & audio

Use together with

Skills that teach the AI this kind of work; they work alongside this one

impeccable

The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.

by pbakaus★ 112,5441 skills

Skill · How-to guide

diagram-design

Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, and Pi. 45 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.

by cathrynlavery★ 68,0691 skills

Skill · How-to guide

frontend-slides

Create beautiful slides on the web using a coding agent's frontend skills

by zarazhangrui★ 32,5141 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity4/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness7/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score11/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Hammerspoon MCP. Follow https://mcp.popnx.com/i/vukvukovich-hammerspoon-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Hammerspoon MCP for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "hammerspoon": { "command": "npx", "args": [ "-y", "@vukvukovich/hammerspoon-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Hammerspoon MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "hammerspoon": {
          "command": "npx",
          "args": [
            "-y",
            "@vukvukovich/hammerspoon-mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Hammerspoon MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Hammerspoon MCP or shows a Hammerspoon MCP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • HS_MCP_TOOLS Which 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… · default safe
  • HS_MCP_TRANSPORT How 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. · default socket
  • HS_MCP_HS_PATH Explicit path to the Hammerspoon hs command line tool. Only needed when Hammerspoon is installed somewhere unusual.
  • HS_MCP_DOCS_PATH Explicit path to Hammerspoon's bundled docs.json, used by hs_api_search.
  • HS_MCP_LOG_LEVEL Log verbosity on stderr: debug, info (default), warn, or error. · default info

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Hammerspoon MCP yet

Hammerspoon MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Hammerspoon MCP

  • Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)

B · Others in Design, images & audio that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Hammerspoon MCP for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user hammerspoon -- npx -y @vukvukovich/hammerspoon-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Hammerspoon MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user hammerspoon -- npx -y @vukvukovich/hammerspoon-mcp
  4. Type /mcp in Claude Code

    You should see Hammerspoon MCP listed as connected

  5. Try it

    Use Hammerspoon MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Hammerspoon MCP or shows a Hammerspoon MCP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • HS_MCP_TOOLS Which 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… · default safe
  • HS_MCP_TRANSPORT How 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. · default socket
  • HS_MCP_HS_PATH Explicit path to the Hammerspoon hs command line tool. Only needed when Hammerspoon is installed somewhere unusual.
  • HS_MCP_DOCS_PATH Explicit path to Hammerspoon's bundled docs.json, used by hs_api_search.
  • HS_MCP_LOG_LEVEL Log verbosity on stderr: debug, info (default), warn, or error. · default info

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Hammerspoon MCP for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "hammerspoon": { "command": "npx", "args": [ "-y", "@vukvukovich/hammerspoon-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Hammerspoon MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Hammerspoon MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Hammerspoon MCP or shows a Hammerspoon MCP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • HS_MCP_TOOLS Which 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… · default safe
  • HS_MCP_TRANSPORT How 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. · default socket
  • HS_MCP_HS_PATH Explicit path to the Hammerspoon hs command line tool. Only needed when Hammerspoon is installed somewhere unusual.
  • HS_MCP_DOCS_PATH Explicit path to Hammerspoon's bundled docs.json, used by hs_api_search.
  • HS_MCP_LOG_LEVEL Log verbosity on stderr: debug, info (default), warn, or error. · default info

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Hammerspoon MCP for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "hammerspoon": { "type": "stdio", "command": "npx", "args": [ "-y", "@vukvukovich/hammerspoon-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Hammerspoon MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Hammerspoon MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Hammerspoon MCP or shows a Hammerspoon MCP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • HS_MCP_TOOLS Which 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… · default safe
  • HS_MCP_TRANSPORT How 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. · default socket
  • HS_MCP_HS_PATH Explicit path to the Hammerspoon hs command line tool. Only needed when Hammerspoon is installed somewhere unusual.
  • HS_MCP_DOCS_PATH Explicit path to Hammerspoon's bundled docs.json, used by hs_api_search.
  • HS_MCP_LOG_LEVEL Log verbosity on stderr: debug, info (default), warn, or error. · default info

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Hammerspoon MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user hammerspoon -- npx -y @vukvukovich/hammerspoon-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "hammerspoon": {
      "command": "npx",
      "args": [
        "-y",
        "@vukvukovich/hammerspoon-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "hammerspoon": {
      "command": "npx",
      "args": [
        "-y",
        "@vukvukovich/hammerspoon-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "hammerspoon": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@vukvukovich/hammerspoon-mcp"
      ]
    }
  }
}

Values you fill in

  • HS_MCP_TOOLS env
    Which 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…
  • HS_MCP_TRANSPORT env
    How 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_PATH env
    Explicit path to the Hammerspoon hs command line tool. Only needed when Hammerspoon is installed somewhere unusual.
  • HS_MCP_DOCS_PATH env
    Explicit path to Hammerspoon's bundled docs.json, used by hs_api_search.
  • HS_MCP_LOG_LEVEL env
    Log verbosity on stderr: debug, info (default), warn, or error.

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
67/wk
Connection
Runs on your computer
Latest versioni
0.4.0
Published to registryi
Aug 15, 2026
Code last changedi
Sep 29, 2026
Maker
vukvukovich
Packages
npm: @vukvukovich/hammerspoon-mcp
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account vukvukovich, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 2 months ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for @vukvukovich/hammerspoon-mcp@0.4.0

Checks only this package version, not every dependency · checked Nov 16, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/vukvukovich-hammerspoon-mcp.svg)](https://mcp.popnx.com/en/servers/vukvukovich-hammerspoon-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Design, images & audioi

  • More stars than 78% of the other 3275 servers in this category
  • Published to the registry more recently than 18% of the other 3275 servers in this category
  • Basic checks equal to or better than 99% of the other 3275 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Hammerspoon MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 2 months ago, and the latest version (0.4.0) reached the registry 3 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: HyperFrames by HeyGen, Pascal 3D Editor, draw.io, Figma MCP Server, Remocn: Remotion MCP server

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

HyperFrames by HeyGen

Official HyperFrames by HeyGen: the best AI video editor in chat. Captions, motion graphics, MP4.

by heygen-comWidely used★ 86.4K Stars for the whole repoUpdated yesterday

Runs in the cloud✓ heygen.com

Pascal 3D Editor

Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.

by pascalorgWidely used↓ 1K/wk★ 25.6K Stars for the whole repoUpdated yesterday

Computer or cloud✓ service owner · pascal.app

draw.io

Create draw.io diagrams in chat from Mermaid or XML, shown live and interactive. 10,000+ shapes.

by jgraphWidely used★ 5.8KUpdated 2 days ago

Runs in the cloud✓ service owner · draw.ioTried by the PopNx team

Figma MCP Server

Figma’s official server gives AI your design data so it can turn designs into code or describe them accurately. Connects to Figma’s cloud.

by figmaWidely used★ 2.2KUpdated 13 months ago

Runs in the cloud✓ service owner · mcp.figma.com
Compared with similar ones
This one
Hammerspoon MCP
HyperFrames by HeyGenPascal 3D Editordraw.ioFigma MCP ServerRemocn: Remotion MCP server
Runs whereInstalls on your computerRuns in the cloud, nothing to installCloud or install on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoYesNoNoYesNo
Basic checks3/34/45/54/44/44/4
LicenseMITApache-2.0MITApache-2.0–MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

Let an AI agent drive your Mac through Hammerspoon, without ever splicing its input into Lua source.

What it is

Hammerspoon is a macOS automation app you script in Lua. It exposes a command line interface through its hs.ipc module, so hs -c " " runs Lua inside the running Hammerspoon process.

This project is an MCP (Model Context Protocol) server that sits in front of that CLI. It gives an agent a set of typed tools (list windows, move a window, focus an app, search the Hammerspoon API docs, tail the console, reload your config) and translates each tool call into a Lua program that Hammerspoon runs.

It speaks MCP over stdio, so any MCP client can use it: Claude Code, Claude Desktop, or your own.

Project status

Published on npm as v0.4.x: 38 safe-tier tools, plus 3 gated behind HS_MCP_TOOLS=all. Still pre-1.0, so tool names and argument shapes can change between minor versions.

Why this one is different

1. Injection-safe by construction

Most of the risk in a "run Lua for me" bridge is the moment you build the Lua. The usual approach is to interpolate the arguments into a source string and escape the dangerous characters. Escaping is a discipline, and disciplines slip.

This server never interpolates. Every tool's Lua body is a static constant in the TypeScript source. Arguments travel separately:

  1. The validated argument object is JSON-encoded.
  2. That JSON is base64-encoded.
  3. The base64 text is spliced once, into one fixed prelude line:
local ARGS = hs.json.decode(hs.base64.decode("<base64>"))

The tool body then reads ARGS.title, ARGS.windowId, and so on.

The base64 alphabet is A-Z, a-z, 0-9, +, /, and =. It contains no quote, no backslash, no newline, no square bracket, and no hyphen. So the payload cannot close the Lua string, cannot start an escape sequence, cannot open a long bracket, and cannot open a comment. Injection is impossible because of the alphabet, not because someone remembered to escape correctly.

There is no shell layer either. The server talks to Hammerspoon over a persistent Unix socket, falling back to spawn(hsPath, ["-c", lua]) with an argv array, so no sh ever parses the command on either path.

2. Tiered tools, safe by default

The default tier is safe: read, inspect, and arrange operations. Arbitrary Lua evaluation exists as hs_eval, but it is off unless you set HS_MCP_TOOLS=all.

See Security for the reasoning. Short version: the threat is prompt injection, not you.

3. Built for the config-development loop

Most of the value of Hammerspoon is your own init.lua. So the server helps you write it, not just drive it:

  • hs_api_search searches Hammerspoon's bundled API documentation, so the agent can look up the real signature of hs.window.moveToUnit instead of guessing.
  • hs_console_tail reads back the Hammerspoon console, so the agent can see its own errors.
  • hs_reload_config reloads init.lua after an edit.

Edit, reload, read the console, fix. The agent can run that loop itself.

Quick start

Prerequisites
  • macOS.
  • Node.js 24 or newer.
  • Hammerspoon, installed and running:
  brew install --cask hammerspoon
  • The hs.ipc module loaded in your Hammerspoon config. Add this line to ~/.hammerspoon/init.lua:
  require("hs.ipc")

Then reload your config from the Hammerspoon menu bar icon. This is what installs and enables the hs command line tool. Without it, hs -c has nothing to talk to.

Verify the bridge by hand before wiring up any client:

hs -c "return 1 + 1"

If that prints 2, you are ready.

Add it to your MCP client

Claude Code:

claude mcp add hammerspoon -- npx -y @vukvukovich/hammerspoon-mcp

Any client that takes an mcpServers JSON block:

{

"mcpServers": { "hammerspoon": { "command": "npx", "args": ["-y", "@vukvukovich/hammerspoon-mcp"] } } }

To opt into the unsafe tier, add the environment variable. Claude Code:

claude mcp add hammerspoon -e HS_MCP_TOOLS=all -- npx -y @vukvukovich/hammerspoon-mcp

JSON:

{

"mcpServers": { "hammerspoon": { "command": "npx", "args": ["-y", "@vukvukovich/hammerspoon-mcp"], "env": { "HS_MCP_TOOLS": "all" } } } }

Ask the agent to call hs_health first. It reports whether the hs binary was found, whether Hammerspoon is running, and whether hs.ipc answered.

Tool reference

Forty-one tools: thirty-eight in the safe tier, three gated.

ToolTierWhat it does
hs_healthsafeReport bridge status: resolved hs path, whether Hammerspoon answers, its version.
hs_api_searchsafeSearch Hammerspoon's bundled API reference and return exact signatures.
hs_console_tailsafeReturn the last N lines of the Hammerspoon console.
hs_reload_configsafeReload ~/.hammerspoon/init.lua.
hs_notifysafeShow a transient on-screen alert, without stealing focus.
hs_list_windowssafeList windows, with id, title, owning app, screen, and frame.
hs_focus_windowsafeFocus a window by id, or by a substring of its title.
hs_move_windowsafeMove or resize a window by id, in absolute screen pixels.
hs_window_layoutsafeSnap a window to a named preset such as left-half or quarter-top-left.
hs_list_appssafeList running applications, with bundle id, PID, and window count.
hs_launch_appsafeLaunch an application by name, or focus it if it is already running.
hs_focus_appsafeBring an already-running application to the front.
hs_screenssafeList screens, with id, name, frame, and which one is primary.
hs_machine_statussafeBattery, brightness, wifi, idle time, audio, and host info in one call.
hs_audio_devicessafeList audio output and input devices, showing the current default.
hs_audio_set_devicesafeSwitch the default output or input device, for example to headphones.
hs_audio_volumesafeGet or set volume and mute on the default device.
hs_brightnesssafeGet or set built-in display brightness.
hs_media_controlsafePlay, pause, skip, or go back, via system media keys.
hs_list_spacessafeList desktops (Spaces) per screen, with positions and which is current.
hs_goto_spacesafeSwitch desktop by id or by 1-based position.
hs_evalunsafeEvaluate arbitrary Lua. Requires HS_MCP_TOOLS=all.
hs_applescriptunsafeRun AppleScript. Reaches Mail, Notes, Reminders, Finder. Requires HS_MCP_TOOLS=all.
hs_ui_pressunsafePress a UI element found by hs_ui_inspect. Refuses to act without an expectLabel or expectRole from the inspection, and refuses when the element there no longer matches it. Requires HS_MCP_TOOLS=all.

hs_window_layout presets: left-half, `righ

Only the beginning is shown; read the rest in the repo