OwlOCR MCP
A macOS-based MCP server that enables high-accuracy text extraction from PDF and image files using the OwlOCR app or Apple's Vision Framework. It supports multi-language OCR and provides asynchronous tools for processing documents directly within MCP clients.
README
OwlOCR MCP
MCP (Model Context Protocol) server for PDF and image OCR on macOS. Supports two backends:
- OwlOCR CLI - Higher accuracy (recommended)
- Vision Framework - No external dependencies
Features
- 📄 PDF OCR - Extract text from PDF files page by page with separators
- 🖼️ Image OCR - Extract text from PNG, JPEG, and other image formats
- 🌏 Multi-language - Korean + English by default (configurable)
- 🔄 Dual Backend - Auto-selects OwlOCR if available, falls back to Vision Framework
- ⚡ Async - Non-blocking execution for MCP clients
Benchmark Results
Tested on a 4-page Korean theological document with Hebrew text:
| Metric | Vision Framework | OwlOCR CLI |
|---|---|---|
| Time | 9.87s | 9.30s |
| Time/Page | 2.47s | 2.33s |
| Word Accuracy | 85.62% | 91.79% |
| Character Accuracy | 94.46% | 95.07% |
Winner: OwlOCR CLI - Faster and more accurate.
Requirements
- macOS (uses Apple Vision Framework / OwlOCR.app)
- Python 3.11+
- OwlOCR.app (optional, for better accuracy)
Installation
Using uv (recommended)
git clone https://github.com/yourusername/owlocr-mcp.git
cd owlocr-mcp
uv sync
Using pip
git clone https://github.com/yourusername/owlocr-mcp.git
cd owlocr-mcp
pip install -e .
MCP Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"owlocr": {
"command": "uv",
"args": ["run", "--directory", "/path/to/owlocr-mcp", "owlocr-mcp"]
}
}
}
Generic MCP Client
{
"mcpServers": {
"owlocr": {
"command": "/path/to/owlocr-mcp/.venv/bin/python",
"args": ["-m", "owlocr_mcp.server"]
}
}
}
Available Tools
ocr_pdf_to_text
Extract text from a PDF file.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
pdf_path |
string | required | Absolute path to the PDF file |
pages |
list[int] | null | Page numbers to process (1-based). If null, all pages |
dpi |
int | 200 | Resolution for rendering. Higher = better quality but slower |
backend |
string | "auto" | "auto", "owlocr", or "vision" |
languages |
list[string] | null | Language codes (Vision only). Default: ["ko-KR", "en-US"] |
Example:
Extract text from /Users/me/document.pdf using OwlOCR
Output:
첫 번째 페이지 내용...
===== Page 2 =====
두 번째 페이지 내용...
--- OCR Complete: 2 page(s) processed using OwlOCR CLI ---
ocr_image_to_text
Extract text from an image file.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
image_path |
string | required | Absolute path to the image file |
backend |
string | "auto" | "auto", "owlocr", or "vision" |
languages |
list[string] | null | Language codes (Vision only) |
check_ocr_backends
Check available OCR backends on the system.
Output:
OCR Backend Status:
✅ Vision Framework: Available (macOS built-in)
✅ OwlOCR CLI: Available (/Applications/OwlOCR.app)
Recommendation: Use backend='owlocr' for best accuracy
Backend Selection
| Backend | Accuracy | Speed | Requirements |
|---|---|---|---|
owlocr |
⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | OwlOCR.app installed |
vision |
⭐⭐⭐⭐ | ⭐⭐⭐⭐ | None (macOS built-in) |
auto |
Best available | - | Uses OwlOCR if available |
Running the Benchmark
Compare backends on your own PDF:
# Both backends
uv run python benchmark.py /path/to/your.pdf
# With accuracy comparison (requires ground truth)
uv run python benchmark.py /path/to/your.pdf --show-text
# Specific backend only
uv run python benchmark.py /path/to/your.pdf --method owlocr
uv run python benchmark.py /path/to/your.pdf --method vision
Project Structure
owlocr-mcp/
├── src/owlocr_mcp/
│ ├── __init__.py
│ ├── server.py # MCP server with tools
│ ├── ocr.py # Vision Framework backend
│ ├── ocr_owlocr.py # OwlOCR CLI backend
│ └── pdf.py # PDF processing utilities
├── benchmark.py # Performance comparison script
├── pyproject.toml
└── README.md
How It Works
OwlOCR Backend
- Render PDF pages to PNG using
pypdfium2 - Copy images to OwlOCR sandbox:
~/Library/Containers/JonLuca-DeCaro.OwlOCR/Data/tmp/ - Run CLI:
/Applications/OwlOCR.app/Contents/MacOS/OwlOCR --cli --input <file> - Combine results with page separators
Vision Framework Backend
- Render PDF pages to PNG using
pypdfium2 - Load as
CIImagevia PyObjC - Create
VNRecognizeTextRequestwith accurate recognition level - Process with
VNImageRequestHandler - Sort results by position and combine
Troubleshooting
"OwlOCR.app not found"
Install OwlOCR from owlocr.com or use backend="vision".
File picker dialog appears
This happens when OwlOCR can't access files outside its sandbox. The MCP server handles this by copying files to the sandbox temp directory automatically.
Poor accuracy on specific languages
For Vision Framework, specify languages explicitly:
ocr_pdf_to_text(pdf_path, languages=["ja-JP", "en-US"])
Supported language codes: ko-KR, en-US, ja-JP, zh-Hans, zh-Hant, etc.
License
MIT License - see LICENSE file.
Acknowledgments
- OwlOCR by JonLuca DeCaro
- MCP Python SDK
- Apple Vision Framework
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。