mcpField
M
mcp-business-pdf-field-extractor

mcp-business-pdf-field-extractor

Local
github.com/mambalabsdevBusiness & Marketing0Updated 1d ago

About mcp-business-pdf-field-extractor

mcp-business-pdf-field-extractor is an MCP server for extracting fixed fields from invoice, purchase order, and contract PDFs. It uses labels and column positions rather than AI, and can OCR scanned pages through an Apify actor.

Key features

  1. 01Extract fields from invoices, orders, and contracts
  2. 02Identify document type automatically
  3. 03OCR for scanned pages
  4. 04Return line items and amount checks
  5. 05Batch processing through Apify

Use cases

  1. 01Read invoice totals and line items
  2. 02Extract terms and renewal details from contracts
  3. 03Process batches of business PDFs

MCP support

Exposes the `extract_business_pdf_fields` tool to MCP clients. The tool starts the Apify actor, waits for completion, and returns dataset rows.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"com-mambabuilt-mcp-business-pdf-field-extractor": {
"command": "npx",
"args": [
"-y",
"@mambalabsdev/mcp-business-pdf-field-extractor"
],
"env": {
"APIFY_TOKEN": "<APIFY_TOKEN>"
}
}
}
}
Run commandnpx -y @mambalabsdev/mcp-business-pdf-field-extractor
Environment variables to set
APIFY_TOKENSecretApify API token from https://console.apify.com/account/integrations

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@mambalabsdev/mcp-business-pdf-field-extractor1.0.2

Tools

1

Saved tool list · updated 1d ago

ParameterTypeRequiredDescription
pdf_filestringNoOptional. One PDF file from your computer, stored in your Apify account.
pdf_urlsarrayNoWeb addresses of PDF files, up to 1,000. Each file up to 40 MB. The address must answer without a login. In Clay, put the column in a one item list.
max_pagesnumberNoPages to read per file, up to 500. Default 50.
date_orderenumNoHow to read a date such as 03/04/2025 when both readings are valid. mdy (default) reads March 4, dmy reads 3 April. Unambiguous dates ignore this.mdy | dmy
read_scansbooleanNoyes (default): a page with no text layer goes through OCR, charged per page. no: those pages are skipped and the row says so.
include_textbooleanNoyes: add the document text to the row, up to 200,000 characters. Default no.
ocr_languageenumNoLanguage of scanned pages: eng (default), deu, fra, spa, nld, ita, or por.eng | deu | fra | spa | nld | ita | por
document_typeenumNoauto (default) works it out per file. Set invoice, purchase_order, or contract to read every file as that type.auto | invoice | purchase_order | contract
max_documentsnumberNoFiles to read in this run, up to 1,000. Default 100.
max_ocr_pagesnumberNoScanned pages to read per file, up to 100. Default 10. This caps the OCR charge per file.
line_item_rowsbooleanNoyes (default): each line item is also its own free row, which suits CSV and Clay. no: line items stay in the line_items field only.
max_charge_usdstringNoOptional. The run stops before a charge that would pass this amount. Summary rows are always returned.

Details

From the project README

Business PDF Field Extractor MCP Server

Glama score MCP Registry npm version npm downloads license

An MCP server for the Mamba Labs Business PDF Field Extractor actor on Apify. Read invoices, purchase orders, and contracts from PDFs as fixed fields.

What's Inside

What it does

Give PDF addresses. The actor reads each file's text, or runs OCR on scanned pages, works out whether it is an invoice, a purchase order, or a contract, and returns fixed fields. Invoices and purchase orders return numbers, dates, parties, totals, line items, and a check that the amounts add up. Contracts return parties, dates, term, renewal, notice days, governing law, and which standard clauses appear. It uses labels and column position with no AI, so a value with no known label stays null and is listed as missing.

All of the work runs on Apify. This package is a thin client that starts the actor run, waits for it, and hands back the dataset rows.

Quick start

You need Node.js 18 or newer and an Apify account with an API token.

Add this to your Claude Desktop config (claude_desktop_config.json), Cursor, or any MCP client:

{
  "mcpServers": {
    "mamba-business-pdf-field-extractor": {
      "command": "npx",
      "args": [
        "-y",
        "@mambalabsdev/mcp-business-pdf-field-extractor"
      ],
      "env": {
        "APIFY_TOKEN": "your-apify-token"
      }
    }
  }
}

Restart the client. The extract_business_pdf_fields tool appears.

Prerequisites

Example prompts

  • "Extract the fields from this invoice PDF: "
  • "Read these purchase orders and list the line items: "
  • "What is the renewal and notice wording in this contract PDF: "

Tool

extract_business_pdf_fields. One tool. Example arguments:

{
  "pdf_urls": [
    "https://docs.oasis-open.org/ubl/cd-UBL-1.0/fs/Order/pdf/OfficeOrder.Example-us.pdf",
    "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_forms/forms/Invoice_1.pdf",
    "https://gba.georgia.gov/document/publication/services-contractsample-agreement-templatepdf/download"
  ]
}

Inputs

Every buyer facing input of the actor. Omitted inputs take the actor's own defaults.

InputTypeRequiredDescription
pdf_urlsarraynoWeb addresses of PDF files, up to 1,000. Each file up to 40 MB. The address must answer without a login. In Clay, put the column in a one item list.
pdf_filestringnoOptional. One PDF file from your computer, stored in your Apify account.
document_typestringnoauto (default) works it out per file. Set invoice, purchase_order, or contract to read every file as that type.
date_orderstringnoHow to read a date such as 03/04/2025 when both readings are valid. mdy (default) reads March 4, dmy reads 3 April. Unambiguous dates ignore this.
read_scansbooleannoyes (default): a page with no text layer goes through OCR, charged per page. no: those pages are skipped and the row says so.
ocr_languagestringnoLanguage of scanned pages: eng (default), deu, fra, spa, nld, ita, or por.
max_pagesnumbernoPages to read per file, up to 500. Default 50.
max_ocr_pagesnumbernoScanned pages to read per file, up to 100. Default 10. This caps the OCR charge per file.
max_documentsnumbernoFiles to read in this run, up to 1,000. Default 100.
line_item_rowsbooleannoyes (default): each line item is also its own free row, which suits CSV and Clay. no: line items stay in the line_items field only.
include_textbooleannoyes: add the document text to the row, up to 200,000 characters. Default no.
max_charge_usdstringnoOptional. The run stops before a charge that would pass this amount. Summary rows are always returned.

Pricing

Pay per event on Apify, billed to your Apify account. Prices in USD.

EventFree planBronzeSilverGold
document-row, one PDF with at least one field read$0.01$0.0095$0.009$0.0085
ocr-page, one scanned page read by OCR, charged when OCR returned text$0.015$0.01425$0.0135$0.01275
apify-actor-start, per run start$0.004$0.004$0.004$0.004

Line item rows, documents with no fields read, failed downloads, and refused input are free. Mamba Labs pays the platform costs of the run, Apify proxy traffic included.

Full actor documentation

apify.com/mambalabs/business-pdf-field-extractor

License

MIT. See LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.