# Document to JSON – PDF Invoice/Statement/Contract Parser

Converts invoices, bank statements, and contracts from PDF into structured JSON using AI and OCR. Built for automated document extraction from public URLs.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: fashionmascherine-svg
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/fashionmascherine-svg/document-to-json-mcp
- Updated: 2026-06-25
- HTML: https://affpapa.org/en/nevibecode/mcp/document-to-json-pdf-invoicestatementcontract-parser

## What it does

The server runs as an Apify Actor and connects over remote HTTP. It accepts a public document link and outputs JSON with extracted data. The model pulls seller details, line items, tax amounts, account transactions, and contract clauses. Built-in OCR handles English, Italian, and Spanish.

Four specialized tools are available: `parse_invoice`, `parse_bank_statement`, `parse_contract`, and `parse_generic_document`. Each request takes about 15–20 seconds. The service automatically validates calculation totals and statement dates. Input files are not stored after processing finishes.

Because the tool requires a public web link, local files must be uploaded to storage beforehand. Extractions follow pay-per-event pricing: $0.01 per invoice, $0.015 per bank statement, and $0.02 per contract.

## Requirements
- Remote server: `https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http document-to-json-pdf-invoicestatementcontract-parser 'https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp'
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add document-to-json-pdf-invoicestatementcontract-parser --url 'https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp'
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "document-to-json-pdf-invoicestatementcontract-parser": {
            "url": "https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "document-to-json-pdf-invoicestatementcontract-parser": {
            "type": "http",
            "url": "https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http document-to-json-pdf-invoicestatementcontract-parser 'https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp'
```

## When to use it
- extract line items, totals, and tax IDs from invoices
- convert bank statement transactions and balances into JSON
- retrieve parties, terms, and key clauses from contracts
- read text and tables from scanned files across three languages

## Example prompts
- Parse the invoice at https://example.com/invoice.pdf and return JSON with totals and VAT.
- Extract transactions and balances from the statement at <file_url> using parse_bank_statement.
- Identify all parties, dates, and core terms in the contract at <file_url>.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44591
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5469
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2817
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2197
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
