MCP server for passport MRZ extraction and document parsing
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"doc-parser-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# Doc Parser MCP Server A Model Context Protocol (MCP) server for passport MRZ (Machine Readable Zone) extraction and document parsing. ## Features - **MRZ Extraction**: Extract MRZ data from passport images - **MRZ Detection**: Locate MRZ regions in passport images - **Text Parsing**: Parse MRZ text into structured information - **Checksum Validation**: Validate MRZ checksums - **Multiple Input Formats**: Support file paths and base64 encoded images - **Fallback Processing**: Works with or without external passport_mrz_extractor library ## Installation ### From PyPI (when published) ```bash pip install doc-parser-mcp ``` ### From Source ```bash git clone https://github.com/yourusername/doc-parser-mcp.git cd doc-parser-mcp pip install -e . ``` ## Dependencies The server requires the following dependencies: - `mcp>=1.0.0` - Model Context Protocol framework - `opencv-python>=4.5.0` - Image processing - `numpy>=1.21.0` - Numerical operations - `Pillow>=8.0.0` - Image manipulation - `pytesseract>=0.3.8` - OCR functionality (optional, for fallback) ### Optional Dependencies - `passport-mrz-extractor>=1.0.0` - Specialized passport MRZ extraction library ### System Dependencies For OCR functionality (fallback mode), you need Tesseract: **macOS:** ```bash brew install tesseract ``` **Ubuntu/Debian:** ```bash sudo apt-get install tesseract-ocr ``` **Windows:** Download and install from [Tesseract at UB Mannheim](https://github.com/UB-Mannheim/tesseract/wiki) ## Usage ### As MCP Server Run the server using stdio transport: ```bash doc-parser-mcp ``` ### Available Tools The server provides the following tools: #### 1. extract_passport_mrz Extract MRZ data from a passport image. **Parameters:** - `image_path` (string): Path to the passport image file - `image_data` (string): Base64 encoded image data (alternative to image_path) **Example:** ```json { "image_path": "/path/to/passport.jpg" } ``` #### 2. detect_mrz_region Detect and locate MRZ region…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.