MCP.Market

Hammerspoon MCP server

by vukvukovich·io.github.vukvukovich/hammerspoon-mcp·v0.4.0·1 stars

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

A88/100grade A
What users say
No reviews yet
Be the first
Safety scan
A88/100

full report

Adoption
Growing

1 stars87 downloads/wk

Reviews

Write one

Nobody has reviewed Hammerspoon yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Hammerspoon tools

No tool declarations could be read from the package source. They show once the server is installed.

Public scan report

scanner v0.1.10 · 2026-11-03 · same rubric, same numbers if you re-run it

no findings
  • Code scan67 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 36 days ago12/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 88/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Hammerspoon compares

Against every graded Web search MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
88/100
higher than 80% of 3,470 Web search servers
GitHub stars
1
more than 55% of 1,786 Web search servers
Downloads a week
87
more than 53% of 827 Web search servers with a package

Install Hammerspoon in Claude Code, Cursor or VS Code

Runs npx -y @vukvukovich/hammerspoon-mcp on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add hammerspoon-mcp -- npx -y @vukvukovich/hammerspoon-mcp
Add to Cursor

What the publisher says

From the Hammerspoon repository's README, as published. We do not edit it. Read it on GitHub

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 HSMCPTOOLS=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 hseval, but it is off unless you set HSMCP_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:

can look up the real signature of hs.window.moveToUnit instead of guessing.

  • hsapisearch searches Hammerspoon's bundled API documentation, so the agent

own errors.

  • hsconsoletail reads back the Hammerspoon console, so the agent can see its
  • hsreloadconfig reloads init.lua after an edit.

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Hammerspoon: common questions

Is Hammerspoon MCP server safe?
Yes, by our scan: it is graded A (88/100). Read the Hammerspoon safety report
How do I install Hammerspoon?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Hammerspoon need an API key?
No secret keys are declared. It reads 5 settings from the environment.
Is Hammerspoon maintained?
The last commit was 36 days ago (2026-09-29). The latest release is v0.4.0.
What can I use instead of Hammerspoon?
Servers from other publishers that do the same job: Everything Search MCP server, Zoteus MCP server and Apple Notes MCP server.
How does Hammerspoon compare with other Web search MCP servers?
safety score 88/100 (higher than 80% of 3,470 Web search servers); github stars 1 (more than 55% of 1,786 Web search servers); downloads a week 87 (more than 53% of 827 Web search servers with a package). Full comparison.

Alternatives to Hammerspoon

Same job from other publishers: the closest match first, then the best rated.

  • Everything Search
    Fast file search: Everything SDK on Windows, Spotlight (mdfind) on macOS, locate/plocate on Linux.
    A
  • Zoteus
    Zotero MCP server for Claude and ChatGPT: search, citations, safe writes, PDF passages and pages.
    A
  • Apple Notes
    Inspect, search, create, edit, move, and organize notes in Apple Notes on macOS.
    A