Skip to main content
Glama
Stillhand
by hanyi-code
README.md
# Stillhand

Background desktop automation for Windows, macOS and Linux, over MCP.

[简体中文](README.zh-CN.md) · [API reference](docs/API.md) · [Contributing](CONTRIBUTING.md)

Stillhand lets an MCP client discover application windows, inspect controls, click, fill fields, scroll and send window-directed keyboard input. It uses native operating-system adapters and keeps observation, target resolution, input and readback together in one queued step.

## Background by default

- Mouse actions use targeted background routes without moving the system pointer.
- Default keyboard input stays in the background. Foreground input must be explicitly selected within the authorized task; it is never an automatic fallback.
- Hidden or minimized windows are not automatically shown or restored to expose a target.
- Task authorization is delegated to the trusted MCP host, without extra application/action prompts by default. Unavailable background routes stop with a reason; uncertain input is never automatically replayed.

Control availability depends on the application, desktop session and OS permissions. Support for an operating system does not imply compatibility with every application. See [platform compatibility](docs/COMPATIBILITY.md).

## Getting started

Requires **Node.js 22+**, an interactive desktop session and a trusted MCP client supporting **stdio**.

| Platform | Native prerequisites |
| --- | --- |
| Windows | System .NET Framework 4 compiler/runtime; UI Automation |
| macOS | Xcode Command Line Tools; Accessibility and event-posting permission |
| Linux | Python 3, PyGObject and AT-SPI 2; Xlib for supported X11 keyboard routes |

Windows and macOS helpers are compiled from the included source on first use and cached locally. Linux uses system accessibility bindings. Stillhand does not install system prerequisites automatically.

```sh
git clone https://github.com/hanyi-code/stillhand.git
cd stillhand
```

Add the service to your MCP client's configuration, replacing the script path with your actual location:

```json
{
  "mcpServers": {
    "stillhand": {
      "command": "node",
      "args": ["/absolute/path/to/stillhand/server.mjs"]
    }
  }
}
```

Use your client's configuration format and restart or reload its MCP connection. Start with `devices`, then `windows` and `observe`. Run only tasks you have authorized through that client. Set `STILLHAND_APPROVAL_POLICY=prompt` for additional application and foreground-operation prompts; this optional mode requires MCP elicitation support.

The optional [Stillhand skill](skills/stillhand/SKILL.md) describes the agent workflow. The [native adapter guide](docs/NATIVE.md) covers prerequisites, permissions and custom executor configuration.

## Tools

| Tool | Purpose |
| --- | --- |
| `devices` | Check configured devices and native readiness |
| `windows` | Discover live application windows |
| `observe` | Read controls and state from an exact window |
| `click` | Invoke a selected control through an admitted background route |
| `fill` | Replace a field value and verify the observed value |
| `scroll` | Scroll a selected surface through an admitted background route |
| `perform` | Observe, locate, act and read back in one queued step |
| `keyboard` | Send keys, shortcuts or text to an exact window |

For concurrent workflows, use `perform` with an exact window and a unique selector taken from observed UI. One desktop serializes complete steps; distinct physical devices have independent queues. Workflows sharing an application or dialog still need a single owner.

A `verified` result confirms a specific check, not an entire business task. After an uncertain outcome, inspect current state before sending further input. See the [API reference](docs/API.md) for targeting, keyboard policies, outcomes and cancellation.

## Contribute

Bug reports, documentation improvements and focused pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR. Report security vulnerabilities through the [security policy](SECURITY.md).

[Changelog](CHANGELOG.md) · [Maintainer guide](docs/MAINTAINING.md) · [MIT license](LICENSE) · [Third-party notices](THIRD_PARTY_NOTICES.md)