How to extract document data with AI agents using MCP

Extraction is the step that turns a folder of documents into something an agent can reason about. Five tools cover the ways data hides in a file.

Note
The commands and config snippets on this page are for the .NET build of the server, which ships as a Docker image only. Installation and client setup: MCP server for .NET. Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged.

Which tool for which question

You askTool
“What does it say?”extract_text
“What is in the table?”extract_tables
“Who wrote it, and when?”extract_metadata
“Save the figures”extract_images
“What does the barcode encode?”extract_barcodes
“How long is it, and what format?”get_document_info

The pattern

  1. Put the documents in the storage folder the container mounts.
  2. Ask: “What does invoice.pdf say, and what is in its table?”
  3. The agent calls extract_text and extract_tables and reports both.
  4. Everything happens in a local container — no upload.

The rule that explains most surprises

extract_text reads a text layer. A born-digital PDF has one; a scan does not. On a scanned page the extraction returns little or nothing — which is a correct statement about the file, not a failure.

Check first when you are not sure:

How many pages is this, and does it have extractable text?

get_document_info plus a one-page text extraction answers it in two cheap calls. And on scans, extract_barcodes still works — see Read barcodes from scans.

Long documents: go page by page

extract_text truncates very large outputs and marks where it stopped. For a complete read of a long document, extract per page:

Extract the text of this 40-page report page by page and summarize each section.

Setup

docker run --rm -i -v $(pwd)/documents:/data \
  ghcr.io/groupdocs-parser/parser-net-mcp:latest

Docker only — this product has no dnx channel (why). Per-client config: Register in AI clients, or run the installer.

Where to go next