P

Pir MCP

by Solteris-Dev · io.github.Solteris-Dev/pir-mcp

Enables AI agents to monitor screen regions for changes or stillness, returning numeric scores and timestamps instead of pixels, so agents can wait for activity or detect frozen UI without capturing images.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-solteris-dev-pir-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "pir-mcp"
      ],
      "env": {
        "PIR_CAPTURE_CMD": "<VALUE>",
        "PIR_SELECT_CMD": "<VALUE>",
        "PIR_WINDOW_GEOMETRY_CMD": "<VALUE>",
        "PIR_PICK_WINDOW_CMD": "<VALUE>",
        "PIR_MAX_WAIT_MS": "540000",
        "PIR_REGIONS": "<VALUE>",
        "PIR_MAX_CELLS": "64",
        "PIR_THRESHOLD": "0.05",
        "PIR_INTERVAL_MS": "500",
        "PIR_DEFAULT_WAIT_MS": "55000",
        "PIR_SELECT_TIMEOUT_MS": "60000",
        "PIR_CAPTURE_TIMEOUT_MS": "10000"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-solteris-dev-pir-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "pir-mcp"
      ],
      "env": {
        "PIR_CAPTURE_CMD": "<VALUE>",
        "PIR_SELECT_CMD": "<VALUE>",
        "PIR_WINDOW_GEOMETRY_CMD": "<VALUE>",
        "PIR_PICK_WINDOW_CMD": "<VALUE>",
        "PIR_MAX_WAIT_MS": "540000",
        "PIR_REGIONS": "<VALUE>",
        "PIR_MAX_CELLS": "64",
        "PIR_THRESHOLD": "0.05",
        "PIR_INTERVAL_MS": "500",
        "PIR_DEFAULT_WAIT_MS": "55000",
        "PIR_SELECT_TIMEOUT_MS": "60000",
        "PIR_CAPTURE_TIMEOUT_MS": "10000"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-solteris-dev-pir-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "pir-mcp"
      ],
      "env": {
        "PIR_CAPTURE_CMD": "<VALUE>",
        "PIR_SELECT_CMD": "<VALUE>",
        "PIR_WINDOW_GEOMETRY_CMD": "<VALUE>",
        "PIR_PICK_WINDOW_CMD": "<VALUE>",
        "PIR_MAX_WAIT_MS": "540000",
        "PIR_REGIONS": "<VALUE>",
        "PIR_MAX_CELLS": "64",
        "PIR_THRESHOLD": "0.05",
        "PIR_INTERVAL_MS": "500",
        "PIR_DEFAULT_WAIT_MS": "55000",
        "PIR_SELECT_TIMEOUT_MS": "60000",
        "PIR_CAPTURE_TIMEOUT_MS": "10000"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-solteris-dev-pir-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "pir-mcp"
      ],
      "env": {
        "PIR_CAPTURE_CMD": "<VALUE>",
        "PIR_SELECT_CMD": "<VALUE>",
        "PIR_WINDOW_GEOMETRY_CMD": "<VALUE>",
        "PIR_PICK_WINDOW_CMD": "<VALUE>",
        "PIR_MAX_WAIT_MS": "540000",
        "PIR_REGIONS": "<VALUE>",
        "PIR_MAX_CELLS": "64",
        "PIR_THRESHOLD": "0.05",
        "PIR_INTERVAL_MS": "500",
        "PIR_DEFAULT_WAIT_MS": "55000",
        "PIR_SELECT_TIMEOUT_MS": "60000",
        "PIR_CAPTURE_TIMEOUT_MS": "10000"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-solteris-dev-pir-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "pir-mcp"
      ],
      "env": {
        "PIR_CAPTURE_CMD": "<VALUE>",
        "PIR_SELECT_CMD": "<VALUE>",
        "PIR_WINDOW_GEOMETRY_CMD": "<VALUE>",
        "PIR_PICK_WINDOW_CMD": "<VALUE>",
        "PIR_MAX_WAIT_MS": "540000",
        "PIR_REGIONS": "<VALUE>",
        "PIR_MAX_CELLS": "64",
        "PIR_THRESHOLD": "0.05",
        "PIR_INTERVAL_MS": "500",
        "PIR_DEFAULT_WAIT_MS": "55000",
        "PIR_SELECT_TIMEOUT_MS": "60000",
        "PIR_CAPTURE_TIMEOUT_MS": "10000"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-solteris-dev-pir-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "pir-mcp"
      ],
      "env": {
        "PIR_CAPTURE_CMD": "<VALUE>",
        "PIR_SELECT_CMD": "<VALUE>",
        "PIR_WINDOW_GEOMETRY_CMD": "<VALUE>",
        "PIR_PICK_WINDOW_CMD": "<VALUE>",
        "PIR_MAX_WAIT_MS": "540000",
        "PIR_REGIONS": "<VALUE>",
        "PIR_MAX_CELLS": "64",
        "PIR_THRESHOLD": "0.05",
        "PIR_INTERVAL_MS": "500",
        "PIR_DEFAULT_WAIT_MS": "55000",
        "PIR_SELECT_TIMEOUT_MS": "60000",
        "PIR_CAPTURE_TIMEOUT_MS": "10000"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
PIR_CAPTURE_CMD No Template for the capture command; {x} {y} {w} {h} are substituted. Must print a binary PPM (P6) to stdout. Default depends on platform (e.g., grim on wlroots).
PIR_SELECT_CMD No Command for selecting a region; must print 'x,y wxh'. Set to an empty string to remove those tools entirely. Default depends on platform (e.g., slurp on wlroots).
PIR_WINDOW_GEOMETRY_CMD No Command to get a window's geometry; gets {id} substituted and must print 'x,y wxh'. Default is Hyprland-specific logic.
PIR_PICK_WINDOW_CMD No Command to let a person pick a window; must print the chosen window's id. Default is Hyprland-specific logic.
PIR_MAX_WAIT_MS No Cap for blocking calls in milliseconds. Default: 540000
PIR_REGIONS No Path to a JSON file containing regions to define at startup.
PIR_MAX_CELLS No Grid resolution on the long side; smaller is coarser and more private. Default: 64
PIR_THRESHOLD No Default change threshold. Default: 0.05
PIR_INTERVAL_MS No Default sampling period in milliseconds. Default: 500
PIR_DEFAULT_WAIT_MS No Default timeout for blocking calls in milliseconds. Default: 55000
PIR_SELECT_TIMEOUT_MS No How long the person has to draw a selection in milliseconds. Default: 60000
PIR_CAPTURE_TIMEOUT_MS No How long one capture may take in milliseconds. Default: 10000

Similar servers