MacOS OCR
БесплатноНе проверенProvides an OCR tool that extracts text from images using macOS's built-in Vision framework, returning text segments with confidence scores and bounding boxes.
Описание
Provides an OCR tool that extracts text from images using macOS's built-in Vision framework, returning text segments with confidence scores and bounding boxes.
README
This project provides a MetaCall Protocol (MCP) tool to perform Optical Character Recognition (OCR) on images using macOS's built-in Vision framework. It exposes an ocr_image tool that takes an image file path and returns the recognized text along with confidence scores and bounding boxes.
Project Setup
Dependencies
This project relies on Python 3.13+ and the following main dependencies:
ocrmac: For accessing macOS OCR capabilities. See ocrmac.Pillow: For image manipulation.mcp[cli]>=1.7.1: For the MetaCall Protocol server and client.
Installation
It is recommended to use a virtual environment.
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activateInstall dependencies using
uv:uv sync
Running the MCP Server
To start the MCP server, run main.py:
uv run main.py
This will start the MCP server, making the ocr_image tool available.
Available MCP Tools
ocr_image
- Description: Conducts OCR on the provided image file using macOS's built-in capabilities. Returns recognized text segments, their confidence scores, and bounding box coordinates.
- Input:
file_path: str- The absolute or relative path to the image file. - Output (Example Success):
{ "filename": "path/to/your/image.png", "annotations": [ { "text": "Hello World", "confidence": 0.95, "bounding_box": [0.1, 0.1, 0.5, 0.05] }, // ... more annotations ] } - Output (Example Error):
or{ "error": "OCR functionality is only available on macOS." }{ "error": "File not found: path/to/nonexistent/image.png" }
Note: This tool will only function correctly on a macOS system due to its reliance on the Vision framework.
Testing with MCP Inspector
You can use the MCP Inspector to connect to the running MCP server and test the tool.
Cursor MCP Configuration
To configure this MCP server in Cursor, you can add the following to your MCP JSON configuration file (e.g., ~/.cursor/mcp.json or project-specific .cursor/mcp.json):
{
"mcpServers": {
"ocrmac": {
"command": "uv",
"args": [
"--directory",
"/path/to/macos-ocr-mcp",
"run",
"main.py"
]
}
}
}
This configuration tells Cursor how to start your MCP server. You can then call the ocrmac.ocr_image tool from within Cursor.
Установка MacOS OCR
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/whiteking64/macos-ocr-mcpFAQ
MacOS OCR MCP бесплатный?
Да, MacOS OCR MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для MacOS OCR?
Нет, MacOS OCR работает без API-ключей и переменных окружения.
MacOS OCR — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить MacOS OCR в Claude Desktop, Claude Code или Cursor?
Открой MacOS OCR на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare MacOS OCR with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
