@cyanheads/biorxiv-mcp-server
Tools
Six tools for working with bioRxiv and medRxiv preprint data:
Tool | Description |
| Fetch full metadata, abstract, revision history, and journal crosswalk for one or more preprints by DOI |
| List preprints posted or updated within a date interval, with optional server and category filters |
| Search preprints by keyword and/or author via EuropePMC for relevance ranking, enriched with bioRxiv/medRxiv metadata |
| Resolve a preprint DOI to its journal publication record (journal DOI, name, published date) |
| Retrieve a preprint's full text as best-effort Markdown extracted from its rendered HTML article page |
| 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 loopIncludes title, authors, abstract, category, license, JATS XML full-text link (
jatsxml), and published journal DOI when the preprint has been acceptedScope to
biorxiv,medrxiv, orboth; whenboth, each DOI fans out in parallel and partial failures report per-DOI infailed[]Each
failed[]entry carries areason(not_found,invalid_doi_format,upstream_unavailable,rate_limited) and aretryableflag — a DOI is only reported as not found when every attempted server answeredA lookup the origin rate-limited (HTTP 429) reports as
rate_limitedrather than folding intoupstream_unavailable, and carriesretryAfter— the wait in secondsapi.biorxiv.orgasked for
biorxiv_list_recent
Page through preprints in a date interval.
Server-side category filtering via
?category=…— pass a value frombiorxiv_list_categoriesFixed page size of 30 (API constraint); advance with integer
cursor(0, 30, 60, …)Response includes
totalcount per server for calculating remaining pagesWhen
server="both", each server paginates independently; response surfaces per-server pagination state ({ biorxiv: { cursor, total }, medrxiv: { cursor, total } })A server whose cursor is past its last page is marked
exhausted: true— the API reportstotal: 0for an out-of-range cursor, so that count is an artifact rather than the interval totalOne server not answering under
server="both"is named infailed[]rather than dropped; the other server's page is still returned, and a non-emptyfailed[]marks the result set as partialEvery attempted server failing raises a retryable
upstream_unavailable(orrate_limited) error instead of returning an empty page — nothing answered, so an empty interval was never established
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 bothCovers both servers by default; scope down with
serverOptional date range filters (
date_from,date_to)Enriched results carry the same latest-revision fields
biorxiv_get_preprintreturns — includingtype,license,funder, andauthorCorrespondingInstitutionEnrichment failures degrade gracefully to EuropePMC-only metadata, surfaced via
partial_resultsand a per-recordenrichment_error(service_error,rate_limited, ornot_found)A EuropePMC rate limit (HTTP 429) raises a retryable
rate_limitederror carrying the origin'sRetry-Afterwait — the search is the primary call and has no metadata to fall back on, unlike the enrichment step
biorxiv_get_published_version
Resolve a preprint DOI to its journal publication crosswalk.
Uses the
/pubs/{server}/{doi}endpoint for richer metadata than thepublishedJournalDoifield inbiorxiv_get_preprintReturns journal DOI, journal name, published date, and corresponding author institution
Use when the preprint's
publishedJournalDoifield is present and you need the full crosswalk recordScope to
biorxiv,medrxiv, orboth;bothis the default because the two servers share the10.1101/DOI prefix, and the outputserverfield names the one that answeredNo server answering raises a retryable
upstream_unavailable, orrate_limitedwith the origin's wait when the failure was an HTTP 429 — neverdoi_not_found, which would assert an absence nothing established
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 sourceResolves the latest version via the details API first, for the URL version and clean not-found handling
Scope to
biorxiv,medrxiv, orboth;bothis the default because the two servers share the10.1101/DOI prefix. Only the DOI resolution fans out — the full-text fetch targets the single server that answered, named in the outputserverfieldLong articles page via
offset/limitcharacter chunking (totalChars,remainingChars,hasMore); the extracted article is cached per version, so paging costs one origin fetch rather than one per chunkPDF-only preprints and blocked/challenge pages return a typed
fulltext_unavailableerror routing tobiorxiv_get_preprintAn origin rate limit (HTTP 429) returns a retryable
rate_limitederror carrying the origin'sRetry-Afterwait, rather than a bare fetch failure. Both origins this tool touches can hit it — the article page during the full-text fetch,api.biorxiv.orgduring version resolution — and the recovery hint names which of them are limiting, sincebiorxiv_get_preprintis only a useful fallback while the metadata origin is answering
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/D1Structured logging with optional OpenTelemetry tracing
STDIO and Streamable HTTP transports
bioRxiv-specific:
BiorxivApiServicewrapsapi.biorxiv.org— details, publications, and crosswalk endpoints with retry and exponential backoff. An origin rate limit (HTTP 429) is classified as a retryablerate_limitederror carrying the parsedRetry-Afterwait; the upstream response body never reaches the error payloadEuropePmcServicewraps the EuropePMC search endpoint for relevance-ranked keyword and/or author results. An origin rate limit (HTTP 429) is classified the same way as the JSON API's — a retryablerate_limitederror carrying the parsedRetry-Afterwait, with the upstream response body kept out of the error payloadBiorxivFullTextServicefetches and extracts Markdown from the rendered HTML article pages onwww.biorxiv.org/www.medrxiv.org— a distinct origin from the JSON APITwo-server fan-out via
Promise.allSettled— bothbiorxivandmedrxivqueried in parallel whenserver="both", results merged and deduplicated by DOIPolite
User-Agentheader including a mailto address (BIORXIV_MAILTOenv var) per Cold Spring Harbor Lab API guidelinesPairs 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/mcpPrerequisites
Bun v1.3.0 or higher (or Node.js v24+).
Installation
Clone the repository:
git clone https://github.com/cyanheads/biorxiv-mcp-server.gitNavigate into the directory:
cd biorxiv-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# optionally set BIORXIV_MAILTO for polite API accessConfiguration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
Variable | Description | Default |
| Email address included in the | — |
| Override the bioRxiv API base URL. |
|
| Override the EuropePMC base URL. |
|
| Override the bioRxiv website base URL (full-text HTML source for |
|
| Override the medRxiv website base URL (full-text HTML source for |
|
| Transport: |
|
| HTTP server port. |
|
| HTTP endpoint path. |
|
| Auth mode: |
|
| Log level ( |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry instrumentation. |
|
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:httpRun 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-serverThe 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 |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
|
|
|
|
|
|
| Unit and integration tests mirroring the |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools via the barrel in
src/mcp-server/tools/definitions/index.tsWrap 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 testLicense
Apache-2.0 — see LICENSE for details.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/biorxiv-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server