• TEXT
  • COORDINATES
  • SEARCH
  • HUMAN

How to extract OCR text from documents with your AI

Connect to the Library of Congress once. From there, your AI pulls transcripts and maps word locations from digitized records.

Ask AI about this page

Short answer

How can I pull OCR text and coordinates from historical records?

Your AI uses the Library of Congress MCP to fetch digitized content and specific word positions. You'll get raw transcripts and the exact spatial data needed to map text to images.

The results.

Where your data lands.

The AI processes the records and organizes the output into these four areas.

TEXT

Full transcripts

The AI pulls the raw OCR text from the record. You get a clean string of the historical text.

COORDINATES

Word positioning

The AI retrieves the exact coordinates for every word. This lets you map text back to the original image.

SEARCH

Targeted queries

The AI finds specific documents or terms within the collection. It narrows down the records before extracting text.

HUMAN

Manual verification

You review the extracted text for OCR errors. The AI provides the data, but you confirm the historical accuracy.

The workflow

What your AI does when a record is requested.

The AI moves from finding the right file to mapping the text within it.

  1. Locate the record

    The AI identifies the specific digitized item you want to analyze within the Library of Congress collection.

    get_resource
  2. Fetch the text

    The AI pulls the OCR-processed text directly from the digitized document.

    get_text_service
  3. Map word locations

    The AI extracts the spatial coordinates for the words found in the document.

    get_text_service
  4. Format the output

    The AI organizes the text and coordinates into a structure you can use for your project.

    get_text_service

Try it

Copy these to start.

Use these prompts to begin interacting with the Library of Congress records.

Starting points

Swap out the bracketed info for your specific document IDs or search terms.

Library of Congress Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_AjTjJo3aHNsbsGSqfRyZvlZJBZfDk0w19q4MaOwY/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Library of Congress capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "library-of-congress-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_AjTjJo3aHNsbsGSqfRyZvlZJBZfDk0w19q4MaOwY/mcp"
    }
  }
}
Copy into chat04
  • Get the full text and word coordinates for the document with ID [ID_NUMBER].

  • Find all records in the Library of Congress related to [TOPIC] and pull their transcripts.

  • Extract the OCR text from [RESOURCE_NAME] and list the coordinates for every instance of the word '[WORD]'.

  • Search for digitized records from [YEAR] and give me the text content for the first five results.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Library of Congress once, then ask.

One click connects your AI client to the Library of Congress. Your credentials stay encrypted, and you can start querying immediately.

Connect Library of Congress to your AI

FAQ

How this task behaves.

  • 01

    Can the AI fix typos in the original OCR text?

    No. The AI pulls the text exactly as it exists in the digitized record. You must handle any corrections manually.

  • 02

    Can the AI download the original image files?

    No. The AI can only access the text and the coordinate data provided by the service.

  • 03

    Does the AI store my search history?

    No. The AI client manages your session, and the MCP only acts on the specific requests you send.

  • 04

    Can I use this to edit Library of Congress records?

    No. The tools are read-only. The AI can only retrieve data, not modify the original historical files.

  • 05

    How do I get the word coordinates?

    When you ask for text extraction, the AI uses the text service to pull both the transcript and the spatial data.

  • More questions about Library of Congress? See everything the Library of Congress Connector can do

Connect Library of Congress to Claude, Cursor, ChatGPT & more