
Biolit
io.github.rachadele由 GitHub 帳號 rachadele 發布v0.1.25更新於 Oct 24, 2026
LLM-assisted biomedical literature screening and extraction for PubMed, GEO, and preprints.
概覽
本機 MCP 伺服器,讓助理用 LLM 篩選生物醫學論文與預印本,並從中擷取結構化欄位。
- 可以做什麼
- 對混合的 PMID、DOI 與 GEO 編號,或 BibTeX 檔案、提醒郵件、編號檔案執行完整流程,輸出結果 CSV 與可選的 markdown 摘要,並保留每筆記錄的產物與失敗說明。取得 PubMed 記錄、GEO 記錄及其關聯論文的詮釋資料與全文,取得補充資料,並把 DOI 解析為 PMID 與 PMCID。依指定條件對單篇論文或已取得的文字做相關性篩選,並擷取自訂或預設欄位,例如方法、樣本類型與摘要。從 PubMed 提醒郵件解析 PMID,並回傳已安裝套件的版本。
- 適用情境
- 適合生物醫學領域的文獻回顧與每週提醒郵件分流,需要助理批次判斷相關性並一致擷取欄位時使用。也適合單獨查核某篇論文或某個 GEO 資料集。
- 執行需求
- 以 Python 3.8+ 的 PyPI 套件在本機執行,用 biolit-mcp 指令啟動。需要 LLM 供應商:預設使用 ANTHROPIC_API_KEY,使用 OpenAI 時需 OPENAI_API_KEY,或改用本機 Ollama 模型。可選 SEMANTIC_SCHOLAR_API_KEY 以提高引用查詢額度,UNPAYWALL_EMAIL 用於取得 PDF。需要連線 PubMed、Europe PMC、預印本伺服器與出版商網站的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Biolit,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
biolit
mcp-name: io.github.rachadele/biolit
LLM-assisted biomedical literature screening and structured extraction. Accepts PubMed alert emails and mixed lists of PMIDs, DOIs, and GEO accessions in any combination. Retrieves full text from PMC, Europe PMC, bioRxiv/medRxiv, Unpaywall, and Semantic Scholar. Supports multiple LLM providers and exposes all functionality as an MCP server.
Setup
Requirements: Python 3.8+
Install from PyPI:
Or install from source for development:
Copy .env.example to .env and add your API key:
On macOS, you can store the key in the system keychain instead of .env. biolit consults the keychain by service name only (no account required):
Omit -w <value> to be prompted for the key without echoing it. The keychain is checked first; the env var is used only as a fallback (so a stale value in .env cannot mask a working keychain entry).
Usage
The tool accepts a PubMed alert email (.eml) or a plain-text file of identifiers, as well as inline identifiers via --ids. Identifiers can be PMIDs, DOIs, or GEO accessions — mixed lists are supported in a single run.
Use --default to run with schizophrenia genomics defaults (no prompts):
Or specify criterion and fields as flags:
Add --markdown (or --md) to also write a prose .md summary alongside the CSV. Each record gets a markdown section with ### field subsections; records that failed or were skipped appear as stub entries:
Add --batch to issue screening, extraction, and markdown rendering through the provider's Message Batches / Batch API instead of one call per record. Per-request cost drops by ~50%, but each batch blocks on completion (typically several minutes per stage; up to 6 hours), so it's intended for the bulk weekly-alert case rather than one-off lookups. Anthropic and OpenAI only — falls back to sequential calls on Ollama or on OpenAI-compatible endpoints with a custom base_url. Also accepted as "batch": true in a config file.
Or use a JSON config file to store reusable parameters (CLI flags take precedence). The config can include ids or input_file (path to an .eml, .bib, or identifier list), and "markdown": true to enable markdown output:
The fields key in a config file can be a comma-separated string or a JSON object mapping field names to extraction descriptions. When a string is used, an extra LLM call converts the field names into descriptions before extraction. When a dict is used, that call is skipped — the descriptions are passed directly to the model:
Omit --criterion to skip screening (all records are extracted). Omit --fields to use the default fields (methodology, sample_type, causal_claims, summary):
Single-record screening
Use biolit screen to quickly check one paper or GEO record for relevance without running the full extraction pipeline:
Output is a single line to stdout:
Mixed identifier lists
PMIDs, DOIs, and GEO accessions can be freely mixed in a file or via --ids. Each identifier is auto-detected by format:
41795042→ PMID (all digits)10.1101/2025.03.17.25324098→ DOI (starts with10.)GSE53987→ GEO accession (starts withGSE,GDS,GSM, orGPL)
GEO records additionally include a linked_pmids column. All record types share pmid, doi, and geo_accession columns (null when not applicable).
Full-text retrieval
Full-text retrieval runs automatically for every PMID and DOI (including preprints). For GEO records, the pipeline attempts full-text retrieval via each linked PMID in order, falling back to the GEO record metadata if no linked paper has accessible full text. The pipeline tries each source in order:
- PMC JATS XML (open access)
- Europe PMC JATS XML (broader open-access coverage)
- Preprint XML (bioRxiv / medRxiv)
- Unpaywall PDF (requires
--unpaywall-email) - Semantic Scholar open-access PDF
- OpenAlex green-OA PDF (author manuscripts Unpaywall/S2 miss; key-less)
- Europe PMC open-access full-text PDF (OA subset)
- CORE aggregated green-OA PDF (opt-in; needs
CORE_API_KEY) - Publisher landing-page scrape (the
citation_pdf_urlmeta tag; key-less) - Custom resolvers (institutional OpenURL / library proxy; opt-in via
BIOLIT_CUSTOM_RESOLVERS) - Publisher landing-page HTML full text (the
citation_fulltext_html_urlmeta tag; key-less) - Abstract fallback
Steps 6-9 are all open-access-only (green-OA author manuscripts,
institutional-repository copies, and the publisher's own advertised OA
PDF link) — never a paywall bypass. OpenAlex, Europe PMC, and the
landing-page scrape need no key; CORE is a no-op unless CORE_API_KEY is
set. The landing-page scrape (step 9) follows the DOI to the article page
and reads the citation_pdf_url link the publisher itself embeds (the
Highwire / Google-Scholar standard) — this catches OA PDFs the aggregator
APIs mislabel or never index. bioRxiv / medRxiv are skipped there (their
servers block agents; the preprint step above covers them). Step 10 is
the seam for your own authorized access — see
Custom full-text fetchers. Step 11 is the
HTML counterpart of step 9: when no downloadable PDF exists at all, it
extracts the article body text from the publisher's full HTML page
(the citation_fulltext_html_url Highwire signal that PLOS / eLife / BMC
/ Frontiers and many society journals set) — recovering Methods text for
OA papers the PDF chain can never reach. When even that misses, the
abstract fallback records a paper_status classification (bot_blocked
/ js_shell / abstract) in the per-record artifacts so a caller can
read why full text was not reached.
To enable Unpaywall (step 4), pass your email:
Limit which sections are sent to the LLM:
LLM providers
The tool supports Anthropic (default), OpenAI, and local Ollama models:
You can also set LLM_PROVIDER and LLM_MODEL as environment variables.
Output
Each run creates a timestamped directory (e.g. run_20260313_142000/) containing:
results.csv— one row per relevant recordresults.md— prose markdown summary (written when--markdownor"markdown": truein config)artifacts/<id>/— per-record folder with the text sent to the LLM, metadata, and any retrieved full-text files
Records that fail at any pipeline stage (fetch error, not found, no content, screening or extraction error) are excluded from the CSV but appear in the markdown as stub entries with a failure note.
With default fields, the CSV columns are:
GEO records additionally include a linked_pmids column listing all associated PubMed IDs.
The CSV can be imported directly into Google Sheets (File → Import).
MCP server
biolit ships an MCP server that exposes the pipeline as tools for any MCP-compatible client (Claude Desktop, Claude CLI, OpenAI Agents SDK, etc.).
Start the server:
Or test interactively with the MCP inspector:
Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Restart Claude Desktop. The tools will appear in the tool picker. Drop args to use the default Anthropic provider (or set LLM_PROVIDER / LLM_MODEL env vars instead).
Configure Claude CLI
Add a .mcp.json in your project root:
Available tools
Batch pipeline (equivalent to the biolit CLI):
Low-level (for custom workflows):
Use as a Python library
The pipeline functions are importable directly:
Custom full-text fetchers
The built-in chain (PMC → Europe PMC → preprint → Unpaywall → Semantic Scholar → OpenAlex → Europe PMC OA PDF → CORE → landing-page PDF scrape → custom resolvers → landing-page HTML → abstract) leaves coverage gaps for closed-access or recently-published work. You can plug in additional sources of full text — a Zotero library, a flat directory of PDFs, an institutional full-text database — without forking biolit.
Landing-page scrape and custom resolvers (built-in, opt-in via env vars)
Two built-in chain steps mirror Zotero's "Find Full Text" file resolvers and are configured the same way as Unpaywall / CORE — through environment variables, no code changes.
Landing-page scrape (step 9). Always on, key-less. Resolves the DOI
to the publisher's article page and reads the PDF link the page itself
advertises — <meta name="citation_pdf_url"> first (the Highwire /
Google-Scholar standard most publishers embed), then <link rel="alternate" type="application/pdf">, Open Graph / Twitter-card PDF
pointers, and obvious *.pdf anchors. A <meta http-equiv="refresh">
redirect is followed once; every candidate is verified to start with the
%PDF magic. This follows the publisher's own advertised OA link — not
a paywall bypass — and catches OA PDFs the aggregator APIs mislabel or
never index. bioRxiv / medRxiv are skipped (their servers block agents;
the preprint step covers them). Source label: landing_page_pdf.
Landing-page HTML full text (step 11). Always on, key-less. The HTML
counterpart of step 9. When no downloadable PDF was found anywhere, this
follows the DOI to the article page, reads the publisher's
<meta name="citation_fulltext_html_url"> "a full HTML version exists"
signal (set by PLOS / eLife / BMC / Frontiers and many society journals),
and extracts the article body text — dropping nav / scripts / styles /
chrome and preferring an <article> / <main> container. This recovers
Methods text for OA papers that have no PDF at all. Bot-challenge pages
(Cloudflare "Just a moment") and JavaScript-rendered shells are rejected
rather than returned as "text". bioRxiv / medRxiv are skipped (the preprint
step covers them). Source label: landing_page_html. It shares the
BIOLIT_LANDING_USER_AGENT override above.
When the whole chain misses, the abstract fallback classifies why full
text was not reached (bot_blocked / js_shell / abstract) and records
it as paper_status in the per-record artifacts, so a downstream caller
can distinguish "blocked by a bot challenge" from "publisher serves only a
JS shell" from "genuinely abstract-only".
Custom resolvers (step 10). Opt-in. This is the seam for your own
authorized access — typically your institution's OpenURL endpoint or a
library EZproxy URL pattern. Set BIOLIT_CUSTOM_RESOLVERS to a JSON
array of resolver entries. Each entry needs a url_template with
{doi} / {url} placeholders; the URL is fetched with your configured
headers and returned if it is a real PDF. When the resolved URL is an
OpenURL / proxy landing page rather than a direct PDF, set
"scrape": true to run its HTML through the landing-page scraper above.
With nothing configured this step is a no-op. Source label:
custom_resolver_pdf.
Resolver-entry schema (only url_template is required):
biolit never hardcodes, requests, or stores credentials. Custom resolvers follow your configured URL patterns using your own authorized access (proxy login, session cookies, etc.). You are responsible for ensuring your use complies with your institution's and the publisher's terms of service.
Reference fetchers (opt-in via env vars)
Three ship with biolit and self-register on import when the relevant
environment variables are set. Default priorities (lower = tried
earlier) are bibtex=2.0, local_pdf=3.0, zotero=5.0.
BibTeX. Looks up papers by DOI, PMID, or citekey in a .bib
export, reads the path from each entry's file = {...} field, and
parses the PDF directly. Best fit for users who maintain a
Better-BibTeX (or equivalent) auto-export — lookups are offline,
in-memory, and exact, with no network round-trip and no dependence on
the Zotero search index. Works around the Zotero web API's q-search
not indexing the structured DOI field, which makes DOI lookups via
that API unreliable for items where the DOI doesn't appear in indexed
attachment full-text. Supports both BBT semicolon-separated file
lists and the classic JabRef description:path:type format. The bib
file is re-parsed automatically when its mtime changes.
Zotero. Searches the user's Zotero library by DOI then PMID,
resolves attachment search hits up to their parent items, finds an
attached PDF, downloads it, and parses it with biolit's PDF parser.
When the Zotero /file API endpoint returns 404 (linked_file
attachments, or imported attachments on accounts without sync), falls
back to reading the PDF from local Zotero storage at
$ZOTERO_DATA_DIR/storage/<key>/<filename> (default data dir
~/Zotero). Note: Zotero's web API q-search does not index the
structured DOI field, so the BibTeX fetcher above is more reliable
when both are available.
On macOS, any of ZOTERO_API_KEY, ZOTERO_USER_ID, and ZOTERO_GROUP_ID
that are not in the environment fall back to the macOS keychain
(security find-generic-password -s <NAME> -w), matching the resolution
order used for LLM API keys. This means hosts like Claude Code that
don't shell-source your profile can still pick up Zotero credentials
without an env block in .mcp.json.
Local PDF directory. Looks up papers by DOI in a pre-built JSON
index. Filenames are arbitrary — DOIs are extracted from each PDF's
/Info metadata dict and (failing that) its first-page text.
Build (or update) the index. Re-running is cheap — by default only new or changed PDFs are re-extracted:
Then point biolit at the same directory:
The fetcher itself never builds the index — it only consults it. PDFs
without an extractable DOI are listed in the index's
unindexed_sample for visibility.
When configured, the text_source field in CSV/markdown output is
bibtex_pdf, zotero_pdf, or local_pdf for hits from these
sources. The raw bytes are persisted into artifacts/<id>/bibtex_pdf
/ zotero_pdf / local_pdf exactly like the built-in PMC/Europe PMC
artifacts.
Writing your own fetcher
A fetcher is any callable that takes a FetchContext and returns either
a FetchResult (when it found something) or None (when it didn't).
Register before the first call to run / screen_by_* (e.g. at module
import time). Registered fetchers are tried before the built-in chain in
priority order; the first one to return a non-empty FetchResult.text
wins. Exceptions inside a fetcher are logged to stderr and the next
fetcher is tried.
Validation
An independent evaluation of the GEO screening and metadata extraction workflow is available at rachadele/biolit-eval. It uses a bootstrap resampling pipeline to estimate precision, recall, and F1 against a manually curated ground truth of 509 GEO accessions labelled for transcription factor perturbation experiments.
Known Limitations
- Papers without abstracts or accessible full text are skipped silently.
- GEO records attempt full-text retrieval via linked PMIDs.
text_sourcewill begeo_linked_fulltext,geo_linked_abstract, orgeo_recorddepending on what was accessible. - bioRxiv/medRxiv JATS XML is frequently blocked by Cloudflare regardless of headers. The pipeline falls back to the title and abstract from the bioRxiv API (
text_source: preprint_abstract). - The Semantic Scholar API allows roughly 100 unauthenticated requests per day. Set
SEMANTIC_SCHOLAR_API_KEYin.envfor higher limits.
來源:README.md,提交 a9e20f2
工具
0版本歷史
1- v0.1.25最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。