DeepZotero
Semantic search over a Zotero library. PDFs are extracted (text, tables, figures), chunked, embedded, and stored in ChromaDB. An MCP server exposes the index to Claude Code (or any MCP client) as 10 tools for semantic and exact-word search over text, tables and figures, context expansion, citation graph lookup, indexing, and cost tracking.
What it extracts
- Text — section-aware chunks with overlap, classified by document section (abstract, methods, results, etc.)
- Tables — vision-based extraction via Claude Haiku 4.5. Each table is rendered to PNG and transcribed to structured markdown (headers, rows, footnotes). Table extraction is vision-only: with vision disabled, or without an Anthropic key, no tables are extracted.
- Figures — detected with captions, extracted as PNGs, searchable by caption text.
Requirements
- Python 3.10+
- A Gemini API key for embeddings (unless using
embedding_provider: "local")
- An Anthropic API key for vision-based table extraction (optional but recommended)
- Zotero 8 with PDFs in
storage/. Citation keys are read from Zotero's native citationKey field, which earlier versions do not have — on Zotero 7 every citation key comes back empty.
- Tesseract-OCR — only needed to OCR scanned / image-only PDF pages. Install Tesseract with the language data you need, then set the
TESSDATA_PREFIX environment variable to its tessdata directory (e.g. C:\Program Files\Tesseract-OCR\tessdata). PyMuPDF locates the OCR data via that variable; without it, scanned pages are skipped ("OCR disabled because Tesseract language data not found."). Text-based PDFs do not need Tesseract.
Install as a Claude Code plugin
Requires uv on PATH. The repo is its own marketplace:
/plugin marketplace add ccam80/deep-zotero
/plugin install deep-zotero
The server launches through uvx, which fetches the pinned deep-zotero wheel from PyPI and caches it.
In the environment Claude Code starts from, set DEEP_ZOTERO_DATA_DIR (the Zotero data directory holding zotero.sqlite and storage/), DEEP_ZOTERO_CHROMA_PATH (where the index lives), GEMINI_API_KEY (embeddings) and ANTHROPIC_API_KEY (vision table extraction during indexing).
Index the library once before searching: deep-zotero-index -v.
/deep-zotero:install walks a coding agent through the whole setup: variables, Tesseract, and the first index.
Setup
1. Configuration
The four environment variables above are the whole configuration. Every other setting has a sensible default.
To override more than those four, write a JSON config and point DEEP_ZOTERO_CONFIG at it (or pass --config PATH to the CLI):
{
"zotero_data_dir": "~/Zotero",
"chroma_db_path": "~/.local/share/deep-zotero/chroma",
"gemini_api_key": "YOUR_GEMINI_KEY",
"anthropic_api_key": "YOUR_ANTHROPIC_KEY"
}
A config file takes precedence over the environment wherever both supply a setting. See Configuration reference for every field.
2. API keys
Gemini (required for default embeddings):
Get a key at aistudio.google.com/app/apikey. Set it as gemini_api_key in config or GEMINI_API_KEY env var. If you don't want to use Gemini, set "embedding_provider": "local" to use ChromaDB's built-in all-MiniLM-L6-v2 model (no API key needed, lower quality).
Anthropic (required for vision table extraction):
Get a key at console.anthropic.com. Set it as anthropic_api_key in config or ANTHROPIC_API_KEY env var. Table extraction is vision-only — without this key, text and figures are still indexed but no tables are extracted. Vision extraction uses the Anthropic Batch API with Claude Haiku 4.5 — cost is roughly $0.016 per table, with prompt caching reducing cost on large batches.
To disable vision extraction entirely:
{
"vision_enabled": false
}
3. Index your library
deep-zotero-index -v
To test with a subset first:
deep-zotero-index --limit 10 -v
This reads the Zotero SQLite database (read-only, safe while Zotero is open), extracts text/tables/figures from each PDF, chunks the text, embeds via Gemini, and stores everything in ChromaDB.
CLI options:
| Flag | Description |
|---|
--force | Delete and rebuild index for all matching items |
--limit N | Only index N items |
--item-key KEY | Index a single Zotero item |
--title PATTERN | Regex filter on title (case-insensitive) |
--no-vision | Skip vision table extraction for this run |
--config PATH | Use a different config file |
-v | Debug logging |