Skip to main content
Glama

Old manuals, patents and data sheets are often scans: pictures of pages with no text in them. OCR Lab reads them. A page with a text layer is read from it. A page without one is rendered and read by Tesseract. Every line and word comes back with its box on the page, in PDF points from the top left, and with Tesseract's confidence from 0 to 100. A number can then be found next to its label and checked on the page picture.

OCR misreads. It read "lb" as "1b" and "folded" as "felded" on a 1970s army scan. Check every number you keep on the page itself.

Install

  1. Install Tesseract 5: on Windows the UB Mannheim build, on macOS brew install tesseract, on Linux apt install tesseract-ocr. OCR Lab finds it on the PATH, in the usual install folders, or at OCRLAB_TESSERACT.

  2. pip install ocrlab-mcp

  3. Add it to your MCP client: claude mcp add ocrlab -- ocrlab-mcp

OCR Lab writes only to OCRLAB_OUT (default ~/.ocrlab): its cache of read pages.

Related MCP server: ReadPDFx - OCR PDF MCP Server

Tools

Tool

What it does

pdf_info

The page count, which pages have a text layer and which need OCR, and where Tesseract is.

read_page

One page's text and lines, with boxes and confidence; words adds every word.

read_pages

Several pages read and cached, with each page's source and mean confidence.

find

Every line matching a regular expression, with its page, box and the lines round it.

words_in

The words inside a box on a page: one column of a table read on its own.

read_image

An image file read by Tesseract.

line_fit

How far an outline (px) sits off a drawing's lines: mean, 95th percentile, largest miss, share on a line.

line_follow

A rough outline laid onto a drawing's lines as one line, with its fit before and after and a picture.

Lines in drawings

pip install ocrlab-mcp[lines] adds a line reader for line art and photos. line_follow moves each point of a rough outline only along its own normal and picks all the moves together (dynamic programming round the closed outline), each point on a line's middle and neighbours moving alike. An outline therefore stays on one line: it does not jump to an inner line and back, and does not slide along a line. Its picture shows each point green on a line and red off it, so a miss is seen, not hidden.

Command line

ocrlab info manual.pdf
ocrlab page manual.pdf 5
ocrlab find manual.pdf "overall length|weight" 1-12

Licence

MIT. Tesseract is Apache 2.0 and installed on its own.

Available Tools

6 tools
findC

Every line matching the pattern, with its page, box, confidence and the lines round it.

Inputs: path (required), pattern (required), dpi, limit, +4 more.

pdf_infoB

A PDF's page count, which pages have a text layer and which need OCR, and where Tesseract is.

Inputs: path (required).

read_imageC

An image file read by Tesseract: its lines (boxes in pixels) and their confidence.

Inputs: path (required), psm, lang.

read_pageB

One page's text and lines (boxes in PDF points, OCR confidence); with words, every word too.

Inputs: page (required), path (required), dpi, psm, +3 more.

read_pagesC

Several pages read and cached; each page's source, line count and mean confidence (read_page gives the text).

Inputs: path (required), pages (required), dpi, lang, +1 more.

words_inC

The words inside a box on a page, in reading order: one column of a table read on its own.

Inputs: box (required), page (required), path (required), dpi, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool has a fairly distinct role: pdf_info for metadata, read_page/read_pages for extraction, find for pattern search, words_in for box-scoped word retrieval, read_image for images. The only real overlap is read_page vs read_pages, but the descriptions explicitly clarify that read_pages returns metadata while read_page gives the actual text.

    Naming Consistency3/5

    There is a partial read_* convention (read_page, read_pages, read_image) but the remaining tools (pdf_info, find, words_in) break it, mixing noun-phrases and bare verbs. Names are readable and descriptive, but no single predictable pattern holds across the set.

    Tool Count5/5

    Six tools is a well-scoped set for a PDF/image OCR library, with no redundant or filler entries. Each tool maps to a clear capability without bloat.

    Completeness4/5

    Coverage spans metadata, single/multi-page reading, image OCR, pattern search, and box-level word extraction, which handles most OCR workflows. Minor gaps exist, such as no explicit export/save output or a tool to force/refresh OCR on a text-less page.

    Related MCP Connectors

    Related MCP Servers

    Appeared in Searches