Skip to content

v2.2.0 — Unpaywall PDF enrichment + opt-in Sci-Hub fallback

Choose a tag to compare

@psypeal psypeal released this 21 Apr 13:38
· 13 commits to main since this release

New: Unpaywall PDF enrichment

/knowledge-vault:enrich-references finds open-access PDFs for reference-only raw items (those with has_fulltext: false and a doi: field — typically Zotero items imported from PubMed/Crossref without an attached PDF). For each candidate it queries the Unpaywall API, downloads the OA PDF if available, runs pdftotext, condenses the result into the same Metadata / Abstract / Key Findings / Methods / Quantitative Data structure used by /knowledge-vault:ingest-zotero, and flips has_fulltext: true so the next compile picks it up.

Setup

export UNPAYWALL_EMAIL=you@example.com   # add to ~/.bashrc or ~/.zshrc to persist
sudo apt install poppler-utils           # provides pdftotext (optional but recommended)

Then:

/knowledge-vault:enrich-references            # scan all reference-only items
/knowledge-vault:enrich-references <slug>     # target a single item

Unpaywall is free, requires no signup, and indexes ~40-50% of all DOIs.

New: Optional, per-project Sci-Hub fallback

For papers Unpaywall can't find, an opt-in fallback routes the lookup through the community riichard/Sci-Hub-MCP-Server. It is strictly opt-in and per-project — never enabled by default and never installed user-globally.

Enable

/knowledge-vault:setup-scihub

This command:

  1. Prints a legal disclaimer and requires explicit yes to proceed.
  2. Installs the MCP via uv tool install "sci-hub-mcp-server @ git+https://github.com/riichard/Sci-Hub-MCP-Server".
  3. Registers it at project scope only: claude mcp add scihub -s project -- sci-hub-mcp --transport stdio.
  4. Writes a per-vault marker file .vault/.scihub-enabled.

After restart, /knowledge-vault:enrich-references automatically falls through to Sci-Hub when both the marker exists and the mcp__scihub__* tools are visible.

Disable

rm .vault/.scihub-enabled
claude mcp remove scihub

Both are local to the current project. The plugin neither hosts, mirrors, nor distributes any Sci-Hub content — it only invokes a third-party community MCP.

What's in this release

  • New command /knowledge-vault:enrich-references — Unpaywall enrichment with optional Sci-Hub fallback
  • New command /knowledge-vault:setup-scihub — opt-in installer with disclaimer + per-project MCP registration
  • New script scripts/enrich-references.sh — scans raw/ for has_fulltext:false + doi candidates
  • scripts/detect-mcp-sources.sh — Unpaywall detection by UNPAYWALL_EMAIL + scihub keyword match
  • commands/setup-sources.md — Unpaywall line + footer tip pointing to /knowledge-vault:setup-scihub
  • README: new PDF Enrichment (Unpaywall) and Advanced: Sci-Hub fallback sections, Sci-Hub row in the Supported servers table, updated mermaid, credits, and poppler-utils in requirements

Credits

  • Unpaywall — open-access PDF discovery API powering /knowledge-vault:enrich-references
  • riichard/Sci-Hub-MCP-Server — community MCP server (a fork of JackKuo666's original) used by the optional fallback