MCP OCR Server

MCP OCR Server

High-performance OCR server using native Tesseract (C++) for text extraction from images, integrable with ChatGPT Desktop and other MCP clients.

Category
Visit Server

README

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

šŸ“Œ 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).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured