Preprint Fulltext

io.github.genecell由 GitHub 帳號 genecell 發布v0.1.0更新於 Oct 24, 2026

bioRxiv/medRxiv/arXiv preprint full text as structured sections for AI agents + search.

概覽

AI 產生的概覽

取得 bioRxiv、medRxiv 與 arXiv 預印本全文,輸出附章節標籤的結構化文字,並可搜尋與解析預印本。

可以做什麼
  • 依關鍵字、標題、摘要或作者在 Europe PMC、OpenAlex 與 arXiv 搜尋預印本
  • 透過 DOI、網址或 arXiv 編號取得單篇預印本全文,依摘要、方法、結果、討論等章節結構化輸出
  • 查詢中繼資料並將識別碼解析為標準紀錄
  • 依主題與日期區間探索文獻
  • 回傳附授權與來源標註的文字,便於引用或切塊
適用情境
適合需要讓助理閱讀摘要以外內容的情境:文獻深度研究、方法與實驗流程擷取、對照結果章節驗證結論,或為預印本文獻建立依章節切塊的 RAG 語料。
執行需求
以 Python 套件(PyPI 上的 preprint-fulltext)形式透過 stdio 在本機執行,可用 uvx 或已安裝的指令啟動。建議設定 CONTACT_EMAIL 以使用 Europe PMC 與 OpenAlex 的 polite pool;使用 OpenAlex 搜尋與探索需設定 OPENALEX_API_KEY。需要連線至 Europe PMC、OpenAlex 與 arXiv 的網路。
安裝前請注意
伺服器會向第三方服務(Europe PMC、OpenAlex、arXiv)發出請求,並傳送 CONTACT_EMAIL 與 OPENALEX_API_KEY。從 openRxiv S3 儲存桶大量擷取屬請求方付費模式且需要 AWS 憑證,但該功能並未以工具形式提供。輸出僅供操作者自行進行文字與資料探勘;再散布模式會將不可再散布的作品降級為僅含連結的回連存根。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Preprint Fulltext,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

preprint-fulltext

English | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | 日本語

[PyPI] [Python] [License: BSD-3-Clause] [CI]

Retrieve the full text of bioRxiv / medRxiv / arXiv preprints as clean, structured, embedding-ready data — from a CLI, a Python library, or an MCP server.

preprint-fulltext turns a DOI (or a search) into structured sections (abstract / introduction / methods / results / discussion), a single JSON/Markdown document, or a chunked JSONL/Parquet corpus ready for embeddings and RAG. openRxiv text-and-data-mining (TDM) compliance is enforced structurally, not left to the user.

"Embedding-ready" means the output is clean, section-aware, token-bounded chunks — ready to feed to your embedding model. Computing embeddings is an optional last step you own; this tool does not bundle an embedding model.

Contents


Why

Preprint full text is scattered across incompatible channels: Europe PMC serves JATS XML for the open-access subset, the openRxiv S3 buckets hold the authoritative .meca corpus (requester-pays), OpenAlex is a catalog with n-gram-only full-text search, and the bioRxiv/medRxiv websites render HTML. preprint-fulltext unifies them behind one canonical data model and one shared JATS parser, so you get the same structured output no matter where a document came from.

Who it's for

  • ML / NLP researchers building embedding corpora or RAG systems over the preprint literature.
  • Bioinformaticians and labs who need a paper's methods/results as clean text for analysis, extraction, or LLM pipelines.
  • Coding agents (via the MCP server / SKILL.md) that need to pull a preprint's full text or search the literature mid-task.
  • Anyone who wants one preprint's sections from a DOI without hand-parsing JATS or scraping HTML.

Full text for AI-driven science

Language models and agents reason far more reliably over a paper's methods and results than over its abstract alone — most scientific claims, protocols, quantities, and caveats live in the body. preprint-fulltext gives Claude, Codex, and other agents that body as clean, section-labeled, provenance- and license-tagged text, which is the substrate for grounded scientific reasoning and deep research:

  • Literature deep-research — read across many papers' full text, not just abstracts.
  • Methods / protocol extraction — pull exact procedures, parameters, and datasets.
  • Claim verification — check a stated result against the actual Results section.
  • Reproducibility & meta-analysis — compare methods and numbers across studies.
  • RAG over your own corpus — section-aware, token-bounded chunks with citations.

Because every Section/Chunk carries its kind (methods / results / …), source, and license, an agent can cite precisely (which section of which paper/version) and stay within-license while it reasons. Full text is retrieval, not memorization: the model grounds its reasoning in the primary source instead of recalling a possibly-stale summary.

Features

  • get <id> — one preprint's full text as structured JSON or Markdown. bioRxiv/ medRxiv route Europe PMC → S3 (opt-in HTML fallback); arXiv ids route to arXiv's LaTeXML full text (native HTML → ar5iv). Latest version by default; --version selects one.
  • search / discover — keyword, title, abstract, or author search across Europe PMC, OpenAlex, and arXiv; topic/category/date discovery.
  • ingest — resumable, incremental bulk ingestion from the openRxiv S3 buckets into a chunked corpus (JSONL or Parquet) with a sidecar manifest.
  • MCP server — the same capabilities as tools for coding agents.
  • Compliance built in — an export gate degrades non-redistributable works to link-back stubs; unknown licenses are treated as non-redistributable (fail-safe).
  • One JATS parser shared by the Europe PMC and S3 paths; token- and section-aware chunking with deterministic, idempotent chunk ids.

Install

bash
pip install preprint-fulltext                       # CLI + Python library + MCP serverpip install "preprint-fulltext[parquet,openalex]"   # + Parquet output, pyalex

The MCP server is built in — no extra install and no third-party MCP framework. It's a small, self-contained JSON-RPC 2.0 stdio server, so preprint-fulltext-mcp works out of the box with only the core dependencies.

Set a contact email for the Europe PMC / OpenAlex polite pools (recommended), and an OpenAlex API key if you use OpenAlex (required by OpenAlex since 2026-02-13):

bash
export CONTACT_EMAIL="[email protected]"export OPENALEX_API_KEY="..."            # only needed for OpenAlex discover/search

Quickstart (CLI)

bash
# Structured full text for one preprint (Europe PMC → S3 router)preprint-fulltext get 10.1101/2024.01.15.575000 --markdown
# Accepts a DOI, a doi.org URL, or a bioRxiv/medRxiv content URLpreprint-fulltext get https://www.biorxiv.org/content/10.64898/2026.06.13.731750v1.full --html --markdown
# Versions: the DOI resolves to the latest version by default; --version selects onepreprint-fulltext get 10.64898/2026.01.29.702557 --version 1 --source html --markdown
# arXiv: id, arxiv.org URL, or 10.48550/arXiv.* DOI — routed to arXiv LaTeXML full textpreprint-fulltext get arXiv:1706.03762 --markdownpreprint-fulltext get https://arxiv.org/abs/2401.10515 --markdown
# Search: keyword, title, or author (add --source arxiv to search arXiv)preprint-fulltext search "cortical interneurons" -n 20preprint-fulltext search "Fezf2" --field titlepreprint-fulltext search "Min Dai" --field authorpreprint-fulltext search "diffusion model" --field title --source arxiv
# Discover by topic + date window (OpenAlex)preprint-fulltext discover --query "spatial transcriptomics" --since 2025-01 -n 100
# Bulk corpus from S3 (requester-pays; needs AWS credentials)preprint-fulltext ingest corpus.jsonl --source s3 --server biorxiv --since 2025-06
# A free, no-AWS corpus of the open-access (CC) subset via Europe PMCpreprint-fulltext ingest corpus.jsonl --source europepmc --query "long covid"

get emits a FullText document (JSON) or Markdown (--markdown). search / discover stream one SearchHit per line (JSONL). ingest writes one Chunk per line plus a <out>_manifest.jsonl audit/resume sidecar.

Typical workflows

1. Read one paper's methods/results as text.

bash
preprint-fulltext get 10.64898/2026.01.29.702557 --markdown > paper.md# -> # Title / ## Abstract / ## Introduction / ## Methods / ## Results / ## Discussion

2. Build an embedding-ready corpus on a topic (free, no AWS).

bash
# CC/open-access subset via Europe PMC — one Chunk per JSONL linepreprint-fulltext ingest cortex.jsonl --source europepmc --query "cortical interneurons" -n 500# cortex.jsonl          -> {doi, version, chunk_id, section_kind, text, token_count, license, ...}# cortex_manifest.jsonl -> one row per preprint (doi, version, license, n_chunks, status)

3. Build the complete corpus for a month from S3 (requester-pays).

bash
export AWS_PROFILE=...           # needs AWS credentials; ~$0.09/GBpreprint-fulltext ingest 2025-06.jsonl --source s3 --server both --since 2025-06 --format parquet# resumable: rerun after an interruption and it skips finished preprints (no duplicates)

4. Find papers by author or title, then fetch.

bash
preprint-fulltext search "Min Dai" --field author -n 20 > hits.jsonlpreprint-fulltext get "$(head -1 hits.jsonl | python -c 'import sys,json;print(json.load(sys.stdin)["doi"])')" --markdown

5. Give a coding agent literature access — run preprint-fulltext-mcp and point your agent at it (see skills/preprint-fulltext/SKILL.md).

Python

python
from preprint_fulltext.pipeline.router import Router
result = Router().get_fulltext("10.1101/2024.01.15.575000")if result.fulltext:    for section in result.fulltext.sections:        print(section.kind, section.title)
from preprint_fulltext.core.chunk import chunk_fulltextchunks = chunk_fulltext(result.fulltext)   # embedding-ready Chunk records

MCP server

Give a coding agent live preprint access. The server exposes four tools — search_preprints, get_fulltext, get_metadata, resolve — over stdio. (Bulk ingest is intentionally not a tool: it is long-running and incurs requester-pays cost.)

mcp-name: io.github.genecell/preprint-fulltext

It's a local stdio server, so it works in Claude Code / Cursor / VS Code / Windsurf / Zed / Codex / Cline — but not the claude.ai web app (there, use the Skill instead).

Recommended: run via uvx (no install)

uv runs the published package on demand — nothing to pip install or keep on a PATH. Install uv once:

bash
curl -LsSf https://astral.sh/uv/install.sh | sh    # macOS / Linux# or:  pipx install uv  |  pip install --user uv  |  brew install uv  |  winget install astral-sh.uv

The launch command is uvx --from preprint-fulltext preprint-fulltext-mcp (the --from is needed because the run command differs from the package name). First launch downloads the package (~30 s); later launches are cached.

Claude Code — key mcpServers
bash
claude mcp add preprint-fulltext --scope user -- uvx --from preprint-fulltext preprint-fulltext-mcp# uvx not on PATH? use its absolute path:claude mcp add preprint-fulltext --scope user -- "$(which uvx)" --from preprint-fulltext preprint-fulltext-mcpclaude mcp get preprint-fulltext        # verify → Status: ✔ Connected

Or edit ~/.claude.json (user) / project .mcp.json:

json
{ "mcpServers": { "preprint-fulltext": {  "command": "uvx",  "args": ["--from", "preprint-fulltext", "preprint-fulltext-mcp"],  "env": { "CONTACT_EMAIL": "[email protected]" }} } }
Cursor / Windsurf / Cline / Continue — key mcpServers (same shape)

Cursor: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project). Windsurf: ~/.codeium/windsurf/mcp_config.json. Cline: MCP Servers → Configure. Continue: ~/.continue/config.

json
{ "mcpServers": { "preprint-fulltext": {  "command": "uvx",  "args": ["--from", "preprint-fulltext", "preprint-fulltext-mcp"],  "env": { "CONTACT_EMAIL": "[email protected]" }} } }
VS Code (GitHub Copilot, Agent mode) — key servers + type

.vscode/mcp.json (workspace) or user settings.json under "mcp":

json
{ "servers": { "preprint-fulltext": {  "type": "stdio",  "command": "uvx",  "args": ["--from", "preprint-fulltext", "preprint-fulltext-mcp"]} } }

Or one-shot: code --add-mcp '{"name":"preprint-fulltext","command":"uvx","args":["--from","preprint-fulltext","preprint-fulltext-mcp"]}'

Zed — key context_servers (different shape)

~/.config/zed/settings.json:

json
{ "context_servers": { "preprint-fulltext": {  "source": "custom",  "command": "uvx",  "args": ["--from", "preprint-fulltext", "preprint-fulltext-mcp"],  "env": {}} } }
Codex (OpenAI Codex CLI) — TOML, not JSON

~/.codex/config.toml:

toml
[mcp_servers.preprint-fulltext]command = "uvx"args = ["--from", "preprint-fulltext", "preprint-fulltext-mcp"]# env = { CONTACT_EMAIL = "[email protected]" }

Or: codex mcp add preprint-fulltext -- uvx --from preprint-fulltext preprint-fulltext-mcp

Alternative: install with pip

If you already pip install preprint-fulltext, the server is on your PATH as preprint-fulltext-mcp — use "command": "preprint-fulltext-mcp" (no args) in any config above.

Env vars: set CONTACT_EMAIL (Europe PMC / OpenAlex polite pools) and OPENALEX_API_KEY (only for OpenAlex search/discover) via the config's env block, or in your shell before launching the client. See SKILL.md for the full agent-facing tool reference.

Data sources & routing

VerbDefault sourceNotes
getauto (Europe PMC → S3, or arXiv)bioRxiv/medRxiv: EPMC (CC/OA subset) → S3 (complete, needs AWS creds), --html opt-in fallback. arXiv ids → arXiv LaTeXML full text (native HTML → ar5iv).
searchEurope PMCReal relevance ranking; --source openalex|arxiv.
discoverOpenAlex250M+ works, OA locations, topic/date; --source arxiv.
ingestS3 (or Europe PMC)S3 = complete corpus; Europe PMC = free CC subset. arXiv bulk is out of scope (use arXiv's own S3 LaTeX bucket).

Configuration

Via environment variables (prefixed PREPRINT_FULLTEXT_ or the bare names below), a .env file, or a preprint-fulltext.toml:

SettingDefaultPurpose
CONTACT_EMAIL–Polite-pool identity for Europe PMC / OpenAlex
OPENALEX_API_KEY–Required by OpenAlex since 2026-02-13
AWS_REGIONus-east-1Region for the requester-pays openRxiv buckets
PREPRINT_FULLTEXT_CACHE_DIR~/.cache/preprint-fulltextContent-addressed cache
PREPRINT_FULLTEXT_CHUNK_TOKENS512Max tokens per chunk
PREPRINT_FULLTEXT_CHUNK_OVERLAP64Token overlap within a section

Compliance

Corpora are for the operator's own text/data mining under the openRxiv TDM terms. preprint-fulltext does not re-host or redistribute preprint full text. Every FullText/Chunk carries its license; the export gate has two modes:

  • analysis (default): pass-through for your own mining.
  • redistribution (--redistribution): works whose license permits redistribution pass unchanged; all others are degraded to a link-back stub (metadata + URL, no body text). Unknown/ambiguous licenses are treated as non-redistributable.

Development

bash
pip install -e ".[dev]"pytest              # offline suite (HTTP mocked with respx, S3 with moto)ruff check preprint_fulltext/

Live tests are opt-in (they hit the real public APIs — Europe PMC, arXiv, and the bioRxiv/medRxiv JSON API):

bash
PREPRINT_FULLTEXT_LIVE=1 [email protected] pytest -m live   # EPMC / arXiv / medRxiv / versionsPREPRINT_FULLTEXT_LIVE_S3=1 pytest -m live_s3    # requester-pays S3 (small; needs AWS creds)

The same live smoke runs in CI on demand (Actions → live-smoke) and weekly, to catch upstream API drift; the default test workflow stays fully offline.

Agent docs (AGENTS.md, llms.txt, .cursor/rules/…, .github/copilot-instructions.md) are generated from skills/preprint-fulltext/SKILL.md:

bash
python scripts/build_agent_docs.py

Contact

Min Dai — [email protected] (Gord Fishell Lab, Harvard Medical School / Broad Institute). Issues and pull requests welcome at https://github.com/genecell/preprint-fulltext.

License

BSD-3-Clause (see LICENSE). This covers the software only — retrieved preprint content remains under its author-selected license.

來源:README.md,提交 625c926

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。