npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mcp-s/computer-use-mcp

v1.1.0

Published

Willow Computer Use: an MCP server that lets AI agents see and operate macOS apps through the Accessibility API.

Readme

Willow Computer Use MCP

An MCP server that lets AI agents see and operate macOS apps: read an app's accessibility tree, take a screenshot of its window, then click, type, scroll, drag, paste and set values.

It runs entirely on your Mac using the macOS Accessibility API, CoreGraphics input events and screencapture. No API keys, no cloud service.

Requirements

  • macOS 13 or later (Apple silicon or Intel)
  • Node.js 18+

MCP client configuration

{
  "mcpServers": {
    "computer-use": {
      "command": "npx",
      "args": ["-y", "@mcp-s/computer-use-mcp"]
    }
  }
}

Permissions

macOS grants these permissions to the app that launches the server (Cursor, Claude, your terminal), not to the server itself. On first use macOS prompts for them; you can also turn them on ahead of time.

| Permission | Where | Needed for | | --- | --- | --- | | Accessibility | System Settings > Privacy & Security > Accessibility | Reading the UI tree and every action | | Screen Recording | System Settings > Privacy & Security > Screen & System Audio Recording | Screenshots in get_app_state |

Restart the host app after granting a permission. Without Screen Recording the tools still work, but get_app_state returns the tree only.

Tools

| Tool | What it does | | --- | --- | | list_apps | Running apps plus apps installed in the Applications folders | | get_app_state | Launches the app if needed; returns its accessibility tree (numbered elements) and a window screenshot | | click | Click an element by element_index, or a point by x/y; button, click count, held modifiers | | drag | Drag between two screenshot points | | paste | Paste text, md or html through the clipboard, then restore the clipboard | | perform_secondary_action | Run an accessibility action an element exposes (Show Menu, Increment, Cancel, Raise…) | | press_key | Key or combination in xdotool syntax: Return, Tab, super+c, ctrl+shift+t, KP_0 | | scroll | Scroll an element, a point or the window by a number of pages | | select_text | Select text in an editable element, or put the cursor before or after it | | set_value | Set a text field, slider or checkbox value directly | | type_text | Type literal text with the keyboard |

How agents should use it

  1. Call get_app_state with the app name ("Safari"), bundle id ("com.apple.Safari") or .app path.
  2. Act using the element numbers from the tree. Fall back to screenshot x/y when the tree is incomplete.
  3. Call get_app_state again after acting. Element numbers only apply to the latest state.

The server sends these instructions, plus a confirmation policy for risky actions (deleting data, sending messages, purchases, changing settings), to the client when it connects.

Behaviour to know about

  • Everything runs in the background. The target app is never brought to the front and the real cursor and keyboard are never used, so you can keep working while an agent drives an app.
  • macOS apps ignore mouse events posted to them while they are in the background, so mouse actions are carried out through accessibility instead:
    • click presses the button, link or menu item under the point, places the cursor in a text field (double click selects a word, triple click a paragraph), and right click opens the element's context menu.
    • drag inside a text field selects the text between the two points.
    • scroll uses the scroll area's page actions or scroll bar, and falls back to Page Up/Page Down keys.
    • Clicks and drags on anything else (canvases, custom controls) are still posted as mouse events, and the result tells the agent they may have been ignored.
  • type_text and paste insert into the focused field through accessibility, falling back to keystrokes. press_key posts keys to the app's process; plain keys work, but some apps ignore shortcuts such as Cmd+V while in the background. When a formatted paste is ignored, the text is inserted as plain text and the result says so. Your clipboard is restored either way.
  • When a launched app brings itself to the front (some Chromium browsers do), focus is handed back to the app you were using.
  • Screenshots are scaled so 1 pixel is 1 point (capped at 1600 px on the long side), and coordinates are relative to the window's top-left.
  • For Chrome, Edge, Brave, Arc and Electron apps the server turns on their full accessibility tree the first time it reads them.
  • Password managers and Keychain Access are blocked.

How it works

The npm package ships a small universal Swift binary (bin/computer-use-helper). The Node MCP server starts it once and sends it JSON requests over stdin and stdout. The helper keeps the element references from the last get_app_state per app, which is what element_index points to.

Development

npm install
npm run typecheck   # TypeScript + Swift type check
npm run build       # universal Swift helper + TypeScript
npm run smoke       # MCP handshake, tool list, list_apps

Source layout:

  • src/ — MCP server (index.ts), helper process bridge (helper.ts), client instructions
  • native/ — Swift helper: accessibility tree, screenshots, input events, key parsing
  • scripts/build-helper.sh — builds arm64 and x86_64, merges them with lipo, ad-hoc signs

To release, bump version in package.json and merge to main. When CI passes, tag-release.yml tags v<version> and release.yml builds on macOS (it compiles the Swift helper) and publishes to npm.