Docpick MCP server
✓ VerifiziertExtrahiert strukturiertes JSON aus Dokumenten mithilfe lokaler OCR-Engines und LLMs mit anpassbaren Pydantic-Schemas.
Auch bekannt als QuartzUnit/docpick
- Stars
- 1
- Tools
- —
- Downloads, 30 Tage
- 2.671
- Neueste Version
- 0.1.2
- Letzter Commit
- 15. Apr. 2026
- Lizenz
- Apache-2.0
Was ist Docpick MCP?
Docpick ist ein MCP server. Extrahiert strukturiertes JSON aus Dokumenten mithilfe lokaler OCR-Engines und LLMs mit anpassbaren Pydantic-Schemas.
Zusammenfassung generiert aus dem README des Projekts
Über Docpick MCP server
Docpick ermöglicht es Entwicklern, die private Daten-Pipelines aufbauen, physische Dokumente lokal in strukturierte JSON-Daten umzuwandeln. Es fungiert als schema-gesteuertes Extraktionssystem, das lokale OCR-Engines wie PaddleOCR, EasyOCR oder GOT-OCR2.0 mit lokalen LLM-Endpoints wie Ollama oder vLLM kombiniert. Dieses Setup stellt sicher, dass sensible Informationen aus Rechnungen, Belegen oder Kontoauszügen deine Maschine niemals verlassen, da der gesamte Prozess auf deiner eigenen CPU oder GPU läuft.
Nutzer können aus acht integrierten Schemas für gängige Dokumente wählen oder eigene Pydantic-Modelle definieren, um spezifische Datenstrukturen zu erzwingen. Das System enthält integrierte Validierungstools wie die Prüfziffern-Verifizierung für IBAN oder koreanische Geschäftsnummern sowie Cross-Field-Regeln, um mathematische Konsistenz zu gewährleisten. Egal, ob du eine einzelne Datei über die Python API verarbeitest oder Batch-Jobs über ganze Verzeichnisse mit parallelen Workern ausführst – die Pipeline verwaltet OCR-Fallbacks und LLM-Retries, um eine hohe Extraktionsgenauigkeit beizubehalten.
Was du damit machen kannst
- 1Extraktion von RechnungsdatenWandle Handelsrechnungen in strukturiertes JSON um und verifiziere dabei Steuer-IDs und Summen der einzelnen Posten.
- 2Validierung von AusweisdokumentenExtrahiere Passinformationen und verifiziere sie gegen ICAO 9303 Standards und MRZ-Zonen.
- 3Automatisierung der Batch-DokumentenverarbeitungFühre parallele Extraktionsaufgaben in einem Ordner voller Dokumente unter Verwendung eines spezifischen Schemas aus.
- 4Sicherstellung der dokumentenübergreifenden KonsistenzÜberprüfe, ob die Daten über eine Rechnung, einen Frachtbrief und eine Packliste hinweg konsistent bleiben.
Geschrieben aus dem README des Projekts. Jeder Use Case wurde gegen ein Zitat daraus geprüft.
So installierst du Docpick MCP
Formate geprüft am 10. Nov. 2026Zu Cursor hinzufügenZu Goose hinzufügenDocpick MCP in Claude Code installieren
$ claude mcp add docpick -- uvx docpickDocpick MCP in Cursor installieren
~/.cursor/mcp.json
{
"mcpServers": {
"docpick": {
"command": "uvx",
"args": [
"docpick"
]
}
}
}Docpick MCP in VS Code installieren
.vscode/mcp.json
{
"servers": {
"docpick": {
"type": "stdio",
"command": "uvx",
"args": [
"docpick"
]
}
}
}Docpick MCP in VS Code CLI installieren
$ code --add-mcp '{"name":"docpick","type":"stdio","command":"uvx","args":["docpick"]}'Docpick MCP in Claude Desktop installieren
claude_desktop_config.json
{
"mcpServers": {
"docpick": {
"command": "uvx",
"args": [
"docpick"
]
}
}
}Docpick MCP in Codex installieren
$ codex mcp add docpick -- uvx docpickDocpick MCP in Codex config.toml installieren
~/.codex/config.toml
[mcp_servers.docpick] command = "uvx" args = ["docpick"]
Docpick MCP in Gemini CLI installieren
$ gemini mcp add -s user docpick uvx -- docpickDocpick MCP in Gemini settings.json installieren
~/.gemini/settings.json
{
"mcpServers": {
"docpick": {
"command": "uvx",
"args": [
"docpick"
]
}
}
}Automatisierte Checks
Geluften am 15. Nov. 2026Vollständiger Bericht →Unsere automatisierten Checks bestanden. Das ist kein Security-Audit: Lies den Code und gib dem Server nur den minimal notwendigen Zugriff. Wie die Checks funktionieren
- Source Repository verknüpft und erreichbarquartzunit/docpick is public and reachablegithub.com/quartzunit/docpick ↗Bestanden
- Paket nennt dieses Repository als Quelledocpick names quartzunit/docpick as sourcepypi.org/project/docpick/ ↗Bestanden
- Build-Provenienz (Sigstore-Attestierung)No build attestation published for this releaseNicht geprüft
- Open Source Lizenz (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Bestanden
- Commit oder Release im letzten JahrLast commit or release 2026-04-15github.com/quartzunit/docpick ↗Bestanden
- OpenSSF ScorecardNicht geprüft
- Package-Name ähnelt keinem populären PackageNo popular package one edit away from docpickBestanden
- Keine kritischen Advisories im Paket oder seinen Abhängigkeiten22 resolved dependencies checked; no critical advisoryosv.dev ↗Bestanden
- Keine versteckten Anweisungen an das Modell0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersBestanden
- Destruktive Tools sind markiertNicht geprüft
- Remote-Endpoint beantwortet den MCP-HandshakeNicht geprüft
README
Auf GitHub ansehenDocpick
Document in, Structured JSON out. Locally. With your schema.
docpick is a lightweight, schema-driven document extraction pipeline that combines local OCR engines with local LLMs to extract structured JSON from any document — invoices, receipts, bills of lading, tax forms, and more.
- Zero cloud dependency — runs entirely on your machine (CPU or GPU)
- Custom schemas — define your own Pydantic models or use 8 built-in document schemas
- Validation built-in — checkdigit verification, cross-field rules, cross-document consistency
- Apache 2.0 — no GPL/AGPL dependencies
Install
pip install docpick # core (LLM extraction only)
pip install docpick[paddle] # + PaddleOCR (recommended)
pip install docpick[easyocr] # + EasyOCR (Korean-optimized)
pip install docpick[got] # + GOT-OCR2.0 (GPU, vision-language)
pip install docpick[all] # all OCR backends
Requirements: Python 3.11+ / LLM endpoint (vLLM, Ollama, or OpenAI-compatible)
Quick Start
Python API
from docpick import DocpickPipeline
from docpick.schemas import InvoiceSchema
pipeline = DocpickPipeline()
result = pipeline.extract("invoice.pdf", schema=InvoiceSchema)
print(result.data) # Structured dict matching schema
print(result.validation) # Validation errors/warnings
print(result.confidence) # Per-field confidence scores
CLI
# Extract structured data
docpick extract invoice.pdf --schema invoice --output result.json
# OCR only (no LLM)
docpick ocr document.png --lang ko,en
# Validate extracted JSON
docpick validate result.json --schema invoice
# Batch process a directory
docpick batch ./documents/ --schema invoice --output ./results/ --concurrency 4
# List available schemas
docpick schemas list
# Show schema details
docpick schemas show invoice
Built-in Schemas
| Schema | Document Type | Key Validations |
|---|---|---|
invoice |
Commercial invoices | Line item sums, tax ID checkdigit, date order |
receipt |
Retail/restaurant receipts | Total = subtotal + tax + tip |
bill_of_lading |
Ocean/air B/L | Container weight sums, ISO 6346, HS code format |
purchase_order |
Purchase orders | PO total = line items, delivery date order |
kr_tax_invoice |
Korean e-tax invoice (세금계산서) | Business number checkdigit (x2), supply/tax/total sums |
bank_statement |
Bank statements | IBAN mod97, period date order |
id_document |
Passport/ID (ICAO 9303) | MRZ, ISO 3166 country codes, date ranges |
certificate_of_origin |
Certificate of Origin | ISO 3166 alpha-2 country codes |
Custom Schemas
Define your own schema with Pydantic:
from pydantic import BaseModel
from docpick import DocpickPipeline
from docpick.validation.rules import SumEqualsRule, RequiredFieldRule
class MyDocument(BaseModel):
"""Custom document schema."""
company_name: str | None = None
total_amount: float | None = None
tax_amount: float | None = None
net_amount: float | None = None
items: list[dict] | None = None
class ValidationRules:
rules = [
RequiredFieldRule("company_name"),
SumEqualsRule(["net_amount", "tax_amount"], "total_amount"),
]
pipeline = DocpickPipeline()
result = pipeline.extract("my_document.pdf", schema=MyDocument)
Or use a JSON Schema file:
docpick extract document.pdf --schema my_schema.json
Validation
Check Digit Algorithms
| Algorithm | Use Case |
|---|---|
kr_business_number |
Korean business registration number (10 digits) |
luhn |
Credit card numbers |
iso_6346 |
Shipping container numbers |
iban_mod97 |
International bank account numbers |
awb_mod7 |
Air waybill numbers |
mrz |
Machine Readable Zone (passport/ID) |
Cross-Field Rules
| Rule | Description |
|---|---|
SumEqualsRule |
Sum of fields equals target (with tolerance) |
DateBeforeRule |
Date A must precede Date B |
RequiredFieldRule |
Field must be non-null and non-empty |
FieldEqualsRule |
Two fields must be equal |
RangeRule |
Numeric field within min/max bounds |
RegexRule |
Field matches regex pattern |
Cross-Document Validation
Validate consistency across related documents (e.g., Invoice + B/L + Packing List):
from docpick.validation.cross_document import create_trade_document_validator
validator = create_trade_document_validator()
result = validator.validate({
"invoice": invoice_data,
"bl": bl_data,
"packing_list": packing_list_data,
"certificate": certificate_data,
})
print(result.is_valid)
OCR Engines
| Engine | Type | GPU | Languages | Best For |
|---|---|---|---|---|
| PaddleOCR | Traditional OCR | Optional | 111 | General documents (default) |
| EasyOCR | Traditional OCR | Optional | 80+ | Korean text |
| GOT-OCR2.0 | Vision-Language | Required | Multi | Complex layouts |
| VLM | Vision-Language | Required | Multi | Direct image → JSON |
2-Tier Auto Engine
The default auto engine uses confidence-based fallback:
- Tier 1 (CPU): PaddleOCR → EasyOCR
- Tier 2 (GPU): GOT-OCR2.0 → VLM
If Tier 1 average confidence falls below threshold (default 0.7), automatically escalates to Tier 2.
LLM Providers
| Provider | Endpoint | Default Model |
|---|---|---|
| vLLM | http://localhost:8000/v1 |
Qwen/Qwen3.5-32B-AWQ |
| Ollama | http://localhost:11434 |
qwen3.5:7b |
Configure via CLI or YAML:
docpick config set llm.provider ollama
docpick config set llm.base_url http://localhost:11434
docpick config set llm.model qwen3.5:7b
Error Handling
The pipeline is designed to be resilient:
- OCR failure → automatic fallback to next available engine
- LLM JSON parse failure → automatic retry with correction prompt (up to 1 retry)
- Partial results → returns whatever was extracted, with errors logged in
result.errors - Document load failure → returns empty result with error message
result = pipeline.extract("damaged.pdf", schema=InvoiceSchema)
if result.errors:
print("Pipeline warnings:", result.errors)
if result.data:
print("Partial extraction:", result.data)
Batch Processing
Process entire directories with parallel workers:
from docpick.batch import BatchProcessor
from docpick.schemas import InvoiceSchema
processor = BatchProcessor(concurrency=4)
result = processor.process_directory(
"./invoices/",
schema=InvoiceSchema,
recursive=True,
)
print(f"Processed {result.succeeded}/{result.total} files")
for path, extraction in result.results.items():
print(f"{path}: {extraction.data.get('total_amount')}")
Architecture
flowchart TD
A["📄 Document\n(PDF / Image)"] --> B["DocumentLoader\n(pypdfium2)"]
B --> C["Tier 1: OCR\n(PaddleOCR / EasyOCR)\nCPU"]
C --> D{"Confidence\n≥ threshold?"}
D -->|"yes"| F["LLM Extractor\n(vLLM / Ollama)\nSchema prompt"]
D -->|"no"| E["Tier 2: VLM\n(GOT / VLM)\nGPU"]
E --> F
F --> G["Pydantic Validation"]
G --> H["✅ ExtractionResult"]
License
Apache 2.0 — all dependencies are Apache 2.0 or MIT licensed.
Part of the QuartzUnit ecosystem — composable Python libraries for data collection, extraction, search, and AI agent safety.
Docpick MCP Fragen
Wie füge ich Docpick MCP zu Claude Code hinzu?
Führe claude mcp add docpick -- uvx docpick in deinem Terminal aus. Füge --scope user hinzu, damit der Server in jedem Projekt verfügbar ist.
Wie füge ich Docpick MCP zu Cursor hinzu?
Öffne ~/.cursor/mcp.json und füge den Server unter mcpServers hinzu, mit der Cursor-Config aus dem Installationsabschnitt oben.
Benötigt Docpick Cloud-Services?
Nein, es läuft vollständig auf deiner Maschine ohne jegliche Cloud-Abhängigkeit.
Kann ich eigene Datenstrukturen für die Extraktion verwenden?
Ja, du kannst deine eigenen Schemas über Pydantic-Modelle oder JSON Schema-Dateien definieren.
Wie geht das System mit OCR-Ergebnissen mit geringer Konfidenz um?
Es nutzt eine zweistufige Auto-Engine, die automatisch auf fortschrittlichere Vision-Language-Modelle hochstuft, wenn die Konfidenz unter einen Schwellenwert fällt.