Skip to main content
Glama

ai-screen

tests

I wanted my AI agent to help me in the programs I actually use, not in some browser it starts on its own in the background. So I built ai-screen. You give the agent one of your windows (Chrome, Explorer, Excel, Telegram, the ancient accounting app at work, anything) and it reads what's there, clicks, types and points at what it found while you watch.

Windows 10/11 and Linux (X11). It plugs into Claude Code as a skill, into anything that speaks MCP (Codex, Cursor, Claude Desktop, Gemini CLI), or you can hand the CLI to any agent with a shell.

Русская версия

The agent fills in an order in a desktop app: types into fields by their labels, adds a line, saves, highlights the total

How it works

Before the agent touches a window, ai-screen asks you. Click Allow and a thin glowing frame appears around that window: the agent works there and nowhere else. Ctrl+Alt+Q stops it at any moment.

Most of the time the agent doesn't need screenshots at all. Windows already describe themselves through the accessibility API (the same one screen readers use), so ai-screen gives the agent a plain text list of buttons, fields and labels in about 0.15 s. The agent says click --text 'Save' instead of guessing pixels, and it can send a few steps at once with a check after each, so a broken step stops the chain instead of clicking on blindly. Screenshots and OCR are still there for charts, pictures and apps that draw everything themselves. Asking for one element costs about 10 tokens, a screenshot of the same window 400 to 1,400; dumping a whole big window as text isn't cheaper than a screenshot, so the agent mostly asks for what it needs. Numbers: bench/RESULTS.md.

How is this different from Playwright MCP, browser-use and friends? Those drive a browser they launch themselves. ai-screen works in the windows you already have open, desktop apps included, and with your logins. Screenshot-based "computer use" agents send an image to the model on every step; here that's the exception.

The same in a browser: the agent searches a shop page, adds headphones to the cart and finds the new total.

The agent in a browser: search, add to cart, select the new total

Related MCP server: Windows-MCP

Getting started

Tell your agent:

Install the ai-screen skill from https://github.com/Shpik-code/ai-screen

That's it. Claude Code sets it up as a skill, Codex, Cursor and other MCP clients add it as an MCP server. Then ask for something real, like "add the headphones to the cart in my Chrome and tell me the total", and click Allow when ai-screen asks.

Agent installing this: if you are Claude Code, use the skill installer below. If you are an MCP client (Codex, Cursor, Claude Desktop, Gemini CLI), add the MCP config below to your own config file. Then run doctor, show the user its result, and tell them to restart the session so the skill or the server gets loaded.

As a skill (Claude Code, and other agents that read SKILL.md): clone and run the installer. It copies the skill to ~/.claude/skills/ai-screen (another folder: -Dest DIR / --dest DIR), keeps your settings on updates, adds the ai-screen app to the Start menu and prints an MCP config.

git clone https://github.com/Shpik-code/ai-screen; cd ai-screen
powershell -ExecutionPolicy Bypass -File .\install.ps1     # Windows
./install.sh                                               # Linux

On Linux it may ask for sudo apt install python3-pil python3-xlib python3-tk python3-gi gir1.2-atspi-2.0.

As an MCP server: with uv nothing else needs installing.

{
  "mcpServers": {
    "ai-screen": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Shpik-code/ai-screen", "ai-screen-mcp"]
    }
  }
}

That goes into claude_desktop_config.json, ~/.cursor/mcp.json or ~/.gemini/settings.json. Codex, in ~/.codex/config.toml:

[mcp_servers.ai-screen]
command = "uvx"
args = ["--from", "git+https://github.com/Shpik-code/ai-screen", "ai-screen-mcp"]

No uv? pip install git+https://github.com/Shpik-code/ai-screen, then "command": "ai-screen-mcp".

Any other agent with a shell: point it to SKILL.md and let it run scripts/screenctl (PowerShell: python scripts\screenctl.py).

If something's off, python scripts/screenctl.py doctor (or screenctl doctor) tells you what.

What the agent gets

A small CLI called screenctl (the MCP server wraps the same commands). A few of them:

screenctl select window excel           # asks you once for this window
screenctl see                           # what's in the window, as text with coordinates
screenctl click --text 'Save' --role button
screenctl type --into 'File name' 'report.xlsx'
screenctl page --grep price             # a whole web page as text, the part below the fold too
screenctl goto example.com/cart         # open an address in that browser window
screenctl batch <<'EOF'
click --text 'Next'
expect --text 'Payment' --timeout 8
highlight --text 'Total' --say 'here it is' --point
EOF
screenctl shot                          # a screenshot, for when text isn't enough
screenctl done                          # frame off, access closed, screenshots deleted

screenctl --help has the rest. SKILL.md is the guide the agent reads, worth a look if you want to know how it's told to behave.

Is it safe?

Safer than letting an agent loose on your desktop, but it's not a sandbox, and I'd rather say that upfront.

What it does: nothing happens until you click Allow. Input goes only into the allowed window and its own dialogs, and if another window pops up on top, the click is refused. The agent can't press Win combinations, Alt+Tab or Alt+F4, and on Windows it can't click the permission dialog itself. Access ends when the agent says it's done, when you press Ctrl+Alt+Q, or after 10 quiet minutes.

What it doesn't: an agent that can run arbitrary code as your user can get around all of this, so don't give a shell to an agent you don't trust. "Ask before paying" and "ignore instructions written on web pages" are rules in the agent's guide, not hard checks. Anything the agent reads ends up with your model provider. And don't hand it your terminal or your password manager.

More in SECURITY.md.

Settings

config.json lives in the skill folder (or %APPDATA%\ai-screen\ / ~/.config/ai-screen/ after a pip install). The app has a settings screen for the common ones.

key

what it does

confirm

window (default) asks once per window, each asks for every command, session asks once per target for session_minutes

language

auto, en or ru for the dialogs and the app

dialog_timeout_s

how long a request waits for you (10 to 600 s), no answer means no

stop_hotkey

ctrl+alt+q by default

overlay_idle_minutes

after this many idle minutes access ends

mouse_speed, scroll_speed, typing_speed

0.25 to 4

overlay_style

cosmic, minimal or bright

On Windows, pip install "ai-screen[ocr] @ git+https://github.com/Shpik-code/ai-screen" makes OCR a lot faster.

Not there yet

No macOS and no Wayland. Windows running as administrator and UAC prompts are out of reach. Games and apps that paint everything themselves don't expose text, so there it's OCR and screenshots.

Contributing

Bug reports and PRs are welcome. Tests run without a display: python -m unittest discover -s tests. See CONTRIBUTING.md. MIT licensed.

Available Tools

3 tools
screenA

Run one ai-screen (screenctl) command in the user's chosen window. Examples: "select window firefox", "see", "page --grep price", "find 'Sign in'", "click --text 'Sign in' --role button", "type --into Email user@mail.com", "goto example.com", "mark --text 'Total'", "shot", "done". Read the screen_guide tool first. Exit codes: 0 ok, 2 error, 3 denied/stopped by the user (stop and ask), 4 a find/wait/expect condition is not met (re-plan).

Inputs: command (required), stdin.

screen_batchA

Run several screenctl steps, one per line (POSIX quoting), as one action with one permission check. Put expect --text '…' after steps that change the page: the batch stops there with exit 4 and prints what is on screen. Not allowed inside: select, ui.

Inputs: steps (required).

screen_guideA

How to use ai-screen well (fast text-first workflow, rules, exit codes). Read once before use.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation4/5

    The three tools have distinct roles: single-command execution (screen), batched multi-step execution (screen_batch), and documentation (screen_guide). The main risk is screen vs screen_batch, but descriptions make the boundary clear ('one command' vs 'several steps, one permission check'). The only residual ambiguity is that `screen` silently absorbs dozens of subcommands, so an agent must infer which subcommand fits a task.

    Naming Consistency4/5

    All names use snake_case with a shared `screen` root plus a clear suffix (`_batch`, `_guide`), which is a predictable pattern. The bare `screen` base name alongside suffixed variants is a minor deviation from a strict verb_noun convention, but it reads cleanly and maps well to the underlying `screenctl` CLI.

    Tool Count4/5

    Three tools is at the low end but justified here because breadth lives inside the CLI passthrough rather than in the tool list. Splitting further (one tool per subcommand) would be worse, and adding more would be redundant; it is minimal but each tool earns its place.

    Completeness4/5

    The set covers the full workflow: one-off actions, batched steps with expect-gating and exit-4 feedback, plus an onboarding guide and documented exit codes for re-planning. Minor gap: there is no dedicated discovery/state tool (e.g. listing windows or available subcommands) beyond what screen_guide and `select window` provide, so agents rely on out-of-band knowledge for introspection.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Lets AI agents see and control desktop applications through the accessibility layer, enabling clicking, typing, scrolling, dragging, and window/app management across macOS, Windows, and Linux entirely on the local machine.
      27
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to natively control the Windows desktop—navigating files, launching and managing applications, simulating keyboard and mouse input, and interacting with UI elements for tasks like QA testing. Works with any LLM without specialized vision models, exposing tools for capturing window/UI state and driving web page content through a DOM-focused mode.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to control the Windows operating system natively, performing file navigation, application launching and window control, keyboard/mouse input, UI state capture, and QA testing. It works with any LLM without relying on computer vision or fine-tuned models, and includes a DOM mode for browser automation.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to natively control the Windows desktop by opening apps, managing windows, simulating mouse and keyboard input, and inspecting UI state for tasks like file navigation, UI interaction, and QA testing. Works with any LLM, with an optional DOM mode for cleaner browser automation.
      MIT