Document OCR MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Document OCR MCP Serverextract data from my Aadhaar card at C:/Users/me/aadhaar.jpg"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
šŖŖ Document OCR MCP Server
An AI-powered MCP (Model Context Protocol) server that extracts structured data from Indian identity documents using OCR. Connect it to Claude Desktop and let Claude read your documents!
š Supported Documents
Document | Extracted Fields |
šŖŖ Aadhaar Card | Name, DOB, Gender, Aadhaar Number*, Address, Pincode |
š Passport | Name, Passport Number*, Nationality, DOB, Expiry, Sex, MRZ |
š PAN Card | Name, Father's Name, DOB, PAN Number* |
š Driving License | Name, DOB, DL Number*, Validity, Address, Vehicle Classes |
š Any Image | Raw text + auto-detected document type + key-value pairs |
* Sensitive fields are masked by default for privacy.
Related MCP server: Docalyze
š Quick Start
Step 1: Install Tesseract OCR (Windows)
Tesseract must be installed separately ā it's the OCR engine under the hood.
Download from: https://github.com/UB-Mannheim/tesseract/wiki
Run the installer (choose Additional script data ā Hindi if needed)
Default install path:
C:\Program Files\Tesseract-OCR\tesseract.exeAdd to PATH, or set in your environment:
$env:TESSDATA_PREFIX = "C:\Program Files\Tesseract-OCR\tessdata"
Step 2: Install Python Dependencies
cd d:\mcp
pip install -r requirements.txtStep 3: Test the Server
# Run the MCP Inspector (opens browser UI to test tools)
fastmcp dev server.pyOr test directly:
python server.pyš¤ Connect to Claude Desktop
Find your Claude Desktop config file:
C:\Users\<YourName>\AppData\Roaming\Claude\claude_desktop_config.jsonAdd this to the config:
{ "mcpServers": { "document-ocr": { "command": "python", "args": ["d:\\mcp\\server.py"] } } }Restart Claude Desktop
You'll see the š tools icon ā your OCR tools are ready!
š¬ Example Claude Prompts
Once connected, you can ask Claude:
Extract all information from my Aadhaar card at C:/Users/me/aadhaar.jpgWhat's the expiry date on my passport? Image is at D:/docs/passport.pngRead the PAN card image at C:/scans/pan.jpg and tell me the PAN numberAuto-detect what type of document this is and extract all fields:
C:/Downloads/document.jpgGet raw text from this image: C:/photos/certificate.pngš ļø MCP Tools Reference
extract_aadhaar(image_path, show_full=False)
Extract data from Aadhaar card front or back.
extract_passport(image_path, show_full=False)
Extract data from passport bio-data page. Uses MRZ parsing for high accuracy.
extract_pan_card(image_path, show_full=False)
Extract data from PAN card.
extract_driving_license(image_path, show_full=False)
Extract data from Driving License (front side recommended).
extract_any_document(image_path, document_type="auto", show_full=False)
Auto-detect document type and extract accordingly.
ocr_raw_text(image_path, language="eng")
Get raw OCR text from any image. Supports multi-language:
"eng"ā English"hin"ā Hindi"eng+hin"ā English + Hindi"eng+tam"ā English + Tamil
š Privacy & Security
Aadhaar numbers are masked to
XXXX XXXX 1234by defaultPAN numbers are partially masked to
AB*****4Fby defaultPassport numbers are partially masked by default
MRZ lines are redacted by default
Pass
show_full=Trueto any tool to disable maskingAll processing is 100% local ā no data is sent to any cloud service
š Project Structure
d:\mcp\
āāā server.py # FastMCP server (entry point)
āāā requirements.txt # Python dependencies
āāā pyproject.toml # Project config
ā
āāā tools/
ā āāā aadhaar.py # Aadhaar OCR
ā āāā passport.py # Passport OCR + MRZ parser
ā āāā pan_card.py # PAN Card OCR
ā āāā driving_license.py # Driving License OCR
ā āāā generic_ocr.py # Generic + auto-detect OCR
ā
āāā utils/
ā āāā image_preprocess.py # OpenCV preprocessing pipeline
ā āāā validators.py # Pydantic output models
ā āāā privacy.py # PII masking utilities
ā
āāā samples/ # Place test images hereā ļø Troubleshooting
Issue | Fix |
| Tesseract not in PATH ā see Step 1 above |
Low accuracy on Hindi text | Install Hindi language pack for Tesseract |
| Run |
Image not readable | Check file path is absolute and image is not corrupted |
Missing fields in output | Image quality too low ā try a higher resolution scan |
š License
MIT License ā free to use and modify.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceAn MCP server that enables Claude to perform OCR on local files using Mistral AI's document processing capabilities. It converts documents and images into markdown format for seamless analysis and interaction.Last updated
- AlicenseBqualityDmaintenanceAn MCP server that lets AI assistants read and visually analyze local documents ā PDFs, Excel spreadsheets, CSV files, Word documents, PowerPoint presentations, and images.Last updated448MIT
- Alicense-qualityAmaintenanceAn MCP server that enables Claude Desktop to search and read local documents via full-text and fuzzy search, providing direct access to indexed files without chunking.Last updatedMIT
- Alicense-qualityBmaintenanceMCP server that extracts clean text, tables, and structured data from documents, images, code, and audio files, supporting 97 formats with OCR, transcription, and code intelligence.Last updatedMIT
Related MCP Connectors
Identity resolution MCP server for phone/email lookups across 31+ services. Global + India coverage.
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shivamrawat2002/local-ocr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server