A-Eyes

A-Eyes

MCP server enabling Claude Code to capture screenshots of Windows applications through WSL2, allowing AI to diagnose UI errors and verify layouts.

Category
Visit Server

README

A-Eyes

CI License: MIT Node.js TypeScript MCP Platform: Windows + WSL2

Claude Code can read files and run commands, but it cannot see what is on your screen. A-Eyes closes that gap: it is an MCP server that lets Claude Code capture screenshots of Windows applications through WSL2 — so it can diagnose UI errors, verify layouts, or answer questions about what you are looking at. The Windows equivalent of Peekaboo (macOS).

Security Model

A-Eyes treats screenshot access as a security-sensitive operation. The design assumes that an AI agent requesting screen captures should be constrained by default, not trusted by default.

Deny-by-default access control. Without an explicit allowlist in a-eyes.config.json, every capture request is blocked. There is no "capture everything" mode. The operator decides which windows are accessible — the AI agent cannot override this.

Tamper-resistant audit logging. Every tool invocation (capture, query, list_windows, see, check_status, setup) is logged to ~/.a-eyes/logs/audit-YYYY-MM-DD.jsonl — append-only, daily rotation. There is no MCP tool to read, modify, or delete these logs. The AI agent can only access them through filesystem tools that the operator can deny at the permission prompt. Each log entry records timestamp, tool name, parameters, result status, and execution duration.

No shell interpolation. Window titles are passed as execFile argv arrays, never interpolated into shell command strings. This eliminates command injection through crafted window titles — a realistic attack vector when an AI agent chooses which windows to capture.

Schema-validated inputs. All MCP tool parameters are validated through Zod schemas before any processing. Malformed requests fail at the boundary, not inside business logic.

Architecture

Claude Code  ──MCP/stdio──►  A-Eyes Server (TypeScript, WSL2)
                                    │
                              powershell.exe (execFile, argv)
                                    │
                              Win32 API (FindWindow, PrintWindow)
                                    │
                              PNG/JPEG or UI element tree ──base64/text──► returned to Claude Code

The server runs inside WSL2 and calls Windows PowerShell scripts through WSL interop. Screenshots never touch the filesystem unless explicitly configured — they are returned as base64-encoded PNG data over the MCP stdio transport.

Tools

Tool Description
capture Screenshot a window by title or process name. Optionally save to disk via output_path. Supports max_width for resize, crop for regions, and format/quality for JPEG output.
see Capture a window and return its full UI element tree (buttons, fields, labels, menus) via Windows UI Automation, plus all visible text. Use this to understand application state without asking a specific question.
list_windows List all visible windows. Shows +/- markers for capturable vs. blocked.
query Capture a screenshot and forward a question about its content to Claude. Same parameters as capture.
check_status Health check: verifies config, WSL interop, and script availability.
setup Interactive first-run setup: preview open windows and create an allowlist config.

Quick Start

Requirements: WSL2 on Windows 10/11, Node.js 18+

1. Clone and install

git clone https://github.com/florian-priegnitz/a-eyes.git
cd a-eyes
./install.sh

The install script installs dependencies, builds the project, registers A-Eyes as a global MCP server (claude mcp add -s user), and runs a health check.

2. Configure allowlist

Restart Claude Code, then ask:

"Run the a-eyes setup tool"

This shows your open windows and lets you create an allowlist. Without an allowlist, all captures are blocked.

Then try: "Take a screenshot of Chrome" or "What windows are open?"

Verify

node dist/index.js --check

Or inside Claude Code: use the check_status tool, or check /mcp → "Manage MCP servers" — A-Eyes should show connected with 6 tools.

Manual installation

If you prefer not to use the install script:

pnpm install && pnpm build
claude mcp add a-eyes -s user -- node $(pwd)/dist/index.js

Or create .mcp.json in a project root for per-project registration:

{
  "mcpServers": {
    "a-eyes": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/a-eyes/dist/index.js"],
      "cwd": "/path/to/a-eyes"
    }
  }
}

Note: Use WSL paths (/mnt/c/...), not Windows paths (C:\...). The cwd field ensures the server finds its PowerShell scripts.

Configuration

A-Eyes searches for config in order: ./a-eyes.config.json (cwd) → <package-root>/a-eyes.config.json~/.a-eyes/config.json (user home) → deny-all defaults.

{
  "allowlist": ["Chrome", "VS Code", "Firefox"],
  "save_screenshots": false,
  "screenshot_dir": "./screenshots"
}
Option Default Description
allowlist [] Window title or process name substrings that are allowed for capture. Empty = all blocked.
save_screenshots false Auto-save every capture to screenshot_dir.
screenshot_dir "./screenshots" Target directory for auto-saved PNGs.
max_captures_per_minute 0 Rate limit for capture/query calls. 0 = unlimited.

Testing

pnpm test           # 189 tests across 14 files
pnpm lint           # Biome linter + formatter

Test coverage includes: config loading and search chain, capture/list-windows PowerShell integration, process name matching, audit log file rotation and append behavior, server-level tool handler responses for success, blocked, and error paths, rate limiting, WSL path conversion edge cases.

Troubleshooting

How do I know it's working? Run node dist/index.js --check for a full health check (config, WSL interop, scripts). Inside Claude Code, use the check_status tool or check /mcp → "Manage MCP servers".

Exec format error when calling PowerShell: WSL interop is disabled. Run wsl --shutdown from Windows CMD/PowerShell, then restart your distro.

"No allowlist configured": Use the setup tool in Claude Code, or create a-eyes.config.json manually with an allowlist array.

Quick WSL interop check (run inside WSL):

test -e /proc/sys/fs/binfmt_misc/WSLInterop && echo OK || echo MISSING

Author

Built by Florian Priegnitz, Information Security Consultant at SECURAM Consulting, Hamburg. Focus areas: ISO 27001, AI governance, and security tooling. More projects on GitHub.

Related project: Compliance Intelligence Dashboard — a DORA/ISO 27001/NIS-2 gap analysis tool with AI-assisted compliance scoring.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured