@cyanheads/biorxiv-mcp-server 0.1.18 → 0.2.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.
- package/AGENTS.md +5 -5
- package/CLAUDE.md +5 -5
- package/Dockerfile +1 -1
- package/README.md +31 -10
- package/changelog/0.2.x/0.2.0.md +12 -0
- package/changelog/0.2.x/0.2.1.md +30 -0
- package/dist/config/server-config.d.ts +2 -0
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +14 -0
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts +65 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js +209 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +17 -2
- 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 +56 -37
- 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 +17 -2
- 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 +41 -10
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts +18 -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 +104 -23
- 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 +6 -4
- 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 +28 -11
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +94 -9
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/index.js +3 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.js.map +1 -1
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts +52 -0
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts.map +1 -0
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js +156 -0
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js.map +1 -0
- package/dist/services/europe-pmc/europe-pmc-service.d.ts +4 -1
- package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -1
- package/dist/services/europe-pmc/europe-pmc-service.js +12 -1
- package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -1
- package/package.json +15 -7
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** biorxiv-mcp-server
|
|
4
|
-
**Version:** 0.1
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.
|
|
6
|
-
**Engines:** Bun ≥1.3.
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.
|
|
4
|
+
**Version:** 0.2.1
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.1`
|
|
6
|
+
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
|
|
8
8
|
**Zod:** ^4.4.3
|
|
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.
|
|
@@ -198,7 +198,7 @@ src/
|
|
|
198
198
|
## Domain Conventions
|
|
199
199
|
|
|
200
200
|
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN`. Validate on input — the bioRxiv API returns empty collections for malformed DOIs without an error code.
|
|
201
|
-
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"
|
|
201
|
+
- **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.
|
|
202
202
|
- **Pagination:** integer `cursor` offset (0, 30, 60, …). Page size is fixed at 30 by the API — do not expose a `limit` parameter.
|
|
203
203
|
- **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous.
|
|
204
204
|
- **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).
|
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** biorxiv-mcp-server
|
|
4
|
-
**Version:** 0.1
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.
|
|
6
|
-
**Engines:** Bun ≥1.3.
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.
|
|
4
|
+
**Version:** 0.2.1
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.1`
|
|
6
|
+
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
|
|
8
8
|
**Zod:** ^4.4.3
|
|
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.
|
|
@@ -198,7 +198,7 @@ src/
|
|
|
198
198
|
## Domain Conventions
|
|
199
199
|
|
|
200
200
|
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN`. Validate on input — the bioRxiv API returns empty collections for malformed DOIs without an error code.
|
|
201
|
-
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"
|
|
201
|
+
- **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.
|
|
202
202
|
- **Pagination:** integer `cursor` offset (0, 30, 60, …). Page size is fixed at 30 by the API — do not expose a `limit` parameter.
|
|
203
203
|
- **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous.
|
|
204
204
|
- **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).
|
package/Dockerfile
CHANGED
|
@@ -60,7 +60,7 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
|
60
60
|
ARG OTEL_ENABLED=true
|
|
61
61
|
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
62
62
|
if [ "$OTEL_ENABLED" = "true" ]; then \
|
|
63
|
-
bun add @hono/otel \
|
|
63
|
+
bun add --omit=dev --ignore-scripts @hono/otel \
|
|
64
64
|
@opentelemetry/instrumentation-http \
|
|
65
65
|
@opentelemetry/exporter-metrics-otlp-http \
|
|
66
66
|
@opentelemetry/exporter-trace-otlp-http \
|
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>
|
|
4
|
+
<div>6 Tools</div>
|
|
5
5
|
</p>
|
|
6
6
|
</div>
|
|
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
|
|
|
@@ -23,14 +23,15 @@
|
|
|
23
23
|
|
|
24
24
|
## Tools
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Six tools for working with bioRxiv and medRxiv preprint data:
|
|
27
27
|
|
|
28
28
|
| Tool | Description |
|
|
29
29
|
|:---|:---|
|
|
30
30
|
| `biorxiv_get_preprint` | Fetch full metadata, abstract, revision history, and journal crosswalk for one or more preprints by DOI |
|
|
31
31
|
| `biorxiv_list_recent` | List preprints posted or updated within a date interval, with optional server and category filters |
|
|
32
|
-
| `biorxiv_search_preprints` | Search preprints by keyword via EuropePMC for relevance ranking, enriched with bioRxiv/medRxiv metadata |
|
|
32
|
+
| `biorxiv_search_preprints` | Search preprints by keyword and/or author via EuropePMC for relevance ranking, enriched with bioRxiv/medRxiv metadata |
|
|
33
33
|
| `biorxiv_get_published_version` | Resolve a preprint DOI to its journal publication record (journal DOI, name, published date) |
|
|
34
|
+
| `biorxiv_get_fulltext` | Retrieve a preprint's full text as best-effort Markdown extracted from its rendered HTML article page |
|
|
34
35
|
| `biorxiv_list_categories` | List valid subject category strings for bioRxiv and medRxiv |
|
|
35
36
|
|
|
36
37
|
### `biorxiv_get_preprint`
|
|
@@ -41,6 +42,7 @@ Fetch preprint metadata by DOI — all revisions in one call.
|
|
|
41
42
|
- Each DOI returns the full revision history in `collection[]` — one API call per DOI, no enumeration loop
|
|
42
43
|
- Includes title, authors, abstract, category, license, JATS XML full-text link (`jatsxml`), and published journal DOI when the preprint has been accepted
|
|
43
44
|
- Scope to `biorxiv`, `medrxiv`, or `both`; when `both`, each DOI fans out in parallel and partial failures report per-DOI in `failed[]`
|
|
45
|
+
- Each `failed[]` entry carries a `reason` (`not_found`, `invalid_doi_format`, `upstream_unavailable`) and a `retryable` flag — a DOI is only reported as not found when every attempted server answered
|
|
44
46
|
|
|
45
47
|
---
|
|
46
48
|
|
|
@@ -52,14 +54,17 @@ Page through preprints in a date interval.
|
|
|
52
54
|
- Fixed page size of 30 (API constraint); advance with integer `cursor` (0, 30, 60, …)
|
|
53
55
|
- Response includes `total` count per server for calculating remaining pages
|
|
54
56
|
- When `server="both"`, each server paginates independently; response surfaces per-server pagination state (`{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`)
|
|
57
|
+
- A server whose cursor is past its last page is marked `exhausted: true` — the API reports `total: 0` for an out-of-range cursor, so that count is an artifact rather than the interval total
|
|
58
|
+
- A server that does not answer under `server="both"` is named in `failed[]` rather than dropped; the other server's page is still returned, and a non-empty `failed[]` marks the result set as partial
|
|
55
59
|
|
|
56
60
|
---
|
|
57
61
|
|
|
58
62
|
### `biorxiv_search_preprints`
|
|
59
63
|
|
|
60
|
-
Keyword search with relevance ranking.
|
|
64
|
+
Keyword and/or author search with relevance ranking.
|
|
61
65
|
|
|
62
66
|
- EuropePMC powers relevance ranking (indexes new preprints within 1–2 days of posting); bioRxiv/medRxiv API provides canonical metadata enrichment
|
|
67
|
+
- Optional `author` maps to an EuropePMC `AUTH:"…"` field query, ANDed with the keyword query — supply `query`, `author`, or both
|
|
63
68
|
- Covers both servers by default; scope down with `server`
|
|
64
69
|
- Optional date range filters (`date_from`, `date_to`)
|
|
65
70
|
- Enrichment failures degrade gracefully to EuropePMC-only metadata, surfaced via `partial_results`
|
|
@@ -70,9 +75,21 @@ Keyword search with relevance ranking.
|
|
|
70
75
|
|
|
71
76
|
Resolve a preprint DOI to its journal publication crosswalk.
|
|
72
77
|
|
|
73
|
-
- Uses the `/pubs/{server}/{doi}` endpoint for richer metadata than the `
|
|
78
|
+
- Uses the `/pubs/{server}/{doi}` endpoint for richer metadata than the `publishedJournalDoi` field in `biorxiv_get_preprint`
|
|
74
79
|
- Returns journal DOI, journal name, published date, and corresponding author institution
|
|
75
|
-
- Use when the preprint's `
|
|
80
|
+
- Use when the preprint's `publishedJournalDoi` field is present and you need the full crosswalk record
|
|
81
|
+
- Scope to `biorxiv`, `medrxiv`, or `both`; `both` is the default because the two servers share the `10.1101/` DOI prefix, and the output `server` field names the one that answered
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### `biorxiv_get_fulltext`
|
|
86
|
+
|
|
87
|
+
Retrieve a preprint's full text as best-effort Markdown.
|
|
88
|
+
|
|
89
|
+
- Fetches the rendered HTML article page (`www.{server}.org/content/{doi}v{N}.full`) and extracts Markdown — there is no keyless JATS source
|
|
90
|
+
- Resolves the latest version via the details API first, for the URL version and clean not-found handling
|
|
91
|
+
- Long articles page via `offset`/`limit` character chunking (`totalChars`, `remainingChars`, `hasMore`)
|
|
92
|
+
- PDF-only preprints and blocked/challenge pages return a typed `fulltext_unavailable` error routing to `biorxiv_get_preprint`
|
|
76
93
|
|
|
77
94
|
---
|
|
78
95
|
|
|
@@ -97,7 +114,8 @@ Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp
|
|
|
97
114
|
bioRxiv-specific:
|
|
98
115
|
|
|
99
116
|
- `BiorxivApiService` wraps `api.biorxiv.org` — details, publications, and crosswalk endpoints with retry and exponential backoff
|
|
100
|
-
- `EuropePmcService` wraps the EuropePMC search endpoint for relevance-ranked keyword results
|
|
117
|
+
- `EuropePmcService` wraps the EuropePMC search endpoint for relevance-ranked keyword and/or author results
|
|
118
|
+
- `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
|
|
101
119
|
- Two-server fan-out via `Promise.allSettled` — both `biorxiv` and `medrxiv` queried in parallel when `server="both"`, results merged and deduplicated by DOI
|
|
102
120
|
- Polite `User-Agent` header including a mailto address (`BIORXIV_MAILTO` env var) per Cold Spring Harbor Lab API guidelines
|
|
103
121
|
- Pairs with **pubmed-mcp-server** (post-publication), **openalex-mcp-server** (citation analytics), and **crossref-mcp-server** (DOI metadata)
|
|
@@ -203,6 +221,8 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
|
|
|
203
221
|
| `BIORXIV_MAILTO` | Email address included in the `User-Agent` header for polite API access per Cold Spring Harbor Lab guidelines. Optional, but recommended. | — |
|
|
204
222
|
| `BIORXIV_API_BASE_URL` | Override the bioRxiv API base URL. | `https://api.biorxiv.org` |
|
|
205
223
|
| `EUROPEPMC_API_BASE_URL` | Override the EuropePMC base URL. | `https://www.ebi.ac.uk/europepmc/webservices/rest` |
|
|
224
|
+
| `BIORXIV_WEB_BASE_URL` | Override the bioRxiv website base URL (full-text HTML source for `biorxiv_get_fulltext`). | `https://www.biorxiv.org` |
|
|
225
|
+
| `MEDRXIV_WEB_BASE_URL` | Override the medRxiv website base URL (full-text HTML source for `biorxiv_get_fulltext`). | `https://www.medrxiv.org` |
|
|
206
226
|
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
207
227
|
| `MCP_HTTP_PORT` | HTTP server port. | `3010` |
|
|
208
228
|
| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path. | `/mcp` |
|
|
@@ -250,9 +270,10 @@ The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `
|
|
|
250
270
|
|:---|:---|
|
|
251
271
|
| `src/index.ts` | `createApp()` entry point — registers tools and initializes services. |
|
|
252
272
|
| `src/config` | Server-specific environment variable parsing and validation with Zod. |
|
|
253
|
-
| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`).
|
|
273
|
+
| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Six tools across bioRxiv and medRxiv. |
|
|
254
274
|
| `src/services/biorxiv` | `BiorxivApiService` — details, publications, and crosswalk endpoint wrappers with retry. |
|
|
255
|
-
| `src/services/
|
|
275
|
+
| `src/services/biorxiv-fulltext` | `BiorxivFullTextService` — rendered HTML article page fetch and Markdown extraction. |
|
|
276
|
+
| `src/services/europe-pmc` | `EuropePmcService` — preprint keyword/author search endpoint wrapper. |
|
|
256
277
|
| `tests/` | Unit and integration tests mirroring the `src/` structure. |
|
|
257
278
|
|
|
258
279
|
## Development guide
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Add biorxiv_get_fulltext for full-text retrieval via HTML extraction and an author filter on biorxiv_search_preprints (#19)"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.2.0 — 2026-07-11
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`biorxiv_get_fulltext`** — retrieves a preprint's full text as best-effort Markdown extracted from the rendered HTML article page (`www.{server}.org/content/{doi}v{N}.full`); there's no keyless JATS source, so this extracts `contentFormat: "html-markdown"`, not structured JATS. Resolves the latest version via the details API, pages long articles with `offset`/`limit` character chunking, and routes PDF-only or blocked pages to a typed `fulltext_unavailable` error pointing at `biorxiv_get_preprint`. medRxiv's Cloudflare edge can block programmatic fetches from some hosts — bioRxiv coverage is more reliable. New deps: `defuddle` `^0.19.0`, `linkedom` `^0.18.12`. [#19](https://github.com/cyanheads/biorxiv-mcp-server/issues/19)
|
|
12
|
+
- **`biorxiv_search_preprints`** — optional `author` parameter maps to an EuropePMC `AUTH:"…"` field query, ANDed with the keyword query; `query` is now optional when `author` is supplied, so author-only searches work while existing query-only calls are unchanged. [#19](https://github.com/cyanheads/biorxiv-mcp-server/issues/19)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "biorxiv_get_preprint and biorxiv_get_published_version distinguish upstream failures from not-found; biorxiv_list_recent surfaces exhausted cursors and failed servers (#32, #34, #35, #39)"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.2.1 — 2026-08-09
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **`biorxiv_get_published_version`** — `server` gains `"both"` and now defaults to it, fanning out across bioRxiv and medRxiv in parallel (the two servers share the `10.1101/` prefix, so a single-server default silently missed records held by the other). New required output field `server` names which server answered. [#34](https://github.com/cyanheads/biorxiv-mcp-server/issues/34)
|
|
12
|
+
|
|
13
|
+
## Fixed
|
|
14
|
+
|
|
15
|
+
- **`biorxiv_get_preprint`** — a DOI is now reported `not_found` only when every attempted server answered with an empty collection; a server that failed to respond leaves absence unestablished and the DOI is classified `upstream_unavailable` (retryable) instead. Each `failed[]` entry carries a new `reason` (`not_found`, `invalid_doi_format`, `upstream_unavailable`) and `retryable` flag; the batch-level thrown error follows the same discrimination via a new declared `upstream_unavailable` contract entry. [#32](https://github.com/cyanheads/biorxiv-mcp-server/issues/32)
|
|
16
|
+
- **`biorxiv_get_published_version`** — `doi_not_found` recovery hint no longer asserts the preprint is unpublished; it now points at retrying with `server="both"` or checking `publishedJournalDoi`. A server that fails to respond throws a new retryable `upstream_unavailable` instead of being folded into `doi_not_found`. [#34](https://github.com/cyanheads/biorxiv-mcp-server/issues/34)
|
|
17
|
+
- **`biorxiv_list_recent`** — under `server="both"`, a per-server cursor past the last page now sets a new `exhausted: true` flag instead of its `total: 0` reading as "nothing in the interval"; a server that fails to answer is named in a new top-level `failed[]` (rather than silently dropped) and in the response `notice`, marking the result set as partial. `ctx.enrich.notice` is last-wins, so every applicable qualification (failed servers, exhausted cursors, empty results) is now composed into one notice string. [#35](https://github.com/cyanheads/biorxiv-mcp-server/issues/35), [#39](https://github.com/cyanheads/biorxiv-mcp-server/issues/39)
|
|
18
|
+
- **README** — `biorxiv_get_published_version` section referenced a `published` field; corrected to `publishedJournalDoi`, matching the actual `biorxiv_get_preprint` output.
|
|
19
|
+
|
|
20
|
+
## Dependencies
|
|
21
|
+
|
|
22
|
+
- **`@cyanheads/mcp-ts-core`** `^0.10.14` → `^0.11.1`
|
|
23
|
+
- **`typescript`** `^6.0.3` → `^7.0.2`
|
|
24
|
+
- **`defuddle`** `^0.19.0` → `^0.19.2`
|
|
25
|
+
- **`linkedom`** `^0.18.12` → `^0.18.13`
|
|
26
|
+
- **`@biomejs/biome`** `2.5.2` → `2.5.7`
|
|
27
|
+
- **`@types/node`** `26.1.0` → `26.1.2`
|
|
28
|
+
- **`ignore`** `^7.0.5` → `^7.0.6`
|
|
29
|
+
- **`tsc-alias`** `^1.9.0` → `^1.9.1`
|
|
30
|
+
- New `overrides` block pins `fast-uri` `^3.1.5`, `ip-address` `^10.3.1`, `js-yaml` `^3.15.1`, and `postcss` `^8.5.23` — transitive advisories that a floating range alone wouldn't hold down; clears `bun audit` to zero vulnerabilities.
|
|
@@ -9,6 +9,8 @@ declare const ServerConfigSchema: z.ZodObject<{
|
|
|
9
9
|
mailto: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
10
10
|
apiBaseUrl: z.ZodDefault<z.ZodString>;
|
|
11
11
|
europePmcBaseUrl: z.ZodDefault<z.ZodString>;
|
|
12
|
+
biorxivWebBaseUrl: z.ZodDefault<z.ZodString>;
|
|
13
|
+
medrxivWebBaseUrl: z.ZodDefault<z.ZodString>;
|
|
12
14
|
}, z.core.$strip>;
|
|
13
15
|
export type ServerConfig = z.infer<typeof ServerConfigSchema>;
|
|
14
16
|
export declare function getServerConfig(): ServerConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;;;iBA+BtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,wBAAgB,eAAe,IAAI,YAAY,CAS9C;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
|
@@ -18,6 +18,18 @@ const ServerConfigSchema = z.object({
|
|
|
18
18
|
.url()
|
|
19
19
|
.default('https://www.ebi.ac.uk/europepmc/webservices/rest')
|
|
20
20
|
.describe('EuropePMC REST API base URL'),
|
|
21
|
+
// Full-text HTML lives on the public websites, not the JSON API host — a
|
|
22
|
+
// distinct origin per server. Overridable for testing or mirrors.
|
|
23
|
+
biorxivWebBaseUrl: z
|
|
24
|
+
.string()
|
|
25
|
+
.url()
|
|
26
|
+
.default('https://www.biorxiv.org')
|
|
27
|
+
.describe('bioRxiv website base URL — source of rendered full-text HTML pages for biorxiv_get_fulltext'),
|
|
28
|
+
medrxivWebBaseUrl: z
|
|
29
|
+
.string()
|
|
30
|
+
.url()
|
|
31
|
+
.default('https://www.medrxiv.org')
|
|
32
|
+
.describe('medRxiv website base URL — source of rendered full-text HTML pages for biorxiv_get_fulltext'),
|
|
21
33
|
});
|
|
22
34
|
let _config;
|
|
23
35
|
export function getServerConfig() {
|
|
@@ -25,6 +37,8 @@ export function getServerConfig() {
|
|
|
25
37
|
mailto: 'BIORXIV_MAILTO',
|
|
26
38
|
apiBaseUrl: 'BIORXIV_API_BASE_URL',
|
|
27
39
|
europePmcBaseUrl: 'EUROPEPMC_API_BASE_URL',
|
|
40
|
+
biorxivWebBaseUrl: 'BIORXIV_WEB_BASE_URL',
|
|
41
|
+
medrxivWebBaseUrl: 'MEDRXIV_WEB_BASE_URL',
|
|
28
42
|
});
|
|
29
43
|
return _config;
|
|
30
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,+EAA+E;IAC/E,4EAA4E;IAC5E,MAAM,EAAE,CAAC;SACN,UAAU,CACT,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EACpE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAC9B;SACA,QAAQ,CAAC,4EAA4E,CAAC;IACzF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,yBAAyB,CAAC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C,yBAAyB,CAAC;SAClC,QAAQ,CACP,6FAA6F,CAC9F;CACJ,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,MAAM,EAAE,gBAAgB;QACxB,UAAU,EAAE,sBAAsB;QAClC,gBAAgB,EAAE,wBAAwB;QAC1C,iBAAiB,EAAE,sBAAsB;QACzC,iBAAiB,EAAE,sBAAsB;KAC1C,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,GAAG,SAAS,CAAC;AACtB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { createApp } from '@cyanheads/mcp-ts-core';
|
|
9
9
|
import { allToolDefinitions } from './mcp-server/tools/definitions/index.js';
|
|
10
10
|
import { initBiorxivApiService } from './services/biorxiv/biorxiv-service.js';
|
|
11
|
+
import { initBiorxivFullTextService } from './services/biorxiv-fulltext/biorxiv-fulltext-service.js';
|
|
11
12
|
import { initEuropePmcService } from './services/europe-pmc/europe-pmc-service.js';
|
|
12
13
|
await createApp({
|
|
13
14
|
name: 'biorxiv-mcp-server',
|
|
@@ -24,6 +25,7 @@ await createApp({
|
|
|
24
25
|
setup(core) {
|
|
25
26
|
initBiorxivApiService(core.config, core.storage);
|
|
26
27
|
initEuropePmcService(core.config, core.storage);
|
|
28
|
+
initBiorxivFullTextService(core.config, core.storage);
|
|
27
29
|
},
|
|
28
30
|
});
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
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,y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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"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview biorxiv_get_fulltext tool — retrieves a preprint's full text by
|
|
3
|
+
* fetching its rendered HTML page (`www.{server}.org/content/{doi}v{N}.full`) and
|
|
4
|
+
* extracting readable Markdown. The latest version is resolved via the details
|
|
5
|
+
* API first (for the URL version and clean not-found handling), then the HTML is
|
|
6
|
+
* fetched and run through the framework extractor. Long articles are paged with
|
|
7
|
+
* offset/limit character chunking. Full text is best-effort HTML→Markdown, not
|
|
8
|
+
* structured JATS; preprints that are PDF-only or whose page is blocked return a
|
|
9
|
+
* typed `fulltext_unavailable` error routing to biorxiv_get_preprint.
|
|
10
|
+
* @module mcp-server/tools/definitions/biorxiv-get-fulltext.tool
|
|
11
|
+
*/
|
|
12
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
13
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
14
|
+
export declare const biorxivGetFulltextTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
15
|
+
doi: z.ZodString;
|
|
16
|
+
server: z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
biorxiv: "biorxiv";
|
|
18
|
+
medrxiv: "medrxiv";
|
|
19
|
+
}>>;
|
|
20
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
doi: z.ZodString;
|
|
24
|
+
server: z.ZodEnum<{
|
|
25
|
+
biorxiv: "biorxiv";
|
|
26
|
+
medrxiv: "medrxiv";
|
|
27
|
+
}>;
|
|
28
|
+
version: z.ZodString;
|
|
29
|
+
title: z.ZodOptional<z.ZodString>;
|
|
30
|
+
content: z.ZodString;
|
|
31
|
+
contentFormat: z.ZodLiteral<"html-markdown">;
|
|
32
|
+
wordCount: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
sourceUrl: z.ZodString;
|
|
34
|
+
offset: z.ZodNumber;
|
|
35
|
+
length: z.ZodNumber;
|
|
36
|
+
totalChars: z.ZodNumber;
|
|
37
|
+
remainingChars: z.ZodNumber;
|
|
38
|
+
hasMore: z.ZodBoolean;
|
|
39
|
+
}, z.core.$strip>, readonly [{
|
|
40
|
+
readonly reason: "invalid_doi_format";
|
|
41
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
42
|
+
readonly when: "The input DOI does not match the 10.NNNN/ pattern.";
|
|
43
|
+
readonly recovery: "Correct the DOI format — bioRxiv/medRxiv DOIs start with 10.1101/ or 10.64898/ followed by the manuscript ID.";
|
|
44
|
+
}, {
|
|
45
|
+
readonly reason: "doi_not_found";
|
|
46
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
47
|
+
readonly when: "The DOI resolves to no preprint on the requested server.";
|
|
48
|
+
readonly recovery: "Find the correct DOI and server with biorxiv_search_preprints, or retry with the other server value.";
|
|
49
|
+
}, {
|
|
50
|
+
readonly reason: "fulltext_unavailable";
|
|
51
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
52
|
+
readonly when: "The preprint exists but its full-text HTML page is blocked, missing, or yields no extractable text (PDF-only).";
|
|
53
|
+
readonly recovery: "Use biorxiv_get_preprint for the title, abstract, and metadata — a readable full-text page is not available for this preprint.";
|
|
54
|
+
}, {
|
|
55
|
+
readonly reason: "offset_out_of_range";
|
|
56
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
57
|
+
readonly when: "offset is greater than or equal to the total character length of the extracted text.";
|
|
58
|
+
readonly recovery: "Use an offset below totalChars — a prior response's remainingChars shows how much text is left.";
|
|
59
|
+
}], {
|
|
60
|
+
readonly truncated: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
readonly shown: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
readonly cap: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}>;
|
|
65
|
+
//# sourceMappingURL=biorxiv-get-fulltext.tool.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;GAUG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmPjC,CAAC"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview biorxiv_get_fulltext tool — retrieves a preprint's full text by
|
|
3
|
+
* fetching its rendered HTML page (`www.{server}.org/content/{doi}v{N}.full`) and
|
|
4
|
+
* extracting readable Markdown. The latest version is resolved via the details
|
|
5
|
+
* API first (for the URL version and clean not-found handling), then the HTML is
|
|
6
|
+
* fetched and run through the framework extractor. Long articles are paged with
|
|
7
|
+
* offset/limit character chunking. Full text is best-effort HTML→Markdown, not
|
|
8
|
+
* structured JATS; preprints that are PDF-only or whose page is blocked return a
|
|
9
|
+
* typed `fulltext_unavailable` error routing to biorxiv_get_preprint.
|
|
10
|
+
* @module mcp-server/tools/definitions/biorxiv-get-fulltext.tool
|
|
11
|
+
*/
|
|
12
|
+
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
13
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
14
|
+
import { getBiorxivApiService } from '../../../services/biorxiv/biorxiv-service.js';
|
|
15
|
+
import { getBiorxivFullTextService } from '../../../services/biorxiv-fulltext/biorxiv-fulltext-service.js';
|
|
16
|
+
const DOI_REGEX = /^10\.\d{4,}\//;
|
|
17
|
+
export const biorxivGetFulltextTool = tool('biorxiv_get_fulltext', {
|
|
18
|
+
title: 'Get Preprint Full Text',
|
|
19
|
+
description: "Retrieve a preprint's full text as best-effort Markdown, extracted from its rendered HTML article page. Resolves the latest version via the details API, then fetches and extracts the body — abstract, sections, and references. This is HTML-to-Markdown extraction, not structured JATS: section structure is approximate and not guaranteed. Long articles exceed a single response, so use offset and limit to page through them (the response reports totalChars, remainingChars, and hasMore). Not every preprint has an extractable HTML page — some are PDF-only and some origins block programmatic access — in which case a fulltext_unavailable error routes you to biorxiv_get_preprint for the title, abstract, and metadata. For a preprint that has been published in a journal, the journal's version may have richer full text elsewhere.",
|
|
20
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
21
|
+
input: z.object({
|
|
22
|
+
doi: z
|
|
23
|
+
.string()
|
|
24
|
+
.describe('Preprint DOI (e.g. 10.1101/2024.05.28.596311 or 10.64898/2026.05.07.723463). The latest version is resolved automatically.'),
|
|
25
|
+
server: z
|
|
26
|
+
.enum(['biorxiv', 'medrxiv'])
|
|
27
|
+
.default('biorxiv')
|
|
28
|
+
.describe('Server the preprint was posted on. Defaults to biorxiv.'),
|
|
29
|
+
offset: z
|
|
30
|
+
.number()
|
|
31
|
+
.int()
|
|
32
|
+
.min(0)
|
|
33
|
+
.default(0)
|
|
34
|
+
.describe('Character offset into the full extracted text at which to start reading. 0 returns the beginning. To read the next chunk, use offset = prior_offset + prior_length (the length field from the previous response).'),
|
|
35
|
+
limit: z
|
|
36
|
+
.number()
|
|
37
|
+
.int()
|
|
38
|
+
.min(1)
|
|
39
|
+
.max(50000)
|
|
40
|
+
.default(20000)
|
|
41
|
+
.describe('Maximum number of characters to return in this chunk. Default 20,000; increase toward 50,000 for large context windows. Check the length field for the actual count returned.'),
|
|
42
|
+
}),
|
|
43
|
+
output: z.object({
|
|
44
|
+
doi: z.string().describe('The resolved preprint DOI.'),
|
|
45
|
+
server: z.enum(['biorxiv', 'medrxiv']).describe('Server the preprint was resolved on.'),
|
|
46
|
+
version: z
|
|
47
|
+
.string()
|
|
48
|
+
.describe('Preprint version whose full text was retrieved (the latest revision).'),
|
|
49
|
+
title: z
|
|
50
|
+
.string()
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Article title detected during extraction. Absent when the page exposed none.'),
|
|
53
|
+
content: z
|
|
54
|
+
.string()
|
|
55
|
+
.describe('The requested chunk of full text as best-effort Markdown extracted from the rendered HTML page. Section structure is approximate — this is not JATS.'),
|
|
56
|
+
contentFormat: z
|
|
57
|
+
.literal('html-markdown')
|
|
58
|
+
.describe('How content was produced: Markdown extracted from the rendered HTML article page (constant).'),
|
|
59
|
+
wordCount: z
|
|
60
|
+
.number()
|
|
61
|
+
.optional()
|
|
62
|
+
.describe('Approximate word count of the FULL extracted article as reported by the extractor (not just the returned chunk). Absent when the extractor reported none.'),
|
|
63
|
+
sourceUrl: z.string().describe('The full-text HTML page the content was extracted from.'),
|
|
64
|
+
offset: z
|
|
65
|
+
.number()
|
|
66
|
+
.describe('Character offset into the full extracted text where this chunk begins.'),
|
|
67
|
+
length: z.number().describe('Number of characters returned in this chunk.'),
|
|
68
|
+
totalChars: z
|
|
69
|
+
.number()
|
|
70
|
+
.describe('Total characters in the full extracted text. Use with offset and length to page through long articles.'),
|
|
71
|
+
remainingChars: z
|
|
72
|
+
.number()
|
|
73
|
+
.describe('Characters remaining after this chunk (totalChars - offset - length). 0 means this chunk reaches the end.'),
|
|
74
|
+
hasMore: z
|
|
75
|
+
.boolean()
|
|
76
|
+
.describe('True when more text follows this chunk. When true, call again with offset = offset + length.'),
|
|
77
|
+
}),
|
|
78
|
+
// Truncation disclosure on the enrichment channel (the framework capped-list
|
|
79
|
+
// convention) alongside the gutenberg-style paging fields in output. Populated
|
|
80
|
+
// via ctx.enrich.truncated only when the chunk was capped — optional so the
|
|
81
|
+
// final-chunk path leaves them absent.
|
|
82
|
+
enrichment: {
|
|
83
|
+
truncated: z
|
|
84
|
+
.boolean()
|
|
85
|
+
.optional()
|
|
86
|
+
.describe('True when this chunk was capped by limit and more text remains.'),
|
|
87
|
+
shown: z.number().optional().describe('Characters returned in this chunk.'),
|
|
88
|
+
cap: z.number().optional().describe('The limit (max characters) applied to this chunk.'),
|
|
89
|
+
notice: z
|
|
90
|
+
.string()
|
|
91
|
+
.optional()
|
|
92
|
+
.describe('Paging guidance when the content was truncated — how to fetch the next chunk.'),
|
|
93
|
+
},
|
|
94
|
+
errors: [
|
|
95
|
+
{
|
|
96
|
+
reason: 'invalid_doi_format',
|
|
97
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
98
|
+
when: 'The input DOI does not match the 10.NNNN/ pattern.',
|
|
99
|
+
recovery: 'Correct the DOI format — bioRxiv/medRxiv DOIs start with 10.1101/ or 10.64898/ followed by the manuscript ID.',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
reason: 'doi_not_found',
|
|
103
|
+
code: JsonRpcErrorCode.NotFound,
|
|
104
|
+
when: 'The DOI resolves to no preprint on the requested server.',
|
|
105
|
+
recovery: 'Find the correct DOI and server with biorxiv_search_preprints, or retry with the other server value.',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
reason: 'fulltext_unavailable',
|
|
109
|
+
code: JsonRpcErrorCode.NotFound,
|
|
110
|
+
when: 'The preprint exists but its full-text HTML page is blocked, missing, or yields no extractable text (PDF-only).',
|
|
111
|
+
recovery: 'Use biorxiv_get_preprint for the title, abstract, and metadata — a readable full-text page is not available for this preprint.',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
reason: 'offset_out_of_range',
|
|
115
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
116
|
+
when: 'offset is greater than or equal to the total character length of the extracted text.',
|
|
117
|
+
recovery: "Use an offset below totalChars — a prior response's remainingChars shows how much text is left.",
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
async handler(input, ctx) {
|
|
121
|
+
ctx.log.info('Executing biorxiv_get_fulltext', {
|
|
122
|
+
doi: input.doi,
|
|
123
|
+
server: input.server,
|
|
124
|
+
offset: input.offset,
|
|
125
|
+
limit: input.limit,
|
|
126
|
+
});
|
|
127
|
+
if (!DOI_REGEX.test(input.doi)) {
|
|
128
|
+
throw ctx.fail('invalid_doi_format', `Invalid DOI format: ${input.doi}`, {
|
|
129
|
+
...ctx.recoveryFor('invalid_doi_format'),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
// Resolve the preprint and its latest version via the JSON details API — this
|
|
133
|
+
// provides the version for the full-text URL and clean not-found handling.
|
|
134
|
+
// Transient failures here bubble as ServiceUnavailable.
|
|
135
|
+
const revisions = await getBiorxivApiService().getDetails(input.doi, input.server, ctx);
|
|
136
|
+
const latest = revisions.at(-1);
|
|
137
|
+
if (!latest) {
|
|
138
|
+
throw ctx.fail('doi_not_found', `No preprint found for ${input.doi} on ${input.server}.`, {
|
|
139
|
+
doi: input.doi,
|
|
140
|
+
server: input.server,
|
|
141
|
+
...ctx.recoveryFor('doi_not_found'),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
const version = latest.version ?? '1';
|
|
145
|
+
const result = await getBiorxivFullTextService().fetchFullText(input.server, input.doi, version, ctx);
|
|
146
|
+
if (result.kind === 'unavailable') {
|
|
147
|
+
throw ctx.fail('fulltext_unavailable', result.detail, {
|
|
148
|
+
doi: input.doi,
|
|
149
|
+
server: input.server,
|
|
150
|
+
version,
|
|
151
|
+
sourceUrl: result.sourceUrl,
|
|
152
|
+
...ctx.recoveryFor('fulltext_unavailable'),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
const totalChars = result.markdown.length;
|
|
156
|
+
if (input.offset >= totalChars) {
|
|
157
|
+
throw ctx.fail('offset_out_of_range', `Offset ${input.offset} is past the end of the text (totalChars: ${totalChars}).`, { offset: input.offset, totalChars, ...ctx.recoveryFor('offset_out_of_range') });
|
|
158
|
+
}
|
|
159
|
+
const end = Math.min(input.offset + input.limit, totalChars);
|
|
160
|
+
const content = result.markdown.slice(input.offset, end);
|
|
161
|
+
const length = content.length;
|
|
162
|
+
const remainingChars = totalChars - end;
|
|
163
|
+
const hasMore = remainingChars > 0;
|
|
164
|
+
if (hasMore) {
|
|
165
|
+
ctx.enrich.truncated({
|
|
166
|
+
shown: length,
|
|
167
|
+
cap: input.limit,
|
|
168
|
+
guidance: `Full text truncated at the ${input.limit}-character limit. Call biorxiv_get_fulltext again with offset=${end} to read the next chunk.`,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
doi: input.doi,
|
|
173
|
+
server: input.server,
|
|
174
|
+
version,
|
|
175
|
+
...(result.title && { title: result.title }),
|
|
176
|
+
content,
|
|
177
|
+
contentFormat: 'html-markdown',
|
|
178
|
+
...(result.wordCount !== undefined && { wordCount: result.wordCount }),
|
|
179
|
+
sourceUrl: result.sourceUrl,
|
|
180
|
+
offset: input.offset,
|
|
181
|
+
length,
|
|
182
|
+
totalChars,
|
|
183
|
+
remainingChars,
|
|
184
|
+
hasMore,
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
format: (result) => {
|
|
188
|
+
const lines = [];
|
|
189
|
+
lines.push(`## ${result.title ?? result.doi}`);
|
|
190
|
+
lines.push(`**DOI:** ${result.doi} | **Server:** ${result.server} | **Version:** v${result.version}`);
|
|
191
|
+
const end = result.offset + result.length;
|
|
192
|
+
lines.push(`**Characters ${result.offset.toLocaleString()}–${(end - 1).toLocaleString()} of ${result.totalChars.toLocaleString()}** | Length: ${result.length.toLocaleString()} | Remaining: ${result.remainingChars.toLocaleString()} | hasMore: ${result.hasMore}`);
|
|
193
|
+
if (result.wordCount !== undefined)
|
|
194
|
+
lines.push(`**Full-article word count:** ${result.wordCount}`);
|
|
195
|
+
lines.push(`**Source:** ${result.sourceUrl}`);
|
|
196
|
+
lines.push(`**Format:** ${result.contentFormat}`);
|
|
197
|
+
lines.push('\n> Extracted from the rendered HTML page — section structure is best-effort and not guaranteed (this is not JATS). Treat headings and reference formatting as approximate.');
|
|
198
|
+
lines.push('\n---\n');
|
|
199
|
+
lines.push(result.content);
|
|
200
|
+
if (result.hasMore) {
|
|
201
|
+
lines.push(`\n---\n_Call biorxiv_get_fulltext again with doi=${result.doi}, offset=${end} to read the next chunk._`);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
lines.push('\n---\n_End of extracted text._');
|
|
205
|
+
}
|
|
206
|
+
return [{ type: 'text', text: lines.join('\n') }];
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
//# sourceMappingURL=biorxiv-get-fulltext.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biorxiv-get-fulltext.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,MAAM,SAAS,GAAG,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACjE,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,6zBAA6zB;IAC/zB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAExD,KAAK,EAAE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