Skip to main content
Glama

MCP OCR Server

Build Status Codecov

MCP server for OCR using native Tesseract (C++), built with Node.js, delivering high-performance OCR and integrable with ChatGPT Desktop.

🚧 Work in Progress 🚧

✨ Features (planned)

  • High-performance OCR via native Tesseract (C++)

  • Node.js MCP server wrapper for easy integration

  • Compatible with ChatGPT Desktop and other MCP clients

  • Benchmark vs tesseract.js

Related MCP server: OCR MCP Server

📌 Roadmap

  • Step 1: C++ OCR CLI tool

  • Step 2: Node.js MCP server wrapper

  • Step 3: ChatGPT Desktop configuration guide

  • Step 4: Benchmark results

  • Step 5: Demo video

🔧 Tech Stack

  • C++ (Tesseract OCR)

  • Node.js + TypeScript (@modelcontextprotocol/sdk)

  • JSON-RPC 2.0 (MCP standard)

🛠 Installation

1. Install Tesseract OCR

macOS

brew install tesseract
# Optional: install additional languages
brew install tesseract-lang

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install tesseract-ocr libtesseract-dev libleptonica-dev
# Optional: install Vietnamese language
sudo apt install tesseract-ocr-vie

Windows

choco install tesseract
  • Add the installation path to your PATH environment variable.

2. Clone the repository

git clone https://github.com/dangvinh/mcp-ocr-server.git
cd mcp-ocr-server/cpp

3. Build the project with CMake

You can build the C++ OCR engine using the provided npm script. Run:

npm run build-core

This command will create the cpp/build-core directory, configure the project with CMake, and build the static library and CLI tool.

What it builds:

  • libmcp_ocr.a static library

  • ocr_cli executable in cpp/build-core/bin (or equivalent)

Running tests

# From the build directory
ctest --verbose
  • This will run all GoogleTest-based tests.

  • Ensure test images or resources exist in cpp/tests or examples/.

  • The setup works cross-platform (macOS, Linux, Windows).

4. Build the Node.js addon

The Node.js addon can be built using the provided npm script. Run:

npm run build-addon

This command runs node-gyp inside the cpp/ directory and produces the compiled addon (ocr_addon.node) inside cpp/build/Release/. This addon is required for Node.js integration with the C++ core.


🗂 Setup tessdata

The OCR engine requires trained data files to work. Please follow these steps:

  1. Create a tessdata folder in the project root:

mkdir tessdata
  1. Download the English trained data:

wget https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata -P tessdata/
  1. For other languages, download the corresponding .traineddata files into tessdata/.

  2. Ensure your .env or .env.example has:

TESSDATA_PREFIX=./tessdata
OCR_LANG=eng

4. Run OCR CLI

./ocr_cli path/to/image.png

Ensure the tessdata folder is accessible for language files. The project supports macOS, Linux, and Windows (cross-platform).

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    An MCP server that provides OCR capabilities using the EasyOCR library, supporting over 80 languages and GPU acceleration. It enables processing images from base64 strings, local files, or URLs with options for text-only or detailed coordinate and confidence output.
    2
    Apache 2.0
  • F
    license
    A
    quality
    D
    maintenance
    A Tesseract.js-based server that enables image-to-text recognition within MCP-compatible environments like Cursor. It supports multiple languages and common image formats, allowing users to extract text from local files using natural language commands.
    2
  • A
    license
    -
    quality
    B
    maintenance
    A local OCR MCP server that extracts text from images using PP-OCRv6 for fast text extraction and VL-1.6 for document structure analysis, with automatic model routing and GPU detection.
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • OCR.space MCP — wraps the OCR.space API (ocr.space) for image/PDF → text OCR.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dangvinh/mcp-ocr-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server