Skip to main content
Glama

Claude Vision MCP

A Model Context Protocol server that gives Claude Code the ability to see — capturing the screen, individual windows, screen regions, and live web pages, plus comparing screenshots for visual-regression checks.

Built so an AI coding agent can verify its own visual output: render a UI change, screenshot it, and look at the result instead of guessing.

Features

Six tools, exposed over MCP via FastMCP:

  • capture_screen — screenshot the full screen or a specific display, with token-aware downscaling.

  • capture_window_tool — screenshot a single window by (partial, case-insensitive) title or app name.

  • capture_screen_region — screenshot an arbitrary rectangular region by coordinates.

  • capture_webpage_tool — screenshot any URL (including localhost dev servers) via a headless Playwright browser; supports full-page capture and waiting on a CSS selector.

  • compare_screenshots — diff two images and report the percentage and region of changed pixels (visual regression).

  • list_windows — list all open windows as Application | Window Title to find a capture target.

Related MCP server: Browsershot MCP

Requirements

  • Python ≥ 3.10

  • macOS (window capture uses AppleScript; screen capture needs Screen Recording permission)

  • Dependencies: mcp[cli], Pillow, playwright, numpy

Install

git clone https://github.com/wonderstone843/claude-vision-mcp.git
cd claude-vision-mcp
pip install -e .
playwright install chromium   # only needed for capture_webpage_tool

Grant Screen Recording permission to your terminal in System Settings → Privacy & Security → Screen Recording.

Use with Claude Code

Register the server (stdio):

claude mcp add claude-vision -- claude-vision-mcp

Or add it to your MCP config manually:

{
  "mcpServers": {
    "claude-vision": {
      "command": "claude-vision-mcp"
    }
  }
}

Then ask Claude to, e.g., "screenshot localhost:3000 and check the hero section renders," or "capture the Blender window."

Project layout

claude_vision_mcp/
  server.py     # FastMCP server + the 6 tool definitions
  capture.py    # full-screen / window / region capture
  windows.py    # AppleScript window enumeration
  browser.py    # Playwright headless webpage capture
  compare.py    # pixel-diff comparison

License

MIT — see LICENSE.

Author: Joshua Penn

Available Tools

6 tools
capture_screenA

Capture a screenshot of the full screen or a specific display.

Parameters:

  • display: Display number (0 = all displays combined, 1 = main, 2 = secondary). Default 0.

  • max_size: Maximum pixel dimension for the largest side. Default 800. Smaller = faster + fewer tokens. Use 400 for quick checks, 1200 for detail.

Returns the screenshot as an Image. Requires Screen Recording permission in macOS System Settings.

Inputs: display, max_size.

capture_screen_regionA

Capture a specific rectangular region of the screen.

Parameters:

  • x: Left edge coordinate in pixels (0 = left edge of screen).

  • y: Top edge coordinate in pixels (0 = top edge of screen).

  • width: Width of the region in pixels.

  • height: Height of the region in pixels.

  • max_size: Maximum pixel dimension for the output. Default 800.

Use capture_screen first to see the full screen and identify coordinates. Returns the captured region as an Image.

Inputs: x (required), y (required), width (required), height (required), +1 more.

capture_webpage_toolA

Capture a screenshot of a web page using a headless browser.

Useful for capturing local dev servers (localhost), web apps, or any URL. The browser launches on first use and stays running for subsequent captures.

Parameters:

  • url: The URL to capture (e.g., "http://localhost:3000", "https://example.com").

  • viewport_width: Browser viewport width in pixels. Default 1280.

  • viewport_height: Browser viewport height in pixels. Default 720.

  • max_size: Maximum pixel dimension for the output. Default 800.

  • full_page: If true, capture the entire scrollable page. Default false.

  • wait_for_selector: Optional CSS selector to wait for before capturing (e.g., "#main-content", ".loaded"). Leave empty to skip.

Returns the web page screenshot as an Image.

Inputs: url (required), max_size, full_page, viewport_width, +2 more.

capture_window_toolA

Capture a screenshot of a specific window by its title.

Searches for a window whose title contains the given text (case-insensitive). Also matches against application name. Use list_windows() first to see available windows.

Parameters:

  • window_title: Full or partial window title to match (e.g., "Firefox", "Terminal", "Blender"). Also matches application names.

  • max_size: Maximum pixel dimension for the largest side. Default 800.

Returns the screenshot as an Image. If no match is found, returns an error listing available windows.

Inputs: window_title (required), max_size.

compare_screenshotsA

Compare two screenshots and describe visual differences.

Analyzes pixel differences between two images and reports the percentage of changed pixels and the region of change.

Useful for:

  • Verifying UI changes after code edits

  • Checking before/after visual regression

  • Confirming rendering output differences

Parameters:

  • image_path_1: Absolute path to the first (baseline) image.

  • image_path_2: Absolute path to the second (comparison) image.

  • max_size: Maximum pixel dimension for analysis. Default 800.

Returns a text description of the differences found.

Inputs: image_path_1 (required), image_path_2 (required), max_size. Returns: result

list_windowsA

List all open windows with their application names and titles.

Use this to find the correct window title before calling capture_window_tool. Returns a formatted list showing 'Application | Window Title' for each open window.

No parameters required.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: capturing different screen sources (full, region, webpage, window), comparing images, or listing windows. No overlapping functionality.

    Naming Consistency4/5

    Most tools follow a 'capture_' prefix pattern, but capture_webpage_tool and capture_window_tool have an inconsistent '_tool' suffix, and compare_screenshots and list_windows use different verb forms.

    Tool Count5/5

    6 tools is well-scoped for a vision capture server, covering core capture methods plus comparison and window listing without excess.

    Completeness4/5

    Covers all major capture scenarios (screen, region, window, webpage) and adds comparison and window listing. Minor gap: no tool to list displays or get screen dimensions, but all essential workflows are present.

    Related MCP Connectors

    Related MCP Servers