PaperCortex: Local AI Receipt Extraction and Bank Matching
- Models & engines
- Ollama for embeddings and classification
What they built
PaperCortex turns a Paperless-ngx archive into a queryable knowledge base, powered entirely by local AI through Ollama.
Tax returns, contracts, medical bills and bank statements are some of the most sensitive data people own, so the project sends document content only to your own Ollama instance.
Setup
- Paperless-ngx with an API token
- Ollama for embeddings and classification
- Local SQLite vector database
- MCP server interface for AI agents
How it works
- Polls the Paperless-ngx API for new and updated documents
- Ollama creates embeddings from OCR text
- The local LLM assigns document type, tags, correspondent, date and language
- Embeddings and extracted data go into local SQLite
- An MCP server exposes search, classify, extract, query and export tools
“Your documents stay in your network. Period.”— PaperCortex README
Do it yourself
- Run Paperless-ngx and Ollama on the same network
- Create a Paperless API token and keep it in environment variables
- Start PaperCortex pointing at both
- Ask questions in plain English, or connect an agent via MCP
Show me all invoices from Amazon over 100 EUR in 2025Similar setups
Auto-tagging documents in Paperless-ngx with Ollama
Since version 3.0, Paperless-ngx suggests titles, senders, document types and tags, and can chat with your documents, using a local Ollama model.
Paperless AI on an 8 GB RTX 3060 Ti shared with Frigate
Gemma 3 4B with embeddinggemma answers over 1,318 documents in about 5 seconds, on a GPU that's also running Frigate and Plex.
Checking who can reach a local Ollama and no-auth MCP stack
A developer audited their Mac's local AI stack and found an unauthenticated MCP search server open on the LAN address and a loopback-only Ollama still answering every Podman container.
Receipt Box: Gemma 3 4B in Ollama sorts a freelancer's receipts and VAT on the laptop
E. Smith built Receipt Box, a receipt and invoice sorter for freelancers where Gemma 3 4B with vision, running in Ollama on the user's own machine, reads vendor, date, total, VAT, currency and category from photos and PDFs.