@cyanheads/biorxiv-mcp-server
Search and retrieve bioRxiv and medRxiv preprints — by DOI, date interval, or keyword — via MCP.
README
<div align="center"> <h1>@cyanheads/biorxiv-mcp-server</h1> <p><b>Search and retrieve bioRxiv and medRxiv preprints — by DOI, date interval, or keyword — via MCP. STDIO or Streamable HTTP.</b> <div>6 Tools</div> </p> </div>
<div align="center">
</div>
<div align="center">
</div>
Tools
Six tools for working with bioRxiv and medRxiv preprint data:
| Tool | Description |
|---|---|
biorxiv_get_preprint |
Fetch full metadata, abstract, revision history, and journal crosswalk for one or more preprints by DOI |
biorxiv_list_recent |
List preprints posted or updated within a date interval, with optional server and category filters |
biorxiv_search_preprints |
Search preprints by keyword and/or author via EuropePMC for relevance ranking, enriched with bioRxiv/medRxiv metadata |
biorxiv_get_published_version |
Resolve a preprint DOI to its journal publication record (journal DOI, name, published date) |
biorxiv_get_fulltext |
Retrieve a preprint's full text as best-effort Markdown extracted from its rendered HTML article page |
biorxiv_list_categories |
List valid subject category strings for bioRxiv and medRxiv |
biorxiv_get_preprint
Fetch preprint metadata by DOI — all revisions in one call.
- Batch fetch up to 10 DOIs in a single request
- Each DOI returns the full revision history in
collection[]— one API call per DOI, no enumeration loop - Includes title, authors, abstract, category, license, JATS XML full-text link (
jatsxml), and published journal DOI when the preprint has been accepted - Scope to
biorxiv,medrxiv, orboth; whenboth, each DOI fans out in parallel and partial failures report per-DOI infailed[]
biorxiv_list_recent
Page through preprints in a date interval.
- Server-side category filtering via
?category=…— pass a value frombiorxiv_list_categories - Fixed page size of 30 (API constraint); advance with integer
cursor(0, 30, 60, …) - Response includes
totalcount per server for calculating remaining pages - When
server="both", each server paginates independently; response surfaces per-server pagination state ({ biorxiv: { cursor, total }, medrxiv: { cursor, total } })
biorxiv_search_preprints
Keyword and/or author search with relevance ranking.
- EuropePMC powers relevance ranking (indexes new preprints within 1–2 days of posting); bioRxiv/medRxiv API provides canonical metadata enrichment
- Optional
authormaps to an EuropePMCAUTH:"…"field query, ANDed with the keyword query — supplyquery,author, or both - Covers both servers by default; scope down with
server - Optional date range filters (
date_from,date_to) - Enrichment failures degrade gracefully to EuropePMC-only metadata, surfaced via
partial_results
biorxiv_get_published_version
Resolve a preprint DOI to its journal publication crosswalk.
- Uses the
/pubs/{server}/{doi}endpoint for richer metadata than thepublishedfield inbiorxiv_get_preprint - Returns journal DOI, journal name, published date, and corresponding author institution
- Use when the preprint's
publishedfield is non-null and you need the full crosswalk record
biorxiv_get_fulltext
Retrieve a preprint's full text as best-effort Markdown.
- Fetches the rendered HTML article page (
www.{server}.org/content/{doi}v{N}.full) and extracts Markdown — there is no keyless JATS source - Resolves the latest version via the details API first, for the URL version and clean not-found handling
- Long articles page via
offset/limitcharacter chunking (totalChars,remainingChars,hasMore) - PDF-only preprints and blocked/challenge pages return a typed
fulltext_unavailableerror routing tobiorxiv_get_preprint
biorxiv_list_categories
Return the static subject category taxonomy for both servers.
- No API call — hardcoded static list (~30 bioRxiv + ~50 medRxiv categories)
- Use to validate category strings before passing to
biorxiv_list_recent
Features
Built on @cyanheads/mcp-ts-core:
- Declarative tool definitions — single file per tool, framework handles registration and validation
- Unified error handling across all tools
- Pluggable auth (
none,jwt,oauth) - Swappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1 - Structured logging with optional OpenTelemetry tracing
- STDIO and Streamable HTTP transports
bioRxiv-specific:
BiorxivApiServicewrapsapi.biorxiv.org— details, publications, and crosswalk endpoints with retry and exponential backoffEuropePmcServicewraps the EuropePMC search endpoint for relevance-ranked keyword and/or author resultsBiorxivFullTextServicefetches and extracts Markdown from the rendered HTML article pages onwww.biorxiv.org/www.medrxiv.org— a distinct origin from the JSON API- Two-server fan-out via
Promise.allSettled— bothbiorxivandmedrxivqueried in parallel whenserver="both", results merged and deduplicated by DOI - Polite
User-Agentheader including a mailto address (BIORXIV_MAILTOenv var) per Cold Spring Harbor Lab API guidelines - Pairs with pubmed-mcp-server (post-publication), openalex-mcp-server (citation analytics), and crossref-mcp-server (DOI metadata)
Getting started
Add the following to your MCP client configuration file.
{
"mcpServers": {
"biorxiv-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/biorxiv-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"BIORXIV_MAILTO": "your@email.com"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"biorxiv-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/biorxiv-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"BIORXIV_MAILTO": "your@email.com"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"biorxiv-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "-e", "BIORXIV_MAILTO=your@email.com", "ghcr.io/cyanheads/biorxiv-mcp-server:latest"]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 BIORXIV_MAILTO=your@email.com bun run start:http
# Server listens at http://localhost:3010/mcp
Prerequisites
- Bun v1.3.2 or higher (or Node.js v24+).
Installation
- Clone the repository:
git clone https://github.com/cyanheads/biorxiv-mcp-server.git
- Navigate into the directory:
cd biorxiv-mcp-server
- Install dependencies:
bun install
- Configure environment:
cp .env.example .env
# optionally set BIORXIV_MAILTO for polite API access
Configuration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
| Variable | Description | Default |
|---|---|---|
BIORXIV_MAILTO |
Email address included in the User-Agent header for polite API access per Cold Spring Harbor Lab guidelines. Optional, but recommended. |
— |
BIORXIV_API_BASE_URL |
Override the bioRxiv API base URL. | https://api.biorxiv.org |
EUROPEPMC_API_BASE_URL |
Override the EuropePMC base URL. | https://www.ebi.ac.uk/europepmc/webservices/rest |
BIORXIV_WEB_BASE_URL |
Override the bioRxiv website base URL (full-text HTML source for biorxiv_get_fulltext). |
https://www.biorxiv.org |
MEDRXIV_WEB_BASE_URL |
Override the medRxiv website base URL (full-text HTML source for biorxiv_get_fulltext). |
https://www.medrxiv.org |
MCP_TRANSPORT_TYPE |
Transport: stdio or http. |
stdio |
MCP_HTTP_PORT |
HTTP server port. | 3010 |
MCP_HTTP_ENDPOINT_PATH |
HTTP endpoint path. | /mcp |
MCP_AUTH_MODE |
Auth mode: none, jwt, or oauth. |
none |
MCP_LOG_LEVEL |
Log level (debug, info, warning, error, etc.). |
info |
LOGS_DIR |
Directory for log files (Node.js only). | <project-root>/logs |
OTEL_ENABLED |
Enable OpenTelemetry instrumentation. | false |
Running the server
Local development
-
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:http -
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t biorxiv-mcp-server .
docker run --rm -e BIORXIV_MAILTO=your@email.com -p 3010:3010 biorxiv-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/biorxiv-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
| Directory | Purpose |
|---|---|
src/index.ts |
createApp() entry point — registers tools and initializes services. |
src/config |
Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools |
Tool definitions (*.tool.ts). Six tools across bioRxiv and medRxiv. |
src/services/biorxiv |
BiorxivApiService — details, publications, and crosswalk endpoint wrappers with retry. |
src/services/biorxiv-fulltext |
BiorxivFullTextService — rendered HTML article page fetch and Markdown extraction. |
src/services/europe-pmc |
EuropePmcService — preprint keyword/author search endpoint wrapper. |
tests/ |
Unit and integration tests mirroring the src/ structure. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools via the barrel in
src/mcp-server/tools/definitions/index.ts - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
License
Apache-2.0 — see LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。