OCR

v1.0.0Developer Toolsstable

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.

chatgpt-desktopfast-ocrhigh-performancejavascriptjson-rpc
Share:
11
Stars
0
Downloads
0
Weekly
0/5

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

Extract text from images and PDFs with 10x faster performance than JavaScript alternatives.
Integrate fast OCR processing into ChatGPT Desktop applications.
Automate document scanning and text recognition workflows.
dangvinh

Maintainer

LicenseMIT
Languagec++
Versionv1.0.0
UpdatedApr 4, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-ocr

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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

Clone 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-server
3

Download 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/
4

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-gyp
5

Set 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=eng
6

Configure 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"
      }
    }
  }
}
7

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.png

OCR 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.

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.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides