Skip to main content
Glama

mcp-screenshot

License: MIT MCP macOS

A Model Context Protocol (MCP) server that provides screen capture capabilities on macOS. Enables AI assistants like Claude to take screenshots of your display for visual debugging, UI verification, and more.

Features

  • Full screen capture (single or multi-monitor)

  • Region capture by pixel coordinates

  • Returns images as base64-encoded PNG

  • Zero external dependencies beyond macOS built-in screencapture

  • Lightweight stdio transport

Related MCP server: Screen View MCP

Prerequisites

  • macOS (uses the native screencapture CLI)

  • Node.js >= 18

  • Screen Recording permission granted to your terminal or IDE

Quick Start

1. Clone and install

git clone https://github.com/zhandos717/mcp-screenshot.git
cd mcp-screenshot
npm install

2. Add to your MCP client

Add the following to your MCP configuration file (e.g. ~/.mcp.json for Claude Code):

{
  "mcpServers": {
    "screenshot": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/mcp-screenshot/src/index.ts"]
    }
  }
}

3. Grant screen recording permission

Go to System Settings > Privacy & Security > Screen Recording and enable access for your terminal app (Terminal, iTerm2, Warp, etc.) or IDE.

4. Restart your MCP client

Restart Claude Code (or your MCP host) to pick up the new server.

Available Tools

Tool

Description

Parameters

screenshot_fullscreen

Capture the entire screen as PNG

display (optional) — display number, 1 = main

screenshot_region

Capture a rectangular region as PNG

x, y, width, height — all in pixels

Example usage with Claude Code

You: "Look at my screen, something looks off with the layout"
Claude: [calls screenshot_fullscreen] I can see the issue — the sidebar is overlapping...

You: "Capture the top-left 500x500 area"
Claude: [calls screenshot_region with x=0, y=0, width=500, height=500]

Configuration

Multi-monitor setup

Pass the display parameter to screenshot_fullscreen:

  • 1 — main display (default)

  • 2, 3, ... — additional displays

Alternative: run with compiled JS

npm run build

Then update your MCP config:

{
  "mcpServers": {
    "screenshot": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-screenshot/dist/index.js"]
    }
  }
}

How It Works

MCP Client (Claude Code)
    │
    │  stdio (JSON-RPC)
    ▼
mcp-screenshot server
    │
    │  execFile("screencapture", [...args, tmpFile])
    ▼
macOS screencapture CLI
    │
    │  PNG file → read → base64 → cleanup
    ▼
Image returned to client

The server uses macOS native screencapture with the -x flag (silent, no shutter sound) and writes to a temp file that is immediately read and deleted.

Limitations

  • macOS only — relies on the native screencapture command

  • Screen Recording permission must be granted before first use

  • Large screenshots (e.g. Retina 5K displays) produce ~5-10MB base64 payloads

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT

Available Tools

2 tools
screenshot_fullscreenA

Capture the entire screen as a PNG image. Returns the screenshot encoded in base64. Requires macOS Screen Recording permission.

Inputs: display.

screenshot_regionA

Capture a specific rectangular region of the screen as a PNG image. Coordinates are in pixels from the top-left corner of the display.

Inputs: x (required), y (required), width (required), height (required).

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 2 tools

    Disambiguation5/5

    The two tools target clearly distinct scopes: the whole screen versus a rectangular sub-region. There is no overlap in purpose, and the descriptions make the boundary explicit (full display vs. pixel-coordinate region).

    Naming Consistency5/5

    Both names follow the same predictable pattern: the shared prefix 'screenshot_' plus a scope qualifier ('fullscreen', 'region'). The convention is uniform snake_case and immediately readable.

    Tool Count4/5

    Two tools is a narrow surface, but it accurately matches the tightly scoped purpose of a screenshot server. It is on the thin side of the typical 3-15 range, but no tool is redundant or wasted.

    Completeness4/5

    The core capture workflows (full screen and region) are covered, so there are no dead ends for the primary use case. Minor gaps exist, such as capturing a single window, choosing a specific display, or writing directly to a file path instead of base64 only.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers