One prompt β 18+ academic databases β full text β your RAG Knowledge Base. Multi-source academic paper search, full-text reading, and automatic PDF ingestion into OpenWebUI Knowledge Base (RAG) β powered by the self-hosted papers-service (
papers_service_urlvalve), with direct zhihuiya (ζΊζ §θ½) literature/patent and IEEE Xplore integration.
- π Multi-Source Concurrent Search: Aggregate & de-duplicate results across 16+ open academic platforms (arXiv, PubMed, Semantic Scholar, OpenAlex, COREβ¦) β plus zhihuiya (ζΊζ §θ½), a premium scientific-literature MCP source enabled by apikey.
- π Full-Text Reading: Instant full-text for Open Access platforms, automatic PDF-parsing fallback, and metadata-level reads (abstract + bibliographic record) for index-only sources.
- π₯ Automated Knowledge Base Ingestion: Download papers and auto-upload & index them into OpenWebUI Knowledge Base for RAG citation and retrieval.
- π Built-in OA Fallback Chain: Source-native download β Open Access Repositories (OpenAIRE / CORE / Europe PMC / PMC) β Unpaywall β (Optional) Sci-Hub mirror.
- π Key-gated sources (auto-on/off): zhihuiya literature + patents and IEEE Xplore are enabled automatically when their apikey is set and skipped silently when not β no source list changes needed.
- π Patent Search & Full-Text (patsnap): First-ever patent source β semantic patent search (
search_patents) plus full claims + description + legal status as Markdown (read_patent). Shares the same zhihuiya apikey, also direct-connected. - π¬ IEEE Xplore: Direct REST API search (bypasses backend skeleton). Metadata-level results with abstract + citation count; OA papers include pdf_url.
- π― Smart Query Adaptation: Automatically adapts your query per source β semantic sources (OpenAlex, Semantic Scholar, PubMedβ¦) get the full natural-language query, while literal keyword sources (zhihuiya, DOAJ, IACR) get a cleaned core-keyword variant (quotes/boolean/noise stripped, then distilled to β€5 high-specificity terms). Recovers hits that would otherwise return zero, without losing semantics.
- π«π· HAL via Direct Connect: HAL is queried directly (bypassing a backend date-parsing bug) so it reliably returns results.
- π dblp & Zenodo via Direct Connect: dblp (CS bibliography) and Zenodo (OA repository) are queried directly, bypassing backend bugs (concurrency ConnectionError, isoformat crash). Zenodo records often include direct PDF links.
[User / OpenWebUI UI]
β
βββ OpenWebUI Native Python Tool (tool.py β dispatch, query adaptation, merge & dedup)
β
βββ search_papers()
β β
β βββΊ Direct REST/HTTP (no backend): arxiv, hal, pubmed, pmc, semantic,
β β openalex, crossref, europepmc, core, zenodo, openaire, ieee,
β β biorxiv/medrxiv (subject browse), iacr (HTML regex)
β β
β βββΊ Direct MCP (streamable-http, zhihuiya_apikey): zhihuiya, patsnap
β β
β βββΊ Via firecrawl/tavily (configured base URLs):
β β Β· firecrawl as a standalone web-search source
β β Β· google_scholar chain: firecrawl scrape β tavily extract(advanced)
β β β Apify actor (johnvc/google-scholar-api) β backend (last resort)
β β Β· dblp Anubis anti-bot fallback β firecrawl (headless solves JS PoW)
β β
β βββΊ papers-service (self-hosted FastAPI, papers_service_url valve;
β mirrors the retired mcpo/paper-search-mcp endpoint shapes):
β search safety net (doaj, scholar chain backend);
β ssrn/base/citeseerx/acm unimplemented (off by default)
β
βββ read_paper() βββΊ papers-service read tools (fast lane: 12 sources β
β arxiv/semantic/hal/pubmed/crossref/biorxiv full textβ¦)
β β 404 β pdf_url direct β jina reader fallback
β
βββ search_patents() / read_patent() βββΊ patsnap MCP (direct, streamable-http)
β
βββ download_paper_to_knowledge()
βββΊ [1] direct pdf_url download (+ title identity gate)
βββΊ [2] papers-service download_with_fallback (in-memory bytes):
native (arxiv/iacr/biorxiv) β OA repos (openaire/core/
europepmc/pmc) β Unpaywall β optional Sci-Hub,
every step title-gated β OWUI /api/v1/files β RAG
(no shared volume needed since v2.9.7)
Why the papers backend is only a safety net: every source with a healthy public API was moved to direct connect (v2.9 series) β the original paper-search-mcp's synchronous requests without timeouts once hung whole search batches, its scholar/ssrn/base adapters hit anti-bot walls, and its OR-query semantics returned irrelevant papers. papers-service keeps the same valve-driven safety net (doaj, the scholar chain's last resort) plus a real full-text read lane (12 sources) and the OA download chain; ssrn/base/citeseerx/acm remain unimplemented upstream.
default_sources = "arxiv,pubmed,semantic,crossref,openalex,pmc,core,europepmc,dblp,openaire,doaj,hal,zenodo,google_scholar,zhihuiya,ieee,firecrawl"
| Platform | Search | Read Tool | Native Download | Notes |
|---|---|---|---|---|
| arXiv | β (direct) | read_arxiv_paper |
β | Open PDF, fast & reliable |
| PubMed | β | β | Requires NCBI_API_KEY for rate limits |
|
| Semantic Scholar | β (direct) | read_semantic_paper |
β (OA) | Optional semantic_api_key valve (anonymous shared pool 429s often) |
| Crossref | β (direct) | β | Citation & DOI backbone | |
| OpenAlex | β (direct) | β | Open metadata backbone | |
| PMC / Europe PMC | β | β (OA) | High-quality biomedical full-text | |
| CORE | β (direct) | β (OA) | Global repository aggregator; optional core_api_key valve |
|
| IACR | β (direct) | read_iacr_paper |
β | Cryptography ePrints; direct HTML parsing (no JSON API exists) |
| HAL | β (direct) | β (OA) | Direct-connected (bypasses a backend date bug) | |
| OpenAIRE / DOAJ | β | Varies / Fallback | Record-dependent | Domain repositories |
| dblp | β (direct) | Record-dependent | CS bibliography (CS papers only); direct-connected (bypasses backend concurrency bug) | |
| Zenodo | β (direct) | β (mostly OA) | OA repository; direct-connected (bypasses backend isoformat bug); most records have PDFs |
| Platform | Search | Read Tool | Notes |
|---|---|---|---|
| zhihuiya (ζΊζ §θ½) | β
search_literature |
literature_bibliography |
Scientific-literature MCP, direct streamable-http. Enabled when zhihuiya_apikey (admin or user) is non-empty; skipped silently when no key |
| patsnap (ζΊζ §θ½δΈε©) | β
patsnap_search |
β
full text via patsnap_fetch |
Patent MCP (same key as zhihuiya). read_patent returns claims + description + legal status as Markdown |
| IEEE Xplore | β REST API | Direct REST API. Enabled when ieee_apikey is non-empty; skipped silently when no key. Metadata-level (abstract+bibliographic); OA papers have pdf_url |
|
| Google Scholar (fallback chain) | β firecrawl β tavily β Apify actor | β (use url) | Tier 1: firecrawl_base_url (e.g. mcpo β official firecrawl cloud) β scrapes the Scholar result page via stealth cloud egress, parses titles/authors/year/citations/PDF links from markdown. Tier 2: tavily_base_url β /extract with extract_depth=advanced (basic only returns bare titles). Tier 3: apify_rotator_base_url β the johnvc/google-scholar-api actor through the rotator's key pool (PAY_PER_EVENT; free tier works with reduced counts). None configured β scholar stays on the backend (anti-bot prone) |
| Source | Keyword search | Why not default |
|---|---|---|
| bioRxiv / medRxiv | β (subject-category browse) | Return latest ~30 days in a subject, not keyword search β would inject irrelevant results. Use explicitly via sources="biorxiv" + biorxiv_category |
| Google Scholar | β | Anti-bot 403 without help β set firecrawl_base_url (tier 1), tavily_base_url (tier 2) and/or apify_rotator_base_url (tier 3); see Key-gated Sources |
| SSRN | β | Search endpoints retired (soft-404/empty) + Cloudflare interactive challenge on api.ssrn.com (2026-09 verified). Backend silently returns 0. Marginal value for bio/CS (overlaps bioRxiv/medRxiv/arXiv) β not worth fixing |
| BASE | β | Anubis JS-PoW anti-bot (same family as dblp). firecrawl with waitForβ₯12s penetrates (verified 2026-09) β fixable, but heavy overlap with OpenAlex/CORE/OpenAIRE makes it low priority |
| CiteSeerX | β (code) | Endpoint dead (redirects to archive.org 404) |
| ACM | search is not yet implemented, no public REST API |
|
| Unpaywall | β | DOI lookup only β used in the download fallback chain to find OA PDFs, not a search source |
Different sources have very different query tolerances. search_papers automatically picks the right query shape per source β no configuration needed:
| Source class | Sources | Query sent |
|---|---|---|
| Semantic / tokenizing | openalex, semantic, crossref, pmc, europepmc, pubmed, openaire, core, patsnap | Your original full natural-language query (semantics preserved) |
| Literal keyword | zhihuiya, doaj | A cleaned core-keyword variant β quotes, bare OR/AND/NOT, and filler words stripped, then distilled to β€5 high-specificity terms |
| Direct (bypasses backend) | hal, zhihuiya, patsnap, dblp, zenodo, ieee, pubmed, pmc, arxiv, semantic, openalex, crossref, europepmc, core, biorxiv, medrxiv, iacr (+ google_scholar when any of firecrawl/tavily/apify valves set) | hal/arxiv use core; zhihuiya uses distilled; the rest use original. The papers-service backend serves the search safety net (doaj, google_scholar chain) β paper-search-mcp is retired |
bioRxiv/medRxivare not keyword search β they return the latest ~30 days of papers in a subject category, so they're excluded fromdefault_sources(a keyword query would inject irrelevant results). To browse a subject's new papers, call explicitly:sources="biorxiv"+biorxiv_category="biochemistry"(ormedrxiv_category="cardiovascular_medicine").
The retired mcpo + paper-search-mcp backend is replaced by a self-hosted
papers-service (FastAPI, port 3200) that mirrors the same endpoint shapes
(search_{source} / read_{source}_paper / download_with_fallback). Reference
deployment lives in the
firecrawl-portainer
branch (source + GH Actions image build + digest-pinned compose). Point the tool at it:
services:
papers-service:
image: ghcr.io/xyonium/firecrawl-papers-service # digest-pinned in production
environment:
SEMANTIC_SCHOLAR_API_KEY: "s2k-xxx" # optional, higher S2 quota
UNPAYWALL_EMAIL: "your_email@example.com"
networks: [open-webui]Since v2.9.7 downloads are streamed as in-memory bytes β no shared Docker volume between the backend and open-webui is needed anymore.
- Open OpenWebUI -> Workspace -> Tools.
- Create a new Tool and copy the contents of
tool.py. - Save the tool and optionally configure the Valves / UserValves:
papers_service_url: papers-service base URL (defaulthttp://papers-service:3200/papers).knowledge_id: Default Knowledge Base ID to automatically store downloaded papers.allow_scihub: Set toTrue/Falsefor Sci-Hub fallback.scihub_url: Custom Sci-Hub mirror URL (e.g.https://sci-hub.ee).
Key-gated sources are enabled automatically when their key is set and skipped silently when not β no need to add them to default_sources.
zhihuiya (ζΊζ §θ½) + patsnap:
- Set
Valves.zhihuiya_apikey(admin, company-wide) orUserValves.zhihuiya_apikey(per-user, overrides admin) - Enables both
zhihuiya(literature) insearch_papersandsearch_patents/read_patent(patent tools)
IEEE Xplore:
- Set
Valves.ieee_apikey(admin) orUserValves.ieee_apikey(per-user, overrides admin) - Enables
ieeeinsearch_paperswhen key is present - Get a free key at developer.ieee.org
Once installed, OpenWebUI models can call the following tools:
-
search_papers(query, sources, max_results_per_source)
Searches papers concurrently across sources and returns formatted metadata with DOI & PDF links.- Key-gated sources (zhihuiya, ieee) are auto-enabled when their key is set, auto-skipped otherwise β no need to list them in
sourcesordefault_sources.
- Key-gated sources (zhihuiya, ieee) are auto-enabled when their key is set, auto-skipped otherwise β no need to list them in
-
read_paper(source, paper_id, pdf_url)
Reads the full text of a target paper (with automatic PDF fallback). -
download_paper_to_knowledge(title, source, paper_id, doi, pdf_url)
Downloads the paper via direct URL or OA fallback chain, uploads it to OpenWebUI, and links it directly into your RAG Knowledge Base. -
search_patents(query, limit, sort, filters)(requires zhihuiya_apikey)
Semantic patent search β returns patent_number / title / IPC / legal_status / dates / assignees / cited_count. -
read_patent(patent_number, max_chars)(requires zhihuiya_apikey)
Reads a patent's full text as Markdown β bibliographic data, claims, description, and legal status.
Offline unit tests (mocked HTTP, no network):
python3 -m pytest tests/ -qPer-source live smoke test β tells network/rate-limit/anti-bot problems apart from code bugs:
python3 scripts/live_sources.py # all key-free sources
python3 scripts/live_sources.py hal dblp # specific sources only
SEMANTIC_API_KEY=... IEEE_APIKEY=... CORE_API_KEY=... ZENODO_ACCESS_TOKEN=... \
python3 scripts/live_sources.py # include key-gated sourcesEach source is queried with a known-stable term; the report shows PASS/FAIL/EMPTY + hit count + latency. FAIL containing 429 = rate limit (configure a key or retry later), 504/timeout = transient network, εη¬/ι JSON = IP blocked by anti-bot (e.g. dblp's Anubis challenge) β none of these are code bugs.
Special thanks to the open-source projects that make this integration possible:
- paper-search-mcp: The original MCP backend (now retired from this stack); its OA download chain design lives on in papers-service
download_with_fallback. - mcpo: The OpenAPI-to-MCP bridge β still hosting the firecrawl gateway in this stack.
- OpenWebUI: The open-source AI user interface and RAG ecosystem.
- zhihuiya (ζΊζ §θ½): Premium scientific-literature data, connected via its streamable-http MCP endpoint.
Distributed under the MIT License.