pir-mcp

v0.1.0
io.github.Solteris-Dev/pir-mcp Checked 4 days ago Published 2 months ago

Motion sensor for AI agents: tells when a screen region changes or goes still.

Values you need

VariableWhat it is
PIR_CAPTURE_CMDoptional Screenshot command template writing binary PPM to stdout; {x} {y} {w} {h} substituted. Default: grim (wlroots).
PIR_SELECT_CMDoptional Interactive rectangle selector printing 'x,y wxh'. Default: slurp. Empty disables the pick tools.
PIR_WINDOW_GEOMETRY_CMDoptional Prints 'x,y wxh' for window {id}. Default: Hyprland via jq. Empty disables window regions.
PIR_PICK_WINDOW_CMDoptional Interactive window pick printing the window id. Default: Hyprland + slurp.
PIR_MAX_WAIT_MSoptional Cap for blocking calls, ms (default 540000); keep under the host's MCP tool timeout.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add pir-mcp -- npx -y pir-mcp@0.1.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "pir-mcp": {
      "args": [
        "-y",
        "pir-mcp@0.1.0"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "pir-mcp": {
      "args": [
        "-y",
        "pir-mcp@0.1.0"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "pir-mcp": {
      "args": [
        "-y",
        "pir-mcp@0.1.0"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.pir-mcp]
command = "npx"
args = ["-y", "pir-mcp@0.1.0"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: pir_define_region, pir_define_window, pir_pick_window, pir_pick_region, pir_pick_mask, pir_list_regions, pir_remove_region, pir_sample, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json