PDF MCP Server avatar
PDF MCP Server

Pricing

Pay per usage

Go to Apify Store
PDF MCP Server

PDF MCP Server

Stateless PDF tools exposed via MCP. Open, split, merge, extract text, fill and flatten forms, and generate PDFs in a single run. Designed for deterministic, auditable document transformations by agents and workflows.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Quadruped

Quadruped

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

15 days ago

Last modified

Share

PDF MCP Server — Document Intelligence

AI-powered PDF operations for Claude, VS Code, and any MCP client

Extract structured JSON from invoices, receipts, contracts, resumes, W-2s, 1099s, and bank statements using GPT-4o vision. Plus merge, split, render, and manipulate PDFs.

Quick Start

1. Try it now (no setup)

Run directly on Apify with the prefilled input.

2. Connect to Claude Desktop

Add to claude_desktop_config.json:

{
"mcpServers": {
"pdf": {
"url": "https://mcp.apify.com?actors=constant_quadruped/pdf-mcp-server"
}
}
}

3. Connect to VS Code

Install the MCP extension and add the same URL.


Features

CategoryCapabilities
AI ExtractionGPT-4o vision extracts structured JSON from any document
Document TypesInvoices, receipts, contracts, resumes, W-2, 1099, bank statements
PDF OperationsMerge, split, extract pages, create from HTML
Form HandlingList fields, fill forms, flatten
RenderingConvert pages to PNG/JPEG images
Input FlexibilityURL or Base64 encoded PDFs

AI Document Extraction

The pdf.ai_extract tool uses GPT-4o vision to extract structured data from any document—including scanned PDFs without a text layer.

Supported Document Types

TypeWhat Gets Extracted
invoiceInvoice number, dates, vendor info, customer info, line items with quantities/prices, subtotal, tax, total
receiptMerchant name, date/time, itemized purchases, subtotal, tax, total, payment method
contractParty names, effective dates, termination date, key terms, obligations, signatures
resumeName, contact info, work experience with dates, education, skills, certifications
w2Employer EIN/name/address, employee SSN/name/address, wages, federal/state tax withheld
form_1099Payer info, recipient info, amounts by box, form type (MISC, NEC, INT, DIV)
bank_statementAccount number, statement period, opening/closing balance, all transactions
autoAuto-detects document type and extracts relevant fields

Example: Extract Invoice Data

Input:

{
"tool": "pdf.ai_extract",
"pdfUrl": "https://example.com/invoice.pdf",
"documentType": "invoice",
"openaiApiKey": "sk-..."
}

Output:

{
"status": "ok",
"document_type": "invoice",
"extraction": {
"invoice_number": "INV-2024-001",
"invoice_date": "2024-01-15",
"due_date": "2024-02-15",
"vendor": {
"name": "Acme Corp",
"address": "123 Business St, NYC"
},
"customer": {
"name": "Client Inc",
"address": "456 Customer Ave"
},
"line_items": [
{
"description": "Widget A",
"quantity": 10,
"unit_price": 100.00,
"amount": 1000.00
}
],
"subtotal": 1000.00,
"tax": 80.00,
"total": 1080.00
},
"confidence": 0.95
}

Custom Extraction Schema

Need specific fields? Define your own schema:

{
"tool": "pdf.ai_extract",
"pdfUrl": "https://example.com/document.pdf",
"documentType": "auto",
"customFields": "{\"purchase_order_number\": \"string\", \"shipping_address\": \"string\", \"delivery_date\": \"string\"}",
"openaiApiKey": "sk-..."
}

All Available Tools

AI Extraction

ToolDescriptionRequired Parameters
pdf.ai_extractExtract structured data using GPT-4opdfUrl or pdfBase64, openaiApiKey

Document Info

ToolDescriptionRequired Parameters
pdf.openLoad and validate a PDFpdfUrl or pdfBase64
pdf.get_metadataGet title, author, page count, creation datepdfUrl or pdfBase64
pdf.extract_textExtract all text contentpdfUrl or pdfBase64

Page Operations

ToolDescriptionRequired Parameters
pdf.render_pagesConvert pages to PNG/JPEG imagespdfUrl or pdfBase64
pdf.extract_pagesExtract specific pages to new PDFpdfUrl or pdfBase64, pages
pdf.splitSplit into multiple PDFs by rangespdfUrl or pdfBase64, ranges
pdf.mergeCombine multiple PDFsurls

Form Operations

ToolDescriptionRequired Parameters
pdf.list_form_fieldsList all fillable fieldspdfUrl or pdfBase64
pdf.fill_form_fieldsFill form with valuespdfUrl or pdfBase64, formFields
pdf.flatten_formMake form fields permanentpdfUrl or pdfBase64

PDF Creation

ToolDescriptionRequired Parameters
pdf.create_from_htmlGenerate PDF from HTMLhtml or htmlUrl

Input Examples

Get Document Metadata

{
"tool": "pdf.get_metadata",
"pdfUrl": "https://example.com/document.pdf"
}

Output:

{
"status": "ok",
"metadata": {
"title": "Annual Report 2024",
"author": "Finance Team",
"pageCount": 45,
"creationDate": "2024-01-01T00:00:00Z"
}
}

Extract Text from Specific Pages

{
"tool": "pdf.extract_text",
"pdfUrl": "https://example.com/document.pdf",
"pages": "1,2,3"
}

Create PDF from HTML

{
"tool": "pdf.create_from_html",
"html": "<html><body><h1>Report</h1><p>Generated content here.</p></body></html>",
"pdfFormat": "A4"
}

Merge Multiple PDFs

{
"tool": "pdf.merge",
"urls": "[\"https://example.com/doc1.pdf\", \"https://example.com/doc2.pdf\"]"
}

Split PDF into Parts

{
"tool": "pdf.split",
"pdfUrl": "https://example.com/large-document.pdf",
"ranges": "[{\"start\":1,\"end\":10},{\"start\":11,\"end\":20}]"
}

Fill Form Fields

{
"tool": "pdf.fill_form_fields",
"pdfUrl": "https://example.com/tax-form.pdf",
"formFields": "{\"name\": \"John Doe\", \"ssn\": \"123-45-6789\", \"date\": \"2024-01-15\"}"
}

Render Pages as Images

{
"tool": "pdf.render_pages",
"pdfUrl": "https://example.com/document.pdf",
"pages": "1",
"renderDpi": 150,
"renderFormat": "png"
}

Use Cases

Invoice Processing Automation

Extract vendor details, line items, and totals from invoices for automatic data entry into accounting systems.

Resume Parsing for HR

Convert PDF resumes into structured candidate data with work history, education, and skills for ATS integration.

Tax Document Processing

Automatically extract W-2 and 1099 data for tax preparation software or audit workflows.

Contract Analysis

Pull key terms, dates, and party information from contracts for review and compliance tracking.

Bank Statement Reconciliation

Extract transactions from bank statements for financial reconciliation and expense tracking.

Report Generation

Create professional PDFs from HTML templates for automated report distribution.

Form Automation

Programmatically fill tax forms, applications, and other fillable PDFs.


Technical Specifications

Limits

ParameterValue
Maximum file size50 MB
Maximum pages500 pages
AI extraction limit10 pages per request
Default render DPI150
Maximum render DPI300

Supported Formats

  • Input: PDF (URL or Base64)
  • Output: JSON, PNG, JPEG, PDF
  • PDF Versions: 1.0 - 2.0 (all standard PDF versions)

Pricing

OperationCost
PDF operations (open, extract, merge, split)Apify compute time only
AI extractionYour OpenAI API costs (~$0.01-0.10 per document)

No per-document fees. You control your OpenAI spend.


MCP Integration

This actor is designed for the Model Context Protocol (MCP). Connect it to any MCP-compatible client.

Claude Desktop

Add to claude_desktop_config.json (typically at %APPDATA%\Claude\ on Windows or ~/Library/Application Support/Claude/ on macOS):

{
"mcpServers": {
"pdf": {
"url": "https://mcp.apify.com?actors=constant_quadruped/pdf-mcp-server"
}
}
}

Restart Claude Desktop to load the MCP server.

VS Code with Continue/Cline

Configure your MCP extension to use:

https://mcp.apify.com?actors=constant_quadruped/pdf-mcp-server

Other MCP Clients

Any client supporting MCP over HTTP can connect using the URL above.


Error Handling

All tools return consistent error responses:

{
"status": "error",
"error": "Description of what went wrong"
}

Common errors:

  • Invalid PDF URL - URL not accessible or not a valid PDF
  • Page out of range - Requested page doesn't exist
  • OpenAI API key required - Missing API key for AI extraction
  • File too large - PDF exceeds 50MB limit

Support

For issues, feature requests, or questions:

  • Open a ticket on the Issues tab
  • Check existing issues for solutions

Changelog

v1.1

  • Added AI document extraction with GPT-4o vision
  • Support for W-2, 1099, and bank statement extraction
  • Custom extraction schema support
  • Improved error messages

v1.0

  • Initial release
  • PDF operations: merge, split, extract, render
  • Form handling: list, fill, flatten
  • HTML to PDF conversion