OCR
MCP server for OCR using native Tesseract (C++), built with Node.js, delivering up to 10x faster performance than tesseract.js and integrable with ChatGPT Desktop.
What is OCR?
OCR is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for ocr using native tesseract (c++), built with node.js, delivering up to 10x faster performance than tesseract.js and integrable with chatgpt desktop.
MCP server for OCR using native Tesseract (C++), built with Node.js, delivering up to 10x faster performance than tesseract.js and integrable with ChatGPT Desktop.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server for OCR using native Tesseract (C++), built with
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-ocrConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use OCR
MCP OCR Server delivers high-performance optical character recognition via a native C++ Tesseract binding built on Node.js, achieving up to 10x faster throughput than the pure-JavaScript tesseract.js alternative, and integrates as an MCP server with ChatGPT Desktop, Claude Desktop, or any MCP-compatible AI client.
Prerequisites
- Node.js with npm installed
- C++ compiler with CMake support (Xcode Command Line Tools on macOS, build-essential on Linux)
- Tesseract OCR installed system-wide: brew install tesseract (macOS), sudo apt install tesseract-ocr libtesseract-dev libleptonica-dev (Ubuntu/Debian)
- Tesseract language data files (.traineddata) for each language you need to recognize
- Git to clone the repository
Install Tesseract OCR System-Wide
The MCP server binds to native Tesseract libraries, which must be installed at the system level before building the Node.js addon. Install Tesseract and the English language data using your system package manager.
# macOS
brew install tesseract
brew install tesseract-lang # all language packs
# Ubuntu/Debian
sudo apt install tesseract-ocr libtesseract-dev libleptonica-dev
# Windows (Chocolatey)
choco install tesseractClone the Repository
Clone the MCP OCR Server repository to your local machine.
git clone https://github.com/dangvinh/mcp-ocr-server.git
cd mcp-ocr-serverDownload Tessdata Language Files
Create a tessdata directory and download the trained data for English (and any other languages you need). The TESSDATA_PREFIX environment variable tells Tesseract where to find these files.
mkdir -p tessdata
wget https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata -P tessdata/
# Optional: add more languages
wget https://github.com/tesseract-ocr/tessdata/raw/main/fra.traineddata -P tessdata/
wget https://github.com/tesseract-ocr/tessdata/raw/main/deu.traineddata -P tessdata/Build the C++ Core Library and Node.js Addon
Compile the native C++ OCR library and then build the Node.js addon that wraps it. Both steps are required — the addon depends on the compiled core library.
cd cpp
npm run build-core # Compiles libmcp_ocr.a via CMake
npm run build-addon # Builds ocr_addon.node via node-gypSet Environment Variables
Set TESSDATA_PREFIX to point to your tessdata directory and OCR_LANG to the default recognition language. These can be set in your shell profile or passed directly in the MCP client config.
export TESSDATA_PREFIX=/path/to/mcp-ocr-server/tessdata
export OCR_LANG=engConfigure Claude Desktop
Add the OCR MCP server to your Claude Desktop configuration. Pass the TESSDATA_PREFIX and OCR_LANG environment variables so the native Tesseract library can locate its language data.
{
"mcpServers": {
"mcp-ocr": {
"command": "node",
"args": ["/path/to/mcp-ocr-server/index.js"],
"env": {
"TESSDATA_PREFIX": "/path/to/mcp-ocr-server/tessdata",
"OCR_LANG": "eng"
}
}
}
}Test OCR via Command Line
Verify the build succeeded by running the ocr_cli executable directly on a test image before connecting it to an AI client.
TESSDATA_PREFIX=./tessdata ./cpp/ocr_cli path/to/test-image.pngOCR Examples
Client configuration
Claude Desktop config for the MCP OCR server with Tesseract language data path and default language configured.
{
"mcpServers": {
"mcp-ocr": {
"command": "node",
"args": ["/Users/yourname/mcp-ocr-server/index.js"],
"env": {
"TESSDATA_PREFIX": "/Users/yourname/mcp-ocr-server/tessdata",
"OCR_LANG": "eng"
}
}
}
}Prompts to try
Example requests to send to Claude once the OCR MCP server is connected.
- "Extract all text from the image at /tmp/scanned-document.png."
- "Read the text in this receipt image and list the line items and total."
- "OCR this screenshot and extract the error message shown in the dialog."
- "Extract the table data from /tmp/invoice.png and format it as CSV."
- "Recognize the text in this image using French language recognition."Troubleshooting OCR
build-core fails with 'CMake not found' or 'C++ compiler not found'
Install the required build tools. On macOS run 'xcode-select --install'. On Ubuntu run 'sudo apt install build-essential cmake'. On Windows install Visual Studio Build Tools and CMake from cmake.org.
OCR runs but returns garbled text or empty output
The most common cause is a missing or incorrect .traineddata file. Confirm that TESSDATA_PREFIX points to a directory containing eng.traineddata (or the language you specified in OCR_LANG). Download the correct file from https://github.com/tesseract-ocr/tessdata.
build-addon fails with 'node-gyp' errors about missing Tesseract headers
The Tesseract development headers must be installed, not just the runtime. On Ubuntu install 'libtesseract-dev' and 'libleptonica-dev'. On macOS, 'brew install tesseract' includes headers. Verify with 'tesseract --version' and confirm /usr/local/include/tesseract/ exists.
Frequently Asked Questions about OCR
What is OCR?
OCR is a Model Context Protocol (MCP) server that mcp server for ocr using native tesseract (c++), built with node.js, delivering up to 10x faster performance than tesseract.js and integrable with chatgpt desktop. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install OCR?
Follow the installation instructions on the OCR GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with OCR?
OCR works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is OCR free to use?
Yes, OCR is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
OCR Alternatives — Similar Developer Tools Servers
Looking for alternatives to OCR? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up OCR in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use OCR?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.