@cyanheads/biorxiv-mcp-server 0.3.1 → 0.4.1

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.
Files changed (56) hide show
  1. package/AGENTS.md +17 -13
  2. package/CLAUDE.md +17 -13
  3. package/Dockerfile +3 -3
  4. package/README.md +34 -25
  5. package/changelog/0.4.x/0.4.0.md +33 -0
  6. package/changelog/0.4.x/0.4.1.md +27 -0
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts +12 -5
  10. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js +113 -29
  12. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +21 -9
  14. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js +130 -49
  16. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts +4 -2
  18. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js +33 -20
  20. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts +102 -0
  22. package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts.map +1 -0
  23. package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js +372 -0
  24. package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js.map +1 -0
  25. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts +1 -1
  26. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js +35 -21
  28. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts +18 -6
  30. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js +78 -48
  32. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -1
  33. package/dist/mcp-server/tools/definitions/index.d.ts +101 -15
  34. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  35. package/dist/mcp-server/tools/definitions/index.js +3 -0
  36. package/dist/mcp-server/tools/definitions/index.js.map +1 -1
  37. package/dist/services/biorxiv/biorxiv-service.d.ts +33 -8
  38. package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -1
  39. package/dist/services/biorxiv/biorxiv-service.js +91 -24
  40. package/dist/services/biorxiv/biorxiv-service.js.map +1 -1
  41. package/dist/services/biorxiv/types.d.ts +25 -3
  42. package/dist/services/biorxiv/types.d.ts.map +1 -1
  43. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts +22 -5
  44. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts.map +1 -1
  45. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js +99 -17
  46. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js.map +1 -1
  47. package/dist/services/europe-pmc/europe-pmc-service.d.ts +7 -3
  48. package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -1
  49. package/dist/services/europe-pmc/europe-pmc-service.js +20 -13
  50. package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -1
  51. package/dist/services/shared.d.ts +81 -5
  52. package/dist/services/shared.d.ts.map +1 -1
  53. package/dist/services/shared.js +130 -13
  54. package/dist/services/shared.js.map +1 -1
  55. package/package.json +8 -8
  56. 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.3.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.13`
4
+ **Version:** 0.4.1
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
- **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
- **Zod:** ^4.6.5
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
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, SERVER_VERSION)
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
@@ -213,6 +215,7 @@ src/
213
215
  biorxiv-list-recent.tool.ts
214
216
  biorxiv-search-preprints.tool.ts
215
217
  biorxiv-get-published-version.tool.ts
218
+ biorxiv-list-published-versions.tool.ts
216
219
  biorxiv-get-fulltext.tool.ts
217
220
  biorxiv-list-categories.tool.ts
218
221
  ```
@@ -235,13 +238,13 @@ src/
235
238
  - **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898/…`. Run every DOI input through `normalizeDoi()` (`src/services/shared.ts`), 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. `/pubs` keyed by preprint DOI never parses a `10.64898/` DOI; see `getPublishedVersionByJournalDoi()`.
236
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.
237
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.
238
- - **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.
239
- - **Pagination:** integer `cursor` offset (0, 30, 60, …). Page size is fixed at 30 by the API — do not expose a `limit` parameter.
240
- - **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous.
241
- - **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/` prefix is used as a hint only within `server="both"` to prefer bioRxiv first, but is not a reliable discriminator (both servers share this prefix). 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.
242
- - **`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`, `true` on `biorxiv_search_preprints`) removes the abstract from both surfaces together and no other field.
241
+ - **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.
242
+ - **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.
243
+ - **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.
244
+ - **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.
245
+ - **`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.
243
246
  - **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`.
244
- - **Polite access:** include `BIORXIV_MAILTO` in the `User-Agent` header when set: `biorxiv-mcp-server/0.1.0 (mailto:${config.mailto})`. The env var is optional — omit the mailto segment when not configured.
247
+ - **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.
245
248
 
246
249
  ---
247
250
 
@@ -395,8 +398,9 @@ import { getEuropePmcService } from '@/services/europe-pmc/europe-pmc-service.js
395
398
  - [ ] bioRxiv API wrapping: tests include at least one sparse payload case with omitted upstream fields
396
399
  - [ ] `BIORXIV_MAILTO` included in outbound User-Agent header when set (optional env var)
397
400
  - [ ] DOI input normalized and validated with `normalizeDoi()` before calling API
398
- - [ ] Two-server fan-out uses `Promise.allSettled`; partial failures reported per-DOI in `failed[]`
399
- - [ ] `biorxiv_list_recent` with `server="both"` surfaces per-server pagination state, not a merged cursor
401
+ - [ ] 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
402
+ - [ ] 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`
403
+ - [ ] `biorxiv_list_recent` and `biorxiv_list_published_versions` with `server="both"` surface per-server pagination state, not a merged cursor
400
404
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
401
405
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
402
406
  - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
package/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** biorxiv-mcp-server
4
- **Version:** 0.3.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.13`
4
+ **Version:** 0.4.1
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
- **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
- **Zod:** ^4.6.5
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
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, SERVER_VERSION)
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
@@ -213,6 +215,7 @@ src/
213
215
  biorxiv-list-recent.tool.ts
214
216
  biorxiv-search-preprints.tool.ts
215
217
  biorxiv-get-published-version.tool.ts
218
+ biorxiv-list-published-versions.tool.ts
216
219
  biorxiv-get-fulltext.tool.ts
217
220
  biorxiv-list-categories.tool.ts
218
221
  ```
@@ -235,13 +238,13 @@ src/
235
238
  - **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898/…`. Run every DOI input through `normalizeDoi()` (`src/services/shared.ts`), 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. `/pubs` keyed by preprint DOI never parses a `10.64898/` DOI; see `getPublishedVersionByJournalDoi()`.
236
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.
237
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.
238
- - **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.
239
- - **Pagination:** integer `cursor` offset (0, 30, 60, …). Page size is fixed at 30 by the API — do not expose a `limit` parameter.
240
- - **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous.
241
- - **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/` prefix is used as a hint only within `server="both"` to prefer bioRxiv first, but is not a reliable discriminator (both servers share this prefix). 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.
242
- - **`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`, `true` on `biorxiv_search_preprints`) removes the abstract from both surfaces together and no other field.
241
+ - **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.
242
+ - **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.
243
+ - **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.
244
+ - **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.
245
+ - **`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.
243
246
  - **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`.
244
- - **Polite access:** include `BIORXIV_MAILTO` in the `User-Agent` header when set: `biorxiv-mcp-server/0.1.0 (mailto:${config.mailto})`. The env var is optional — omit the mailto segment when not configured.
247
+ - **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.
245
248
 
246
249
  ---
247
250
 
@@ -395,8 +398,9 @@ import { getEuropePmcService } from '@/services/europe-pmc/europe-pmc-service.js
395
398
  - [ ] bioRxiv API wrapping: tests include at least one sparse payload case with omitted upstream fields
396
399
  - [ ] `BIORXIV_MAILTO` included in outbound User-Agent header when set (optional env var)
397
400
  - [ ] DOI input normalized and validated with `normalizeDoi()` before calling API
398
- - [ ] Two-server fan-out uses `Promise.allSettled`; partial failures reported per-DOI in `failed[]`
399
- - [ ] `biorxiv_list_recent` with `server="both"` surfaces per-server pagination state, not a merged cursor
401
+ - [ ] 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
402
+ - [ ] 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`
403
+ - [ ] `biorxiv_list_recent` and `biorxiv_list_published_versions` with `server="both"` surface per-server pagination state, not a merged cursor
400
404
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
401
405
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
402
406
  - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
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.2 AS build
17
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 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.2 AS deps
49
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 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.2-slim AS production
116
+ FROM oven/bun:1.4.3-slim AS production
117
117
 
118
118
  WORKDIR /usr/src/app
119
119
 
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/biorxiv-mcp-server</h1>
3
3
  <p><b>Search and retrieve bioRxiv and medRxiv preprints — by DOI, date interval, or keyword — via MCP. STDIO or Streamable HTTP.</b>
4
- <div>6 Tools</div>
4
+ <div>7 Tools</div>
5
5
  </p>
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.3.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/biorxiv-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.2.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/biorxiv-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/biorxiv-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.4.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/biorxiv-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.3.1-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/biorxiv-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/biorxiv-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.3-blueviolet.svg?style=flat-square)](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 preprint metadata and full text, searchable via EuropePMC. Fetch preprints by DOI, browse by date interval or subject category, search by keyword and author, resolve journal-publication crosswalks, and extract full text from the rendered article page, from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
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
 
@@ -39,6 +39,7 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
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
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 |
42
43
  | `biorxiv_get_fulltext` | Retrieve a preprint's full text as best-effort Markdown extracted from its rendered HTML article page |
43
44
  | `biorxiv_list_categories` | List valid subject category strings for bioRxiv and medRxiv |
44
45
 
@@ -46,23 +47,24 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
46
47
 
47
48
  ### `biorxiv_get_preprint` <sub>tool</sub>
48
49
 
49
- - Takes up to 10 DOIs per call, 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`)
50
- - Each preprint returns its full revision history in `revisions[]` — title, authors, abstract, category, license, `awards`, `jatsxmlUrl`, and `publishedJournalDoi` once accepted. Funder names are left out because `api.biorxiv.org` attributes them to unrelated organizations
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, abstract, category, license, `awards`, `jatsxmlUrl`, and `publishedJournalDoi` once accepted. Funder names are omitted because the upstream API misattributes them
51
53
  - 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
52
54
 
53
55
  ---
54
56
 
55
57
  ### `biorxiv_list_recent` <sub>tool</sub>
56
58
 
57
- - 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 the API ignored or cannot apply raises `invalid_category` or `invalid_funder` rather than returning an unfiltered or empty page
58
- - Pages of 30 advance with an integer `cursor`; pagination is 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[]`
59
- - Abstracts are omitted by default (about three quarters of a page); `include_abstract: true` adds them
59
+ - 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`
60
+ - 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[]`
61
+ - Abstracts are omitted by default; `include_abstract: true` adds them
60
62
 
61
63
  ---
62
64
 
63
65
  ### `biorxiv_search_preprints` <sub>tool</sub>
64
66
 
65
- - 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`
67
+ - 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`
66
68
  - 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
67
69
  - Abstracts are included by default; `include_abstract: false` drops them for a response about a third the size
68
70
 
@@ -70,16 +72,24 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
70
72
 
71
73
  ### `biorxiv_get_published_version` <sub>tool</sub>
72
74
 
73
- - Takes one preprint DOI and `server` (default `both` — the two servers share their DOI prefixes); `10.64898/` DOIs, which the `/pubs` crosswalk cannot key on, resolve through the preprint's own journal DOI
74
- - Returns journal DOI, journal name, published date, corresponding-author institution, and the `server` that answered; no server answering raises a retryable `upstream_unavailable` or `rate_limited`, never `doi_not_found`
75
+ - Takes one preprint DOI and `server` (default `both`); `10.64898/` DOIs resolve through the preprint's own journal DOI
76
+ - Returns 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`
77
+
78
+ ---
79
+
80
+ ### `biorxiv_list_published_versions` <sub>tool</sub>
81
+
82
+ - 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
83
+ - 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[]`
84
+ - Abstracts are omitted by default; `include_abstract: true` adds them
75
85
 
76
86
  ---
77
87
 
78
88
  ### `biorxiv_get_fulltext` <sub>tool</sub>
79
89
 
80
- - Takes a DOI, `server` (default `both`), and an optional `version` (or a `vN` suffix — the two must agree; a version the preprint lacks raises `version_not_found`); extracts Markdown from the rendered HTML article page, since there is no keyless JATS source, and names the answering `server`
81
- - Pages via `offset`/`limit` characters (default 20,000, max 50,000), reporting `totalChars`, `remainingChars`, `hasMore`, and `wordCount`; the extracted article is cached per version, so paging costs one origin fetch
82
- - PDF-only preprints and blocked pages raise `fulltext_unavailable`, routing to `biorxiv_get_preprint`
90
+ - 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`
91
+ - Table cells are not on the page: each table keeps its caption, and `omittedTables` names it with the URL that serves its cells
92
+ - 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`
83
93
 
84
94
  ---
85
95
 
@@ -94,20 +104,19 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
94
104
 
95
105
  bioRxiv-specific:
96
106
 
97
- - `BiorxivApiService` wraps `api.biorxiv.org` — details, publications, and crosswalk endpoints with retry and exponential backoff; a 429 is classified as a retryable `rate_limited` error carrying the parsed `Retry-After` wait, with the upstream response body kept out of the payload
98
- - `EuropePmcService` wraps the EuropePMC search endpoint for relevance-ranked keyword and/or author results, classified the same way on a 429
99
- - `BiorxivFullTextService` fetches and extracts Markdown from the rendered HTML article pages on `www.biorxiv.org` / `www.medrxiv.org` — a distinct origin from the JSON API
100
- - Two-server fan-out via `Promise.allSettled` — both `biorxiv` and `medrxiv` queried in parallel when `server="both"`, results merged and deduplicated by DOI
107
+ - `BiorxivApiService` wraps `api.biorxiv.org` (details, publications, and crosswalk endpoints) and `EuropePmcService` wraps EuropePMC search, both with retry and exponential backoff
108
+ - `BiorxivFullTextService` extracts Markdown from the article pages on `www.biorxiv.org` / `www.medrxiv.org`
109
+ - 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
110
+ - 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
101
111
  - Polite `User-Agent` header including a mailto address (`BIORXIV_MAILTO` env var) per Cold Spring Harbor Lab API guidelines
102
112
  - Pairs with **pubmed-mcp-server** (post-publication), **openalex-mcp-server** (citation analytics), and **crossref-mcp-server** (DOI metadata)
103
113
 
104
114
  Agent-friendly output:
105
115
 
106
- - Graceful partial failure — per-DOI and per-server failures land in `failed[]` with a typed `reason` and `retryable` flag instead of aborting the whole batch or listing call
107
- - Rate-limit transparency — a 429 from any upstream surfaces as `reason: "rate_limited"` carrying the origin's parsed `retryAfter` wait, distinguished from a generic `upstream_unavailable`
108
- - Discriminated enrichment outputs — `biorxiv_search_preprints` results carry `enriched` plus a typed `enrichment_error` (`service_error` / `rate_limited` / `not_found`) so callers branch on data, not string parsing
109
- - Paging and pagination state — `exhausted` cursors are flagged as an out-of-range artifact rather than an empty interval, and `biorxiv_get_fulltext` reports `totalChars` / `remainingChars` / `hasMore` for chunked reads
110
- - Clean titles and abstracts — Highwire export markup is resolved to plain text on both surfaces: symbol placeholders (`{beta}`, `{+/-}`, `[&ge;]`) 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
116
+ - Graceful partial failure — per-DOI and per-server failures land in `failed[]` with a typed `reason` and `retryable` flag instead of aborting the call
117
+ - Rate-limit transparency — a 429 surfaces as `reason: "rate_limited"` with the parsed `retryAfter` wait, distinct from `upstream_unavailable`
118
+ - Typed enrichment status — `biorxiv_search_preprints` results carry `enriched` plus a typed `enrichment_error` (`service_error` / `rate_limited` / `not_found`)
119
+ - Clean titles and abstracts — export markup and symbol placeholders (`{beta}`, `[&ge;]`) are resolved to plain text
111
120
 
112
121
  ## Getting started
113
122
 
@@ -224,7 +233,7 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
224
233
 
225
234
  | Variable | Description | Default |
226
235
  |:---|:---|:---|
227
- | `BIORXIV_MAILTO` | Email address included in the `User-Agent` header for polite API access per Cold Spring Harbor Lab guidelines. Optional, but recommended. | — |
236
+ | `BIORXIV_MAILTO` | Email address for the `User-Agent` header; optional but recommended. | — |
228
237
  | `BIORXIV_API_BASE_URL` | Override the bioRxiv API base URL. | `https://api.biorxiv.org` |
229
238
  | `EUROPEPMC_API_BASE_URL` | Override the EuropePMC base URL. | `https://www.ebi.ac.uk/europepmc/webservices/rest` |
230
239
  | `BIORXIV_WEB_BASE_URL` | Override the bioRxiv website base URL (full-text HTML source for `biorxiv_get_fulltext`). | `https://www.biorxiv.org` |
@@ -279,7 +288,7 @@ The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `
279
288
  |:---|:---|
280
289
  | `src/index.ts` | `createApp()` entry point — registers tools and initializes services. |
281
290
  | `src/config` | Server-specific environment variable parsing and validation with Zod. |
282
- | `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Six tools across bioRxiv and medRxiv. |
291
+ | `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Seven tools across bioRxiv and medRxiv. |
283
292
  | `src/services/biorxiv` | `BiorxivApiService` — details, publications, and crosswalk endpoint wrappers with retry. |
284
293
  | `src/services/biorxiv-fulltext` | `BiorxivFullTextService` — rendered HTML article page fetch and Markdown extraction. |
285
294
  | `src/services/europe-pmc` | `EuropePmcService` — preprint keyword/author search endpoint wrapper. |
@@ -0,0 +1,33 @@
1
+ ---
2
+ summary: "Adds biorxiv_list_published_versions, which lists preprints published as journal articles by journal publication date. biorxiv_get_fulltext keeps citation labels and reference text, names tables whose cells are not on the page, and drops its 50,000-character limit ceiling."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.4.0 — 2026-10-15
8
+
9
+ ## Added
10
+
11
+ - **`biorxiv_list_published_versions`** lists the preprints that appeared as journal articles within a journal publication-date interval, on bioRxiv, medRxiv, or both. Pages of 100 rows per server advance with `cursor`, with per-server pagination; `include_abstract` adds abstracts (#59).
12
+ - **`biorxiv_get_fulltext` `omittedTables`** names each table whose cells are not on the article page, by label with the URL that serves them, on every chunk and in the rendered text (#58).
13
+
14
+ ## Changed
15
+
16
+ - **`biorxiv_get_fulltext` extraction** keeps inline citation, figure, and table labels and each reference entry's text, with the DOI of an entry that has one as a `doi.org` link. Cached extractions from earlier versions are not reused (#58).
17
+ - **`biorxiv_get_fulltext` `limit`** has no maximum; a value past the remaining text returns the rest of the article (#62).
18
+ - **`biorxiv_search_preprints` `date_from`/`date_to`** advertise the `YYYY-MM-DD` pattern in the input schema, so a malformed date is rejected as an invalid argument; `invalid_date_range` still covers non-calendar dates and reversed bounds (#57).
19
+ - **`rate_limited` recovery hints** read "wait the `retryAfter` seconds when present, otherwise a minute or two" on every tool that declares it (#60).
20
+ - **Minor:** the server instructions name `biorxiv_list_published_versions` and the `10.64898/` DOI prefix (#59); the guidance on a truncated `biorxiv_get_fulltext` chunk names the `doi` to pass with the next `offset` (#58).
21
+
22
+ ## Fixed
23
+
24
+ - **`biorxiv_search_preprints` blank dates** — a blank `date_from` or `date_to` reads as unset instead of corrupting the EuropePMC date filter and the `queryEcho` (#57).
25
+ - **`Retry-After` of `0` or a past date** is treated as no usable wait across every origin, so the retry wording no longer says to wait 0 seconds (#60).
26
+
27
+ ## Dependencies
28
+
29
+ - `@cyanheads/mcp-ts-core` ^0.13.13 → ^0.13.15 (`@modelcontextprotocol/server` 2.2.0 → 2.3.1 through the framework)
30
+ - `defuddle` ^0.19.4 → ^0.19.5, `pino-pretty` ^13.1.3 → ^13.2.0, `zod` ^4.6.5 → ^4.6.6
31
+ - Dev: `@types/node` 26.6.4 → 26.6.5, `vitest` ^5.0.3 → ^5.0.4
32
+ - Bun 1.4.2 → 1.4.3 (`packageManager`, Docker base images)
33
+ - Framework skills in `framework-skills/` synced to 0.13.15
@@ -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
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/ 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.',
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.',
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,8hBAA8hB;IAChiB,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"}
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,6tBAA6tB;IAC/tB,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,11 @@
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, and the full-text fetch targets the single server
12
- * that answered. Long articles are paged with offset/limit character chunking.
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;
15
+ * the tables the page carries no cells for (`omittedTables`) ride on every chunk.
13
16
  * Full text is best-effort HTML→Markdown, not structured JATS; preprints that are
14
17
  * PDF-only or whose page is blocked return a typed `fulltext_unavailable` error
15
18
  * routing to biorxiv_get_preprint, while an origin rate limit (HTTP 429) routes to
@@ -56,6 +59,10 @@ export declare const biorxivGetFulltextTool: import("@cyanheads/mcp-ts-core").To
56
59
  totalChars: z.ZodNumber;
57
60
  remainingChars: z.ZodNumber;
58
61
  hasMore: z.ZodBoolean;
62
+ omittedTables: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
+ label: z.ZodString;
64
+ url: z.ZodString;
65
+ }, z.core.$strip>>>;
59
66
  }, z.core.$strip>, readonly [{
60
67
  readonly reason: "invalid_doi_format";
61
68
  readonly code: JsonRpcErrorCode.ValidationError;
@@ -80,14 +87,14 @@ export declare const biorxivGetFulltextTool: import("@cyanheads/mcp-ts-core").To
80
87
  readonly reason: "upstream_unavailable";
81
88
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
82
89
  readonly retryable: true;
83
- readonly when: "No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org.";
84
- 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.";
85
92
  }, {
86
93
  readonly reason: "rate_limited";
87
94
  readonly code: JsonRpcErrorCode.RateLimited;
88
95
  readonly retryable: true;
89
96
  readonly when: "Either origin returned HTTP 429 for this host — the article page (www.biorxiv.org / www.medrxiv.org) during the full-text fetch, or api.biorxiv.org during version resolution.";
90
- readonly recovery: "Wait the retryAfter seconds before calling again; the recovery hint names which origins are limiting and what still works meanwhile.";
97
+ readonly recovery: "Wait the retryAfter seconds when present, otherwise a minute or two, before calling again; the recovery hint names which origins are limiting and what still works meanwhile.";
91
98
  }, {
92
99
  readonly reason: "fulltext_unavailable";
93
100
  readonly code: JsonRpcErrorCode.NotFound;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwZjC,CAAC"}
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;AAyC3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiejC,CAAC"}