@cyanheads/biorxiv-mcp-server 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +12 -8
- package/CLAUDE.md +12 -8
- package/Dockerfile +3 -3
- package/README.md +31 -30
- package/changelog/0.4.x/0.4.1.md +27 -0
- package/changelog/0.4.x/0.4.2.md +34 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts +8 -6
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js +94 -28
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +24 -9
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js +137 -52
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts +22 -9
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js +78 -33
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts +25 -5
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js +130 -22
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts +5 -2
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js +51 -34
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts +24 -7
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js +78 -38
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +47 -19
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.d.ts +51 -31
- package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.js +132 -74
- package/dist/services/biorxiv/biorxiv-service.js.map +1 -1
- package/dist/services/biorxiv/types.d.ts +33 -6
- package/dist/services/biorxiv/types.d.ts.map +1 -1
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts +9 -6
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts.map +1 -1
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js +178 -23
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js.map +1 -1
- package/dist/services/europe-pmc/europe-pmc-service.d.ts +26 -6
- package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -1
- package/dist/services/europe-pmc/europe-pmc-service.js +124 -32
- package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -1
- package/dist/services/shared.d.ts +105 -5
- package/dist/services/shared.d.ts.map +1 -1
- package/dist/services/shared.js +191 -9
- package/dist/services/shared.js.map +1 -1
- package/dist/services/upstream-text-tables.d.ts +11 -1
- package/dist/services/upstream-text-tables.d.ts.map +1 -1
- package/dist/services/upstream-text-tables.js +42 -1
- package/dist/services/upstream-text-tables.js.map +1 -1
- package/package.json +6 -6
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** biorxiv-mcp-server
|
|
4
|
-
**Version:** 0.4.
|
|
4
|
+
**Version:** 0.4.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
|
8
|
-
**Zod:** ^4.6.
|
|
8
|
+
**Zod:** ^4.6.7
|
|
9
9
|
|
|
10
10
|
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
11
11
|
|
|
@@ -197,7 +197,9 @@ src/
|
|
|
197
197
|
services/
|
|
198
198
|
shared.ts # Shared utilities (detectHtmlError, normalizeDoi, normalizeRorId,
|
|
199
199
|
# normalizeUpstreamText, escapeMarkdown, isValidCalendarDate,
|
|
200
|
-
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
200
|
+
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
201
|
+
# startCallDeadline, remainingBudgetMs, ladderBudgetMs,
|
|
202
|
+
# retryWithinBudget, firstHit, CALL_BUDGET_MS, SERVER_VERSION)
|
|
201
203
|
upstream-text-tables.ts # Closed tables normalizeUpstreamText reads: Highwire placeholders, section headings
|
|
202
204
|
biorxiv/
|
|
203
205
|
biorxiv-service.ts # BiorxivApiService — details, publications, pubs endpoints
|
|
@@ -233,13 +235,14 @@ src/
|
|
|
233
235
|
|
|
234
236
|
## Domain Conventions
|
|
235
237
|
|
|
236
|
-
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898
|
|
238
|
+
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898/…` (`BIORXIV_DOI_PREFIXES` in `src/services/shared.ts`). Run every DOI input through `normalizeDoi()` (same file), which strips doi.org/article URLs, `doi:`, and `vN`/`.full` suffixes and returns `undefined` for anything still malformed — the bioRxiv API returns empty collections for malformed DOIs without an error code. Every DOI path key goes through `doiPathKey()` (`biorxiv-service.ts`), which sends each slash after the first as `%252F`: the API reads only the first two path segments, a raw second slash on `/details` draws an Apache 404 identical to a missing route's, and the double-encoded form reaches the API whole (HTTP 200, empty collection when absent) — so a `/details` 404 always means failure, never "not found". `/pubs` keyed by preprint DOI never parses a `10.64898/` DOI; see `getPublishedVersionByJournalDoi()`. `/pubs` is also keyed by journal DOI: `biorxiv_get_published_version` reads any DOI outside the two prefixes as a journal article's and resolves it there alone, never on `/details`. Cold Spring Harbor Laboratory Press journal DOIs (`10.1101/gr.…`, `gad.…`, `lm.…`) carry the preprint prefix, and neither endpoint recognizes them.
|
|
237
239
|
- **Category spelling:** the listing API filters only on lowercase with `/` and `_` read as a space (`hiv aids`), and answers anything else with its unfiltered listing, echoing `messages[0].category: "all"`. `BiorxivApiService` owns the spelling and flags `categoryIgnored`; never present a flagged page as filtered.
|
|
238
240
|
- **Funder data:** upstream funder `name`s and ROR `id`s on records are misattributed — expose only `awards` (verbatim, never split), never a funder name or ID. The listing's `funder` filter takes a bare ROR ID (`normalizeRorId()` strips the URL form and checks the checksum), is bioRxiv-only, and `"funder value not found"` (flagged `funderNotFound`) is an error, never an empty page.
|
|
239
|
-
-
|
|
240
|
-
- **
|
|
241
|
+
- **`/details` record fields:** title, authors, and date are per-revision, but `abstract` is the latest revision's, repeated on every revision — `getDetails()` returns revisions in ascending version order and keeps it on the last, so `revisions.at(-1)` is the latest wherever it is read, and a listing row's abstract is its preprint's latest. Record `server` is the queried server in lowercase (`normalizeRevision()`), never upstream's `"bioRxiv"`, so it round-trips into any `server` input.
|
|
242
|
+
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"`, including for DOI-resolution tools — both servers issue `10.1101/` DOIs, so the DOI never identifies the server and a single-server default silently misses records held by the other. Fan out via `Promise.allSettled` when `"both"` and name the answering server in the output — except a lookup for one DOI that one server's answer settles (each DOI in `biorxiv_get_preprint`, `biorxiv_get_fulltext` resolution, `biorxiv_get_published_version`'s crosswalk and `/details` steps, `biorxiv_search_preprints` enrichment of a DOI with neither preprint prefix): it runs through `firstHit()`, which ends the moment the server holding the DOI answers and aborts the other leg, so a stalled server that does not hold it never spends the call's budget.
|
|
243
|
+
- **Pagination:** integer `cursor` row offset. The API fixes its page (30 rows on `/details` listings, 100 on `/pubs`) and takes no size parameter, so no `limit` is ever sent upstream. `biorxiv_list_published_versions` slices its page locally with `limit` (default 25) and continues at `nextCursor`; `biorxiv_list_recent` takes none.
|
|
241
244
|
- **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous. A server whose cursor overshot is flagged `exhausted`: the posting-date listing reports `total: 0` there, and the publication-date listing reports no total at all, so its exhausted entry carries none.
|
|
242
|
-
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. `10.1101/`
|
|
245
|
+
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. The `10.1101/` and `10.64898/` prefixes are a hint only within `server="both"` to try bioRxiv first, then medRxiv when bioRxiv answers empty, never a reliable discriminator (both servers issue them). The ranked search stays `resulttype=lite`, which never carries an abstract; records that fall back to EuropePMC metadata get theirs from one DOI-keyed `resultType=core` query (`getAbstracts`), made only when abstracts are requested and something fell back. A failed lookup is a notice, never a failed search.
|
|
243
246
|
- **`format()` must be content-complete:** Claude Desktop reads `content[]` from `format()`, not `structuredContent`. Revision list, crosswalk data, pagination state, and every abstract a record carries must all appear in the rendered markdown, not just counts. `include_abstract` (default `false` on `biorxiv_list_recent` and `biorxiv_list_published_versions`, `true` on `biorxiv_search_preprints`) removes the abstract from both surfaces together and no other field.
|
|
244
247
|
- **Upstream text in `format()`:** run titles and abstracts through `normalizeUpstreamText()` in the service (never in `format()`), and pass every upstream free-text field through `escapeMarkdown()` where `format()` interpolates it. It escapes only characters that would change rendering (`A\*T`, `\<COMP id>`; `p<0.05` and `cc_by` stay raw), because agents copy spans out of `content[]` — keep it that narrow. Never escape DOIs, URLs, `structuredContent`, or `biorxiv_get_fulltext`'s extracted `content`.
|
|
245
248
|
- **Polite access:** include `BIORXIV_MAILTO` in the `User-Agent` header when set: `biorxiv-mcp-server/${SERVER_VERSION} (mailto:${config.mailto})`. The env var is optional — omit the mailto segment when not configured.
|
|
@@ -396,7 +399,8 @@ import { getEuropePmcService } from '@/services/europe-pmc/europe-pmc-service.js
|
|
|
396
399
|
- [ ] bioRxiv API wrapping: tests include at least one sparse payload case with omitted upstream fields
|
|
397
400
|
- [ ] `BIORXIV_MAILTO` included in outbound User-Agent header when set (optional env var)
|
|
398
401
|
- [ ] DOI input normalized and validated with `normalizeDoi()` before calling API
|
|
399
|
-
- [ ] Two-server fan-out uses `Promise.allSettled
|
|
402
|
+
- [ ] Two-server fan-out uses `Promise.allSettled`, or `firstHit()` for a single-DOI lookup one server's answer settles; partial failures reported per-DOI in `failed[]`. A caller cancellation is rethrown, never reported as a failed leg: `ctx.signal.throwIfAborted()` after every fan-out, and before a degraded or cached result is returned
|
|
403
|
+
- [ ] Every upstream ladder takes the call's remaining deadline: the handler calls `startCallDeadline()` once and passes it to every service call; the service runs each ladder through `retryWithinBudget(attempt, { deadline, operation, … })` — `withRetry` on what is left of the budget, keeping an origin's last 429 as the ladder's answer when the budget runs out — and passes the attempt `signal` to `fetchWithTimeout` and `Math.min(perAttemptMs, remainingMs)` as its timeout. A required step's expiry fails with the tool's declared retryable reason, never a bare `Timeout`
|
|
400
404
|
- [ ] `biorxiv_list_recent` and `biorxiv_list_published_versions` with `server="both"` surface per-server pagination state, not a merged cursor
|
|
401
405
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
402
406
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
package/CLAUDE.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** biorxiv-mcp-server
|
|
4
|
-
**Version:** 0.4.
|
|
4
|
+
**Version:** 0.4.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
|
8
|
-
**Zod:** ^4.6.
|
|
8
|
+
**Zod:** ^4.6.7
|
|
9
9
|
|
|
10
10
|
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
11
11
|
|
|
@@ -197,7 +197,9 @@ src/
|
|
|
197
197
|
services/
|
|
198
198
|
shared.ts # Shared utilities (detectHtmlError, normalizeDoi, normalizeRorId,
|
|
199
199
|
# normalizeUpstreamText, escapeMarkdown, isValidCalendarDate,
|
|
200
|
-
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
200
|
+
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
201
|
+
# startCallDeadline, remainingBudgetMs, ladderBudgetMs,
|
|
202
|
+
# retryWithinBudget, firstHit, CALL_BUDGET_MS, SERVER_VERSION)
|
|
201
203
|
upstream-text-tables.ts # Closed tables normalizeUpstreamText reads: Highwire placeholders, section headings
|
|
202
204
|
biorxiv/
|
|
203
205
|
biorxiv-service.ts # BiorxivApiService — details, publications, pubs endpoints
|
|
@@ -233,13 +235,14 @@ src/
|
|
|
233
235
|
|
|
234
236
|
## Domain Conventions
|
|
235
237
|
|
|
236
|
-
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898
|
|
238
|
+
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898/…` (`BIORXIV_DOI_PREFIXES` in `src/services/shared.ts`). Run every DOI input through `normalizeDoi()` (same file), which strips doi.org/article URLs, `doi:`, and `vN`/`.full` suffixes and returns `undefined` for anything still malformed — the bioRxiv API returns empty collections for malformed DOIs without an error code. Every DOI path key goes through `doiPathKey()` (`biorxiv-service.ts`), which sends each slash after the first as `%252F`: the API reads only the first two path segments, a raw second slash on `/details` draws an Apache 404 identical to a missing route's, and the double-encoded form reaches the API whole (HTTP 200, empty collection when absent) — so a `/details` 404 always means failure, never "not found". `/pubs` keyed by preprint DOI never parses a `10.64898/` DOI; see `getPublishedVersionByJournalDoi()`. `/pubs` is also keyed by journal DOI: `biorxiv_get_published_version` reads any DOI outside the two prefixes as a journal article's and resolves it there alone, never on `/details`. Cold Spring Harbor Laboratory Press journal DOIs (`10.1101/gr.…`, `gad.…`, `lm.…`) carry the preprint prefix, and neither endpoint recognizes them.
|
|
237
239
|
- **Category spelling:** the listing API filters only on lowercase with `/` and `_` read as a space (`hiv aids`), and answers anything else with its unfiltered listing, echoing `messages[0].category: "all"`. `BiorxivApiService` owns the spelling and flags `categoryIgnored`; never present a flagged page as filtered.
|
|
238
240
|
- **Funder data:** upstream funder `name`s and ROR `id`s on records are misattributed — expose only `awards` (verbatim, never split), never a funder name or ID. The listing's `funder` filter takes a bare ROR ID (`normalizeRorId()` strips the URL form and checks the checksum), is bioRxiv-only, and `"funder value not found"` (flagged `funderNotFound`) is an error, never an empty page.
|
|
239
|
-
-
|
|
240
|
-
- **
|
|
241
|
+
- **`/details` record fields:** title, authors, and date are per-revision, but `abstract` is the latest revision's, repeated on every revision — `getDetails()` returns revisions in ascending version order and keeps it on the last, so `revisions.at(-1)` is the latest wherever it is read, and a listing row's abstract is its preprint's latest. Record `server` is the queried server in lowercase (`normalizeRevision()`), never upstream's `"bioRxiv"`, so it round-trips into any `server` input.
|
|
242
|
+
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"`, including for DOI-resolution tools — both servers issue `10.1101/` DOIs, so the DOI never identifies the server and a single-server default silently misses records held by the other. Fan out via `Promise.allSettled` when `"both"` and name the answering server in the output — except a lookup for one DOI that one server's answer settles (each DOI in `biorxiv_get_preprint`, `biorxiv_get_fulltext` resolution, `biorxiv_get_published_version`'s crosswalk and `/details` steps, `biorxiv_search_preprints` enrichment of a DOI with neither preprint prefix): it runs through `firstHit()`, which ends the moment the server holding the DOI answers and aborts the other leg, so a stalled server that does not hold it never spends the call's budget.
|
|
243
|
+
- **Pagination:** integer `cursor` row offset. The API fixes its page (30 rows on `/details` listings, 100 on `/pubs`) and takes no size parameter, so no `limit` is ever sent upstream. `biorxiv_list_published_versions` slices its page locally with `limit` (default 25) and continues at `nextCursor`; `biorxiv_list_recent` takes none.
|
|
241
244
|
- **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous. A server whose cursor overshot is flagged `exhausted`: the posting-date listing reports `total: 0` there, and the publication-date listing reports no total at all, so its exhausted entry carries none.
|
|
242
|
-
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. `10.1101/`
|
|
245
|
+
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. The `10.1101/` and `10.64898/` prefixes are a hint only within `server="both"` to try bioRxiv first, then medRxiv when bioRxiv answers empty, never a reliable discriminator (both servers issue them). The ranked search stays `resulttype=lite`, which never carries an abstract; records that fall back to EuropePMC metadata get theirs from one DOI-keyed `resultType=core` query (`getAbstracts`), made only when abstracts are requested and something fell back. A failed lookup is a notice, never a failed search.
|
|
243
246
|
- **`format()` must be content-complete:** Claude Desktop reads `content[]` from `format()`, not `structuredContent`. Revision list, crosswalk data, pagination state, and every abstract a record carries must all appear in the rendered markdown, not just counts. `include_abstract` (default `false` on `biorxiv_list_recent` and `biorxiv_list_published_versions`, `true` on `biorxiv_search_preprints`) removes the abstract from both surfaces together and no other field.
|
|
244
247
|
- **Upstream text in `format()`:** run titles and abstracts through `normalizeUpstreamText()` in the service (never in `format()`), and pass every upstream free-text field through `escapeMarkdown()` where `format()` interpolates it. It escapes only characters that would change rendering (`A\*T`, `\<COMP id>`; `p<0.05` and `cc_by` stay raw), because agents copy spans out of `content[]` — keep it that narrow. Never escape DOIs, URLs, `structuredContent`, or `biorxiv_get_fulltext`'s extracted `content`.
|
|
245
248
|
- **Polite access:** include `BIORXIV_MAILTO` in the `User-Agent` header when set: `biorxiv-mcp-server/${SERVER_VERSION} (mailto:${config.mailto})`. The env var is optional — omit the mailto segment when not configured.
|
|
@@ -396,7 +399,8 @@ import { getEuropePmcService } from '@/services/europe-pmc/europe-pmc-service.js
|
|
|
396
399
|
- [ ] bioRxiv API wrapping: tests include at least one sparse payload case with omitted upstream fields
|
|
397
400
|
- [ ] `BIORXIV_MAILTO` included in outbound User-Agent header when set (optional env var)
|
|
398
401
|
- [ ] DOI input normalized and validated with `normalizeDoi()` before calling API
|
|
399
|
-
- [ ] Two-server fan-out uses `Promise.allSettled
|
|
402
|
+
- [ ] Two-server fan-out uses `Promise.allSettled`, or `firstHit()` for a single-DOI lookup one server's answer settles; partial failures reported per-DOI in `failed[]`. A caller cancellation is rethrown, never reported as a failed leg: `ctx.signal.throwIfAborted()` after every fan-out, and before a degraded or cached result is returned
|
|
403
|
+
- [ ] Every upstream ladder takes the call's remaining deadline: the handler calls `startCallDeadline()` once and passes it to every service call; the service runs each ladder through `retryWithinBudget(attempt, { deadline, operation, … })` — `withRetry` on what is left of the budget, keeping an origin's last 429 as the ladder's answer when the budget runs out — and passes the attempt `signal` to `fetchWithTimeout` and `Math.min(perAttemptMs, remainingMs)` as its timeout. A required step's expiry fails with the tool's declared retryable reason, never a bare `Timeout`
|
|
400
404
|
- [ ] `biorxiv_list_recent` and `biorxiv_list_published_versions` with `server="both"` surface per-server pagination state, not a merged cursor
|
|
401
405
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
402
406
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
package/Dockerfile
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# output. A stage that compiles a native addon needs the target-arch toolchain
|
|
15
15
|
# and cannot cross-compile this way — drop the flag there.
|
|
16
16
|
# ==============================================================================
|
|
17
|
-
FROM --platform=$BUILDPLATFORM oven/bun:1.4.
|
|
17
|
+
FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS build
|
|
18
18
|
|
|
19
19
|
WORKDIR /usr/src/app
|
|
20
20
|
|
|
@@ -46,7 +46,7 @@ RUN bun run build
|
|
|
46
46
|
# A clean image rather than `FROM build`: the build stage's node_modules holds
|
|
47
47
|
# devDependencies.
|
|
48
48
|
# ==============================================================================
|
|
49
|
-
FROM --platform=$BUILDPLATFORM oven/bun:1.4.
|
|
49
|
+
FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS deps
|
|
50
50
|
|
|
51
51
|
WORKDIR /usr/src/app
|
|
52
52
|
|
|
@@ -113,7 +113,7 @@ RUN rm -rf node_modules/@socketsecurity/bun-security-scanner
|
|
|
113
113
|
# dependencies and build artifacts. Its only Bun invocations are HEALTHCHECK
|
|
114
114
|
# and CMD, which run on the real target at container start.
|
|
115
115
|
# ==============================================================================
|
|
116
|
-
FROM oven/bun:1.4.
|
|
116
|
+
FROM oven/bun:1.4.4-slim AS production
|
|
117
117
|
|
|
118
118
|
WORKDIR /usr/src/app
|
|
119
119
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/biorxiv-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/biorxiv-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
## Overview
|
|
31
31
|
|
|
32
|
-
bioRxiv and medRxiv
|
|
32
|
+
bioRxiv and medRxiv preprints, metadata and full text. Search by keyword and author, browse a date interval (optionally by subject), fetch any preprint by DOI, and see which preprints went on to journal publication.
|
|
33
33
|
|
|
34
34
|
### Tools
|
|
35
35
|
|
|
@@ -38,8 +38,8 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
|
|
|
38
38
|
| `biorxiv_get_preprint` | Fetch full metadata, abstract, revision history, and journal crosswalk for one or more preprints by DOI |
|
|
39
39
|
| `biorxiv_list_recent` | List preprints posted or updated within a date interval, with optional server, category, and funder filters |
|
|
40
40
|
| `biorxiv_search_preprints` | Search preprints by keyword and/or author via EuropePMC for relevance ranking, enriched with bioRxiv/medRxiv metadata |
|
|
41
|
-
| `biorxiv_get_published_version` | Resolve a preprint DOI to its journal publication record (journal DOI, name, published date) |
|
|
42
|
-
| `biorxiv_list_published_versions` | List preprints that appeared as journal articles within a journal publication-date interval, whenever they were posted |
|
|
41
|
+
| `biorxiv_get_published_version` | Resolve a preprint DOI to its journal publication record (journal DOI, name, published date), or a journal article's DOI to the preprint it was posted as |
|
|
42
|
+
| `biorxiv_list_published_versions` | List preprints that appeared as journal articles within a journal publication-date interval, whenever they were posted, optionally from one publisher |
|
|
43
43
|
| `biorxiv_get_fulltext` | Retrieve a preprint's full text as best-effort Markdown extracted from its rendered HTML article page |
|
|
44
44
|
| `biorxiv_list_categories` | List valid subject category strings for bioRxiv and medRxiv |
|
|
45
45
|
|
|
@@ -47,23 +47,25 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
|
|
|
47
47
|
|
|
48
48
|
### `biorxiv_get_preprint` <sub>tool</sub>
|
|
49
49
|
|
|
50
|
-
- Takes
|
|
51
|
-
-
|
|
50
|
+
- Takes DOIs bare or pasted (`https://doi.org/…`, `doi:…`, a `biorxiv.org`/`medrxiv.org` article URL, a `vN` or `.full` suffix), scoped to `biorxiv`, `medrxiv`, or `both` (default `both`)
|
|
51
|
+
- Accepts up to 200 entries and looks up the first 10 distinct DOIs; the rest come back in `unprocessed[]` to pass in another call. A repeated DOI is looked up once, and every list keeps input order
|
|
52
|
+
- Each preprint returns its full revision history in `revisions[]` — title, authors, category, license, `awards`, `jatsxmlUrl`, `publishedJournalDoi` once accepted, and the `server` it was found on (`biorxiv` or `medrxiv`, ready to pass back as `server`). Funder names are omitted because the upstream API misattributes them
|
|
53
|
+
- The abstract sits on the latest revision only: the upstream API keeps one abstract per preprint. An earlier revision's own abstract is on its article page, through `biorxiv_get_fulltext` with `version`
|
|
52
54
|
- A DOI that fails lands in `failed[]` with a `reason` (`not_found`, `invalid_doi_format`, `upstream_unavailable`, `rate_limited`) and a `retryable` flag; `not_found` only when every attempted server answered
|
|
53
55
|
|
|
54
56
|
---
|
|
55
57
|
|
|
56
58
|
### `biorxiv_list_recent` <sub>tool</sub>
|
|
57
59
|
|
|
58
|
-
- Takes a `start_date`/`end_date` interval, `server` (default `both`), and optional `category` (a value from `biorxiv_list_categories`) and bioRxiv-only `funder` (a ROR ID) filters; a filter
|
|
59
|
-
- Pages of 30 advance with an integer `cursor
|
|
60
|
-
- Abstracts are omitted by default
|
|
60
|
+
- Takes a `start_date`/`end_date` interval, `server` (default `both`), and optional `category` (a value from `biorxiv_list_categories`) and bioRxiv-only `funder` (a ROR ID) filters; a filter that cannot be applied raises `invalid_category` or `invalid_funder`
|
|
61
|
+
- Pages of 30 advance with an integer `cursor`, tracked per server (`{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`); a cursor past the last page is marked `exhausted: true`, and a server that did not answer is named in `failed[]`
|
|
62
|
+
- Abstracts are omitted by default; `include_abstract: true` adds them. Each is the preprint's latest-revision abstract, even on a row for an earlier revision
|
|
61
63
|
|
|
62
64
|
---
|
|
63
65
|
|
|
64
66
|
### `biorxiv_search_preprints` <sub>tool</sub>
|
|
65
67
|
|
|
66
|
-
- Takes `query` and/or `author`, optional `date_from`/`date_to` and `server` (default `both`); up to 100 results per page (default 25), paged with `cursor_mark`
|
|
68
|
+
- Takes `query` and/or `author`, optional `date_from`/`date_to` and `server` (default `both`); up to 100 results per page (default 25; a larger `limit` returns 100 with a notice), paged with `cursor_mark`
|
|
67
69
|
- EuropePMC ranks the matches (it indexes new preprints within 1–2 days of posting) and the bioRxiv/medRxiv API enriches them with the same fields as `biorxiv_get_preprint`; a record left with EuropePMC metadata only carries `enriched: false` and an `enrichment_error` (`service_error`, `rate_limited`, `not_found`), with `partial_results` set
|
|
68
70
|
- Abstracts are included by default; `include_abstract: false` drops them for a response about a third the size
|
|
69
71
|
|
|
@@ -71,26 +73,26 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
|
|
|
71
73
|
|
|
72
74
|
### `biorxiv_get_published_version` <sub>tool</sub>
|
|
73
75
|
|
|
74
|
-
- Takes one
|
|
75
|
-
- Returns journal DOI, journal name, published date, corresponding-author institution, and the `server` that answered; no server
|
|
76
|
+
- Takes one DOI and `server` (default `both`): a preprint DOI (`10.1101/`, `10.64898/`), or a journal article's DOI, which resolves to the preprint it was posted as (`10.1016/j.cell.2020.01.001` → `10.1101/614172`); `10.64898/` DOIs resolve through the preprint's own journal DOI
|
|
77
|
+
- Returns the preprint DOI, journal DOI, journal name, published date, corresponding-author institution, and the `server` that answered; if no server answers it raises a retryable `upstream_unavailable` or `rate_limited`, never `doi_not_found`
|
|
78
|
+
- Cold Spring Harbor Laboratory Press journal DOIs (`10.1101/gr.…`, `gad.…`, `lm.…`) share the preprint prefix and cannot be resolved by DOI
|
|
76
79
|
|
|
77
80
|
---
|
|
78
81
|
|
|
79
82
|
### `biorxiv_list_published_versions` <sub>tool</sub>
|
|
80
83
|
|
|
81
|
-
- Takes a `start_date`/`end_date` interval of journal publication dates and `server` (default `both`); each row
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
+
- Takes a `start_date`/`end_date` interval of journal publication dates and `server` (default `both`); each row matches the record `biorxiv_get_published_version` returns, and may be a preprint posted years earlier
|
|
85
|
+
- Returns `limit` rows per server (default 25, up to the API's 100-row page) from an integer `cursor`, continued at each server's `nextCursor`; a cursor past the last row is marked `exhausted: true`, and a server that did not answer is named in `failed[]`
|
|
86
|
+
- Optional `publisher`, a journal DOI prefix (`10.7554` for eLife), lists only the bioRxiv preprints published under it; `server: "both"` queries bioRxiv alone, and `server: "medrxiv"` or a prefix the API does not recognize raises `invalid_publisher`. These rows carry no journal name, authors, or abstract
|
|
87
|
+
- Abstracts are omitted by default; `include_abstract: true` adds them
|
|
84
88
|
|
|
85
89
|
---
|
|
86
90
|
|
|
87
91
|
### `biorxiv_get_fulltext` <sub>tool</sub>
|
|
88
92
|
|
|
89
|
-
- Takes a DOI, `server` (default `both`), and an optional `version` (or a `vN` suffix
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
- Pages via `offset`/`limit` characters (default 20,000; a `limit` past the remaining text returns the rest), reporting `totalChars`, `remainingChars`, `hasMore`, and `wordCount`; the extracted article is cached per version, so paging costs one origin fetch
|
|
93
|
-
- PDF-only preprints and blocked pages raise `fulltext_unavailable`, routing to `biorxiv_get_preprint`
|
|
93
|
+
- Takes a DOI, `server` (default `both`), and an optional `version` (or a `vN` suffix; the two must agree, and a version the preprint lacks raises `version_not_found`); returns Markdown extracted from the rendered HTML article page, naming the answering `server`
|
|
94
|
+
- Table cells are not on the page: each table keeps its caption, and `omittedTables` names it with the URL that serves its cells
|
|
95
|
+
- Pages via `offset`/`limit` characters (default 20,000), reporting `totalChars`, `remainingChars`, `hasMore`, and `wordCount`; PDF-only preprints and blocked pages raise `fulltext_unavailable`, routing to `biorxiv_get_preprint`
|
|
94
96
|
|
|
95
97
|
---
|
|
96
98
|
|
|
@@ -105,20 +107,19 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
|
|
|
105
107
|
|
|
106
108
|
bioRxiv-specific:
|
|
107
109
|
|
|
108
|
-
- `BiorxivApiService` wraps `api.biorxiv.org`
|
|
109
|
-
- `
|
|
110
|
-
-
|
|
111
|
-
-
|
|
110
|
+
- `BiorxivApiService` wraps `api.biorxiv.org` (details, publications, and crosswalk endpoints) and `EuropePmcService` wraps EuropePMC search, both with retry and exponential backoff
|
|
111
|
+
- `BiorxivFullTextService` extracts Markdown from the article pages on `www.biorxiv.org` / `www.medrxiv.org`
|
|
112
|
+
- Every upstream retry ladder runs on what is left of the tool call's one 50 s budget, so a hung origin ends before a client's 60 s request timeout — in a classified, retryable error, or, when the step that hung is optional, in a result that says what is missing
|
|
113
|
+
- Queries `biorxiv` and `medrxiv` in parallel when `server="both"`, each result naming the server that answered; a lookup by DOI stops waiting once the server holding that DOI answers
|
|
112
114
|
- Polite `User-Agent` header including a mailto address (`BIORXIV_MAILTO` env var) per Cold Spring Harbor Lab API guidelines
|
|
113
115
|
- Pairs with **pubmed-mcp-server** (post-publication), **openalex-mcp-server** (citation analytics), and **crossref-mcp-server** (DOI metadata)
|
|
114
116
|
|
|
115
117
|
Agent-friendly output:
|
|
116
118
|
|
|
117
|
-
- Graceful partial failure — per-DOI and per-server failures land in `failed[]` with a typed `reason` and `retryable` flag instead of aborting the
|
|
118
|
-
- Rate-limit transparency — a 429
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
- Clean titles and abstracts — Highwire export markup is resolved to plain text on both surfaces: symbol placeholders (`{beta}`, `{+/-}`, `[≥]`) become their characters, structured-abstract headings read `Results: …`, list items read `• …`, and figure and table blocks are dropped. The Markdown in `content[]` escapes upstream text so it renders as written
|
|
119
|
+
- Graceful partial failure — per-DOI and per-server failures land in `failed[]` with a typed `reason` and `retryable` flag instead of aborting the call
|
|
120
|
+
- Rate-limit transparency — a 429 surfaces as `reason: "rate_limited"` with the parsed `retryAfter` wait, distinct from `upstream_unavailable`
|
|
121
|
+
- Typed enrichment status — `biorxiv_search_preprints` results carry `enriched` plus a typed `enrichment_error` (`service_error` / `rate_limited` / `not_found`)
|
|
122
|
+
- Clean titles and abstracts — export markup and symbol placeholders (`{beta}`, `[≥]`) are resolved to plain text
|
|
122
123
|
|
|
123
124
|
## Getting started
|
|
124
125
|
|
|
@@ -235,7 +236,7 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
|
|
|
235
236
|
|
|
236
237
|
| Variable | Description | Default |
|
|
237
238
|
|:---|:---|:---|
|
|
238
|
-
| `BIORXIV_MAILTO` | Email address
|
|
239
|
+
| `BIORXIV_MAILTO` | Email address for the `User-Agent` header; optional but recommended. | — |
|
|
239
240
|
| `BIORXIV_API_BASE_URL` | Override the bioRxiv API base URL. | `https://api.biorxiv.org` |
|
|
240
241
|
| `EUROPEPMC_API_BASE_URL` | Override the EuropePMC base URL. | `https://www.ebi.ac.uk/europepmc/webservices/rest` |
|
|
241
242
|
| `BIORXIV_WEB_BASE_URL` | Override the bioRxiv website base URL (full-text HTML source for `biorxiv_get_fulltext`). | `https://www.biorxiv.org` |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Every tool call runs its upstream requests on one 50 s budget, so a hung origin ends in a classified error before a client's 60 s timeout. biorxiv_get_preprint and biorxiv_search_preprints serve their per-call cap instead of rejecting an oversized request, and biorxiv_list_published_versions takes a limit (default 25)."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.4.1 — 2026-10-17
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **Call budget** — every upstream retry ladder in `biorxiv_get_preprint`, `biorxiv_get_published_version`, `biorxiv_get_fulltext`, `biorxiv_search_preprints`, `biorxiv_list_recent`, and `biorxiv_list_published_versions` draws on one 50 s budget per tool call, chained requests included. A step that runs out of it fails with the tool's retryable upstream reason, or degrades where the tool already degrades; the budget never aborts the caller's signal (#64).
|
|
12
|
+
- **`biorxiv_get_fulltext` article page** — a page that times out, keeps failing with a 5xx or network error, or runs out the budget raises `upstream_unavailable` instead of a bare timeout (-32004) or an undeclared 5xx; when the version lookup used most of the budget, the error says so (#64).
|
|
13
|
+
- **`biorxiv_list_recent` with one server queried** — a failed listing raises the declared `upstream_unavailable` or `rate_limited`, as a two-server call does, instead of the service's own error, which left a timeout or 5xx with no declared reason (#64).
|
|
14
|
+
- **DOI lookups** — with `server: "both"`, a lookup for one DOI ends when the server holding it answers and cuts the other lookup short, so a stalled server that lacks the DOI no longer spends the call's budget (#64).
|
|
15
|
+
- **`biorxiv_get_preprint` `dois`** — accepts up to 200 entries. The first 10 distinct DOIs are looked up and the rest return in the new `unprocessed` array, with a notice and the truncation fields. An unparseable entry goes to `failed[]` wherever it sits, a repeated DOI is looked up once, and all lists keep input order; batch-level errors raise only when nothing resolved and `unprocessed` is empty (#63).
|
|
16
|
+
- **`biorxiv_search_preprints` `limit`** — a value above 100 returns the first 100 results with a notice, and the truncation fields when the page holds all 100; `nextCursorMark` continues the list. The schema ceiling is 1000 (#69).
|
|
17
|
+
- **`biorxiv_list_published_versions` `limit`** — new input (default 25, up to 1000) sets the rows returned per server, sliced from the start of the upstream page. `nextCursor` advances by the rows served, and the truncation fields are set while a server has rows left; `limit: 100` returns the previous full page, and a larger value returns 100 with a notice. The default page is now 25 rows per server (#68).
|
|
18
|
+
- **Minor:** the `preprintDate` descriptions on `biorxiv_get_published_version` and on `biorxiv_list_published_versions` rows note that medRxiv lists some `10.64898/` preprints twice with different posting dates.
|
|
19
|
+
|
|
20
|
+
## Fixed
|
|
21
|
+
|
|
22
|
+
- **Cancellation** — `biorxiv_get_preprint`, `biorxiv_list_recent`, `biorxiv_get_published_version`, `biorxiv_search_preprints`, and `biorxiv_get_fulltext` rethrow a caller cancellation (-32011) instead of recording the aborted leg as a failed lookup or returning a partial result (#65).
|
|
23
|
+
- **Service test assertions** — the three HTML-error tests in `BiorxivApiService` and the full-text 5xx test assert the classified error, so removing their guards fails them (#66).
|
|
24
|
+
|
|
25
|
+
## Dependencies
|
|
26
|
+
|
|
27
|
+
- `zod` ^4.6.6 → ^4.6.7
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "biorxiv_get_published_version resolves a journal article's DOI to its preprint, biorxiv_list_published_versions filters by publisher DOI prefix, and biorxiv_get_fulltext renders figures, references, and formulas once. Only the latest revision carries an abstract, and record server is lowercase."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.4.2 — 2026-10-23
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`biorxiv_get_published_version` journal-DOI input** — any DOI outside `10.1101/` and `10.64898/` resolves through `/pubs` to the preprint it was posted as, returned in the same record (`preprintDoi` is the linked preprint); no recorded preprint raises `doi_not_found`. A journal DOI keeps its own components (`10.7554/eLife.55185.sa1`, `….g001`, Wiley's `.x`); only page-format tabs (`.pdf`, `.full`, …) and a `vN` revision are stripped (#74).
|
|
12
|
+
- **`biorxiv_list_published_versions` `publisher`** — a journal DOI prefix (`10.7554` for eLife) lists only the bioRxiv preprints published under it, from `/publisher`. `server: "both"` queries bioRxiv alone with a notice, `server: "medrxiv"` and an unrecognized prefix raise `invalid_publisher`, and rows carry no journal name, authors, or abstract (#77).
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **`abstract`** — `biorxiv_get_preprint` returns it on the latest revision only, with revisions in ascending version order; the API repeats one abstract on every revision. Listing rows keep their preprint's latest abstract (#71).
|
|
17
|
+
- **Record `server`** — `revisions[].server` on `biorxiv_get_preprint` and `preprints[].server` on `biorxiv_list_recent` and `biorxiv_search_preprints` is the `biorxiv` / `medrxiv` enum, valid as any tool's `server` input, not the API's `bioRxiv` / `medRxiv` (#76).
|
|
18
|
+
- **Date inputs** — `biorxiv_list_recent` `start_date` / `end_date` declare the `YYYY-MM-DD` pattern in the schema (#76); a date failing it, there or on `biorxiv_search_preprints` and `biorxiv_list_published_versions`, gets an error naming the format.
|
|
19
|
+
- **Not-found hints** — suggest `server="both"` only when the call checked one server.
|
|
20
|
+
|
|
21
|
+
## Fixed
|
|
22
|
+
|
|
23
|
+
- **Second-slash DOIs** — a DOI such as `10.1101/abc/def` returns not found instead of a retryable outage (#73).
|
|
24
|
+
- **`biorxiv_search_preprints` `cursor_mark`** — a malformed token raises `invalid_cursor_mark` instead of `search_unavailable`: after every cursor attempt fails with HTTP 503 or an empty body, one first-page request for the same query settles it (#72).
|
|
25
|
+
- **Abstracts** — the literal `\n` and `\"` older bioRxiv abstracts carry read as line breaks and quotes, so section headings no longer run into the next word (#78).
|
|
26
|
+
- **`biorxiv_get_fulltext` figures and references** — each figure renders once as an image and its caption, the Download and Open-in-new-tab links are gone, and each reference carries one number (#75).
|
|
27
|
+
- **`biorxiv_get_fulltext` formulas** — display and inline formulas render as images in place, with no "Embedded Image" paragraph and no text spliced onto the preceding paragraph (#79).
|
|
28
|
+
|
|
29
|
+
## Dependencies
|
|
30
|
+
|
|
31
|
+
- `ignore` ^7.0.12 → ^7.0.13
|
|
32
|
+
- `vitest` ^5.0.4 → ^5.0.5
|
|
33
|
+
- `tsc-alias` ^1.9.7 → ^1.9.8
|
|
34
|
+
- `packageManager` bun 1.4.3 → 1.4.4 (Docker base images follow)
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ await createApp({
|
|
|
16
16
|
tools: [...allToolDefinitions],
|
|
17
17
|
resources: [],
|
|
18
18
|
prompts: [],
|
|
19
|
-
instructions: 'bioRxiv/medRxiv preprints, addressed by 10.1101/ or 10.64898/ DOI and searched across both servers by default. Find preprints with biorxiv_search_preprints (keyword or author, ranked by EuropePMC) or biorxiv_list_recent (a date interval, filtered by a category string from biorxiv_list_categories and, on bioRxiv, by a funder ROR ID). Resolve a DOI with biorxiv_get_preprint for metadata and revisions, biorxiv_get_fulltext for the article body as Markdown, and biorxiv_get_published_version for the journal crosswalk once a preprint has been published. biorxiv_list_published_versions lists those crosswalk records by journal publication date — the preprints that became journal articles in an interval, whenever they were posted.',
|
|
19
|
+
instructions: 'bioRxiv/medRxiv preprints, addressed by 10.1101/ or 10.64898/ DOI and searched across both servers by default. Find preprints with biorxiv_search_preprints (keyword or author, ranked by EuropePMC) or biorxiv_list_recent (a date interval, filtered by a category string from biorxiv_list_categories and, on bioRxiv, by a funder ROR ID). Resolve a DOI with biorxiv_get_preprint for metadata and revisions, biorxiv_get_fulltext for the article body as Markdown, and biorxiv_get_published_version for the journal crosswalk once a preprint has been published — it also takes the DOI of a journal article and returns the preprint it was posted as. biorxiv_list_published_versions lists those crosswalk records by journal publication date — the preprints that became journal articles in an interval, whenever they were posted, filtered on bioRxiv by the DOI prefix of a journal publisher.',
|
|
20
20
|
// Stateless HTTP: no tool gates on ctx.requestInput, so no session store is needed.
|
|
21
21
|
sessionMode: 'stateless',
|
|
22
22
|
// Public hosted catalog — serve full landing inventory even when MCP_AUTH_MODE=jwt/oauth.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,oBAAoB;IAC3B,KAAK,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC9B,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,oBAAoB;IAC3B,KAAK,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC9B,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,YAAY,EACV,k3BAAk3B;IACp3B,oFAAoF;IACpF,WAAW,EAAE,WAAW;IACxB,0FAA0F;IAC1F,OAAO,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;IAC/B,KAAK,CAAC,IAAI;QACR,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,0BAA0B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* and run through the framework extractor. bioRxiv and medRxiv share the
|
|
9
9
|
* 10.1101/ DOI prefix, so the default server="both" resolves the DOI against both
|
|
10
10
|
* in parallel; the fan-out is narrower than biorxiv_get_published_version's — only
|
|
11
|
-
* the resolution step fans out,
|
|
12
|
-
*
|
|
11
|
+
* the resolution step fans out, it ends the moment the server holding the DOI
|
|
12
|
+
* answers (the other lookup is cut short, so a stalled server never spends the
|
|
13
|
+
* article page's budget), and the full-text fetch targets that one server. Long
|
|
14
|
+
* articles are paged with offset/limit character chunking;
|
|
13
15
|
* the tables the page carries no cells for (`omittedTables`) ride on every chunk.
|
|
14
16
|
* Full text is best-effort HTML→Markdown, not structured JATS; preprints that are
|
|
15
17
|
* PDF-only or whose page is blocked return a typed `fulltext_unavailable` error
|
|
@@ -80,13 +82,13 @@ export declare const biorxivGetFulltextTool: import("@cyanheads/mcp-ts-core").To
|
|
|
80
82
|
readonly reason: "doi_not_found";
|
|
81
83
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
82
84
|
readonly when: "The DOI resolves to an empty collection on every attempted server.";
|
|
83
|
-
readonly recovery: "
|
|
85
|
+
readonly recovery: "Check the DOI, or find the correct one with biorxiv_search_preprints.";
|
|
84
86
|
}, {
|
|
85
87
|
readonly reason: "upstream_unavailable";
|
|
86
88
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
87
89
|
readonly retryable: true;
|
|
88
|
-
readonly when: "No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org.";
|
|
89
|
-
readonly recovery: "Retry the request after a short delay — the preprint may well exist; api.biorxiv.org did not answer.";
|
|
90
|
+
readonly when: "No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org; the version lookup used most of the call's time budget, so the article page was never requested or had not answered when the budget ran out; or the article page (www.biorxiv.org / www.medrxiv.org) did not answer within the call.";
|
|
91
|
+
readonly recovery: "Retry the request after a short delay — the preprint may well exist; api.biorxiv.org did not answer the version lookup.";
|
|
90
92
|
}, {
|
|
91
93
|
readonly reason: "rate_limited";
|
|
92
94
|
readonly code: JsonRpcErrorCode.RateLimited;
|
|
@@ -97,7 +99,7 @@ export declare const biorxivGetFulltextTool: import("@cyanheads/mcp-ts-core").To
|
|
|
97
99
|
readonly reason: "fulltext_unavailable";
|
|
98
100
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
99
101
|
readonly when: "The preprint exists but its full-text HTML page is blocked, missing, or yields no extractable text (PDF-only).";
|
|
100
|
-
readonly recovery: "Use biorxiv_get_preprint for the title,
|
|
102
|
+
readonly recovery: "Use biorxiv_get_preprint for the title, metadata, and current abstract (the latest revision’s; it holds no earlier revision’s own abstract) — a readable full-text page is not available for this preprint.";
|
|
101
103
|
}, {
|
|
102
104
|
readonly reason: "offset_out_of_range";
|
|
103
105
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biorxiv-get-fulltext.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"biorxiv-get-fulltext.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AA0C3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsejC,CAAC"}
|