macOS Screenshot MCP server

Captures and analyzes macOS screen content using TypeScript and OCR, enabling automated UI testing and visual data processing.
Back to servers
Provider
kazuph
Release date
Dec 20, 2024
Language
TypeScript
Stats
11 stars

This server enables you to capture screenshots and extract text through OCR capabilities, supporting both Japanese and English language recognition. It integrates with Claude Desktop to provide screenshot functionality with various capture and output options.

Features

  • Screenshot capture (left half, right half, full screen)
  • OCR text recognition (supports Japanese and English)
  • Multiple output formats (JSON, Markdown, vertical, horizontal)

Installation

Install the MCP Screenshot server with a single command:

npx -y @kazuph/mcp-screenshot

Configuration

Claude Desktop Setup

Add the following configuration to your claude_desktop_config.json file to enable the screenshot functionality:

{
  "mcpServers": {
    "screenshot": {
      "command": "npx",
      "args": ["-y", "@kazuph/mcp-screenshot"],
      "env": {
        "OCR_API_URL": "http://localhost:8000"
      }
    }
  }
}

Environment Variables

You can customize the server behavior with the following environment variable:

Variable Name Description Default Value
OCR_API_URL yomitoku API base URL http://localhost:8000

Usage

To use the screenshot capability, simply instruct Claude with natural language:

Please take a screenshot of the left half of the screen and recognize the text in it.

Screenshot Options

When capturing screenshots, you can specify:

  • Region: Control which part of the screen to capture

    • left: Left half of the screen (default)
    • right: Right half of the screen
    • full: Entire screen
  • Format: Choose how the recognized text is returned

    • markdown: Formatted markdown text (default)
    • json: Structured JSON data
    • vertical: Vertical text layout
    • horizontal: Horizontal text layout

OCR Capabilities

The server uses two OCR engines:

  1. yomitoku - Primary engine with high-accuracy Japanese text recognition
  2. Tesseract.js - Fallback engine that supports both Japanese and English

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later