@cyanheads/biorxiv-mcp-server 0.1.5

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 (63) hide show
  1. package/AGENTS.md +309 -0
  2. package/CLAUDE.md +309 -0
  3. package/Dockerfile +99 -0
  4. package/LICENSE +195 -0
  5. package/README.md +279 -0
  6. package/changelog/0.1.x/0.1.0.md +18 -0
  7. package/changelog/0.1.x/0.1.1.md +32 -0
  8. package/changelog/0.1.x/0.1.2.md +23 -0
  9. package/changelog/0.1.x/0.1.3.md +23 -0
  10. package/changelog/0.1.x/0.1.4.md +19 -0
  11. package/changelog/0.1.x/0.1.5.md +18 -0
  12. package/changelog/template.md +93 -0
  13. package/dist/biorxiv-mcp-server.mcpb +0 -0
  14. package/dist/config/server-config.d.ts +17 -0
  15. package/dist/config/server-config.d.ts.map +1 -0
  16. package/dist/config/server-config.js +34 -0
  17. package/dist/config/server-config.js.map +1 -0
  18. package/dist/index.d.ts +9 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +25 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +54 -0
  23. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts.map +1 -0
  24. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js +208 -0
  25. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js.map +1 -0
  26. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts +39 -0
  27. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts.map +1 -0
  28. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js +99 -0
  29. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -0
  30. package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.d.ts +13 -0
  31. package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.d.ts.map +1 -0
  32. package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.js +40 -0
  33. package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.js.map +1 -0
  34. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts +65 -0
  35. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts.map +1 -0
  36. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js +269 -0
  37. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js.map +1 -0
  38. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts +46 -0
  39. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts.map +1 -0
  40. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js +279 -0
  41. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -0
  42. package/dist/mcp-server/tools/definitions/index.d.ts +171 -0
  43. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
  44. package/dist/mcp-server/tools/definitions/index.js +23 -0
  45. package/dist/mcp-server/tools/definitions/index.js.map +1 -0
  46. package/dist/services/biorxiv/biorxiv-service.d.ts +39 -0
  47. package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -0
  48. package/dist/services/biorxiv/biorxiv-service.js +307 -0
  49. package/dist/services/biorxiv/biorxiv-service.js.map +1 -0
  50. package/dist/services/biorxiv/types.d.ts +127 -0
  51. package/dist/services/biorxiv/types.d.ts.map +1 -0
  52. package/dist/services/biorxiv/types.js +9 -0
  53. package/dist/services/biorxiv/types.js.map +1 -0
  54. package/dist/services/europe-pmc/europe-pmc-service.d.ts +36 -0
  55. package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -0
  56. package/dist/services/europe-pmc/europe-pmc-service.js +100 -0
  57. package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -0
  58. package/dist/services/europe-pmc/types.d.ts +33 -0
  59. package/dist/services/europe-pmc/types.d.ts.map +1 -0
  60. package/dist/services/europe-pmc/types.js +8 -0
  61. package/dist/services/europe-pmc/types.js.map +1 -0
  62. package/package.json +102 -0
  63. package/server.json +111 -0
@@ -0,0 +1,279 @@
1
+ /**
2
+ * @fileoverview biorxiv_search_preprints tool — keyword search for preprints
3
+ * using EuropePMC for relevance ranking, then enriching matching DOIs with
4
+ * full bioRxiv/medRxiv metadata from the details endpoint. The 10.1101/ prefix
5
+ * identifies bioRxiv DOIs; DOIs without that prefix may be medRxiv or other
6
+ * preprint sources and are enriched via both servers when server="both".
7
+ * @module mcp-server/tools/definitions/biorxiv-search-preprints.tool
8
+ */
9
+ import { tool, z } from '@cyanheads/mcp-ts-core';
10
+ import { JsonRpcErrorCode, serviceUnavailable, validationError, } from '@cyanheads/mcp-ts-core/errors';
11
+ import { getBiorxivApiService } from '../../../services/biorxiv/biorxiv-service.js';
12
+ import { getEuropePmcService } from '../../../services/europe-pmc/europe-pmc-service.js';
13
+ const BIORXIV_DOI_PREFIXES = ['10.1101/', '10.64898/'];
14
+ const DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
15
+ function formatResult(doi, revisions, epmc) {
16
+ const latest = revisions[revisions.length - 1];
17
+ const lines = [];
18
+ // Use bioRxiv metadata when available; fall back to EuropePMC
19
+ const title = latest?.title ?? epmc?.title ?? doi;
20
+ lines.push(`### ${title}`);
21
+ lines.push(`**DOI:** ${doi}`);
22
+ if (latest) {
23
+ if (latest.server)
24
+ lines.push(`**Server:** ${latest.server}`);
25
+ if (latest.category)
26
+ lines.push(`**Category:** ${latest.category}`);
27
+ if (latest.date)
28
+ lines.push(`**Date:** ${latest.date}`);
29
+ if (latest.version)
30
+ lines.push(`**Version:** ${latest.version}`);
31
+ if (latest.authors)
32
+ lines.push(`**Authors:** ${latest.authors}`);
33
+ if (latest.authorCorresponding)
34
+ lines.push(`**Corresponding:** ${latest.authorCorresponding}`);
35
+ if (latest.publishedJournalDoi)
36
+ lines.push(`**Published DOI:** ${latest.publishedJournalDoi}`);
37
+ if (latest.jatsxmlUrl)
38
+ lines.push(`**JATS XML:** ${latest.jatsxmlUrl}`);
39
+ if (latest.abstract)
40
+ lines.push(`\n**Abstract:** ${latest.abstract}`);
41
+ if (revisions.length > 1)
42
+ lines.push(`\n*${revisions.length} revisions — latest shown.*`);
43
+ }
44
+ else if (epmc) {
45
+ // EuropePMC-only fallback when bioRxiv enrichment failed
46
+ if (epmc.authors)
47
+ lines.push(`**Authors:** ${epmc.authors}`);
48
+ if (epmc.publishedDate)
49
+ lines.push(`**Date:** ${epmc.publishedDate}`);
50
+ if (epmc.abstract)
51
+ lines.push(`\n**Abstract:** ${epmc.abstract}`);
52
+ lines.push(`\n*Metadata from EuropePMC only — bioRxiv enrichment unavailable.*`);
53
+ }
54
+ return lines.join('\n');
55
+ }
56
+ export const biorxivSearchPreprintsTool = tool('biorxiv_search_preprints', {
57
+ title: 'Search Preprints by Keyword',
58
+ description: "Search preprints by keyword using EuropePMC for relevance ranking, then enrich matching DOIs with full bioRxiv/medRxiv metadata. Covers both servers by default. EuropePMC indexes new preprints within 1–2 days of posting; for preprints posted within the last day, prefer biorxiv_list_recent. The search backend is EuropePMC — bioRxiv's native search endpoint is not used.",
59
+ annotations: { readOnlyHint: true, openWorldHint: true },
60
+ input: z.object({
61
+ query: z.string().min(1).describe('Keyword search query.'),
62
+ server: z
63
+ .enum(['biorxiv', 'medrxiv', 'both'])
64
+ .default('both')
65
+ .describe('Server scope for enrichment. "both" checks all matching DOIs on both servers.'),
66
+ date_from: z
67
+ .string()
68
+ .optional()
69
+ .describe('Earliest first-publication date filter (YYYY-MM-DD).'),
70
+ date_to: z.string().optional().describe('Latest first-publication date filter (YYYY-MM-DD).'),
71
+ limit: z
72
+ .number()
73
+ .int()
74
+ .min(1)
75
+ .max(100)
76
+ .default(25)
77
+ .describe('Maximum results to return (1–100). Defaults to 25.'),
78
+ }),
79
+ output: z.object({
80
+ preprints: z
81
+ .array(z
82
+ .object({
83
+ doi: z.string().describe('Preprint DOI.'),
84
+ title: z.string().optional().describe('Preprint title.'),
85
+ authors: z.string().optional().describe('Author list.'),
86
+ authorCorresponding: z.string().optional().describe('Corresponding author.'),
87
+ date: z.string().optional().describe('Posting or revision date.'),
88
+ version: z.string().optional().describe('Latest revision version.'),
89
+ category: z.string().optional().describe('Subject category.'),
90
+ server: z.string().optional().describe('Source server (biorxiv or medrxiv).'),
91
+ jatsxmlUrl: z.string().optional().describe('URL to the JATS XML full-text.'),
92
+ publishedJournalDoi: z
93
+ .string()
94
+ .optional()
95
+ .describe('Published journal DOI when accepted.'),
96
+ abstract: z.string().optional().describe('Abstract text.'),
97
+ enriched: z
98
+ .boolean()
99
+ .describe('True when full bioRxiv metadata was available; false for EuropePMC-only fallback.'),
100
+ revisionCount: z
101
+ .number()
102
+ .optional()
103
+ .describe('Total revision count when enriched from bioRxiv.'),
104
+ })
105
+ .describe('A single search result.'))
106
+ .describe('Search results, ranked by EuropePMC relevance.'),
107
+ total_from_search: z
108
+ .number()
109
+ .describe('Number of DOIs returned by EuropePMC before enrichment filtering.'),
110
+ partial_results: z
111
+ .boolean()
112
+ .describe('True when one or more DOIs failed bioRxiv enrichment and fell back to EuropePMC metadata.'),
113
+ message: z.string().optional().describe('Recovery hint when zero results are returned.'),
114
+ }),
115
+ errors: [
116
+ {
117
+ reason: 'search_unavailable',
118
+ code: JsonRpcErrorCode.ServiceUnavailable,
119
+ when: 'EuropePMC search endpoint is unreachable or returns a server error.',
120
+ recovery: 'EuropePMC may be temporarily unavailable. Retry after a short delay or use biorxiv_list_recent with a date range instead.',
121
+ },
122
+ ],
123
+ async handler(input, ctx) {
124
+ ctx.log.info('Executing biorxiv_search_preprints', {
125
+ query: input.query,
126
+ server: input.server,
127
+ limit: input.limit,
128
+ });
129
+ // Validate date inputs before calling EuropePMC
130
+ if (input.date_from && !DATE_REGEX.test(input.date_from)) {
131
+ throw validationError('date_from must be in YYYY-MM-DD format.', {
132
+ date_from: input.date_from,
133
+ });
134
+ }
135
+ if (input.date_to && !DATE_REGEX.test(input.date_to)) {
136
+ throw validationError('date_to must be in YYYY-MM-DD format.', { date_to: input.date_to });
137
+ }
138
+ if (input.date_from && input.date_to && input.date_from > input.date_to) {
139
+ throw validationError(`date_from (${input.date_from}) must be on or before date_to (${input.date_to}).`, { date_from: input.date_from, date_to: input.date_to });
140
+ }
141
+ const epmc = getEuropePmcService();
142
+ const biorxiv = getBiorxivApiService();
143
+ // Step 1: EuropePMC relevance search
144
+ let epmcResults;
145
+ try {
146
+ epmcResults = await epmc.search({
147
+ query: input.query,
148
+ dateFrom: input.date_from,
149
+ dateTo: input.date_to,
150
+ limit: input.limit,
151
+ server: input.server,
152
+ }, ctx);
153
+ }
154
+ catch (err) {
155
+ throw serviceUnavailable(`EuropePMC search failed: ${err instanceof Error ? err.message : String(err)}`, { reason: 'search_unavailable', ...ctx.recoveryFor('search_unavailable') }, { cause: err });
156
+ }
157
+ if (epmcResults.length === 0) {
158
+ return {
159
+ preprints: [],
160
+ total_from_search: 0,
161
+ partial_results: false,
162
+ message: `No preprints matched "${input.query}"${input.date_from || input.date_to ? ` in the specified date range` : ''}. Try broader search terms or a wider date range.`,
163
+ };
164
+ }
165
+ const totalFromSearch = epmcResults.length;
166
+ let hasPartial = false;
167
+ const enriched = await Promise.all(epmcResults.map(async (epResult) => {
168
+ const doi = epResult.doi;
169
+ const isBiorxivDoi = BIORXIV_DOI_PREFIXES.some((p) => doi.startsWith(p));
170
+ // Determine which server(s) to enrich against
171
+ let revisions = [];
172
+ let enrichmentFailed = false;
173
+ try {
174
+ if (input.server === 'biorxiv' || isBiorxivDoi) {
175
+ revisions = await biorxiv.getDetails(doi, 'biorxiv', ctx);
176
+ }
177
+ else if (input.server === 'medrxiv') {
178
+ revisions = await biorxiv.getDetails(doi, 'medrxiv', ctx);
179
+ }
180
+ else {
181
+ // both: try biorxiv first (identified by prefix), then medrxiv
182
+ if (isBiorxivDoi) {
183
+ revisions = await biorxiv.getDetails(doi, 'biorxiv', ctx);
184
+ }
185
+ else {
186
+ const [bxR, mxR] = await Promise.allSettled([
187
+ biorxiv.getDetails(doi, 'biorxiv', ctx),
188
+ biorxiv.getDetails(doi, 'medrxiv', ctx),
189
+ ]);
190
+ if (bxR.status === 'fulfilled')
191
+ revisions.push(...bxR.value);
192
+ if (mxR.status === 'fulfilled')
193
+ revisions.push(...mxR.value);
194
+ }
195
+ }
196
+ }
197
+ catch {
198
+ enrichmentFailed = true;
199
+ }
200
+ if (enrichmentFailed || revisions.length === 0) {
201
+ hasPartial = true;
202
+ return {
203
+ doi,
204
+ ...(epResult.title && { title: epResult.title }),
205
+ ...(epResult.authors && { authors: epResult.authors }),
206
+ ...(epResult.publishedDate && { date: epResult.publishedDate }),
207
+ ...(epResult.abstract && { abstract: epResult.abstract }),
208
+ enriched: false,
209
+ };
210
+ }
211
+ const latest = revisions[revisions.length - 1];
212
+ return {
213
+ doi,
214
+ ...(latest.title && { title: latest.title }),
215
+ ...(latest.authors && { authors: latest.authors }),
216
+ ...(latest.authorCorresponding && { authorCorresponding: latest.authorCorresponding }),
217
+ ...(latest.date && { date: latest.date }),
218
+ ...(latest.version && { version: latest.version }),
219
+ ...(latest.category && { category: latest.category }),
220
+ ...(latest.server && { server: latest.server }),
221
+ ...(latest.jatsxmlUrl && { jatsxmlUrl: latest.jatsxmlUrl }),
222
+ ...(latest.publishedJournalDoi && { publishedJournalDoi: latest.publishedJournalDoi }),
223
+ ...(latest.abstract && { abstract: latest.abstract }),
224
+ enriched: true,
225
+ revisionCount: revisions.length,
226
+ };
227
+ }));
228
+ return {
229
+ preprints: enriched,
230
+ total_from_search: totalFromSearch,
231
+ partial_results: hasPartial,
232
+ };
233
+ },
234
+ format: (result) => {
235
+ const lines = [];
236
+ lines.push(`**${result.preprints.length} results** (from ${result.total_from_search} EuropePMC matches)`);
237
+ if (result.partial_results) {
238
+ lines.push('> Some results show EuropePMC metadata only — bioRxiv enrichment was unavailable.');
239
+ }
240
+ if (result.message) {
241
+ lines.push(`\n> ${result.message}`);
242
+ }
243
+ for (const p of result.preprints) {
244
+ lines.push('');
245
+ const revisions = p.enriched
246
+ ? [
247
+ {
248
+ doi: p.doi,
249
+ ...(p.title && { title: p.title }),
250
+ ...(p.authors && { authors: p.authors }),
251
+ ...(p.authorCorresponding && { authorCorresponding: p.authorCorresponding }),
252
+ ...(p.date && { date: p.date }),
253
+ ...(p.version && { version: p.version }),
254
+ ...(p.category && { category: p.category }),
255
+ ...(p.server && { server: p.server }),
256
+ ...(p.jatsxmlUrl && { jatsxmlUrl: p.jatsxmlUrl }),
257
+ ...(p.publishedJournalDoi && { publishedJournalDoi: p.publishedJournalDoi }),
258
+ ...(p.abstract && { abstract: p.abstract }),
259
+ },
260
+ ]
261
+ : [];
262
+ const epmc = !p.enriched
263
+ ? {
264
+ ...(p.title && { title: p.title }),
265
+ ...(p.authors && { authors: p.authors }),
266
+ ...(p.date && { publishedDate: p.date }),
267
+ ...(p.abstract && { abstract: p.abstract }),
268
+ }
269
+ : undefined;
270
+ lines.push(formatResult(p.doi, revisions, epmc));
271
+ lines.push(`*Enriched: ${p.enriched ? 'yes' : 'no (EuropePMC fallback)'}*`);
272
+ if (p.enriched && p.revisionCount !== undefined) {
273
+ lines.push(`*Revisions: ${p.revisionCount}*`);
274
+ }
275
+ }
276
+ return [{ type: 'text', text: lines.join('\n') || 'No results.' }];
277
+ },
278
+ });
279
+ //# sourceMappingURL=biorxiv-search-preprints.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biorxiv-search-preprints.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-search-preprints.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7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AK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;YAEjD,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,GAAG,CAAC,CAAC;YAC5E,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;gBAChD,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;IACrE,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,171 @@
1
+ /**
2
+ * @fileoverview Barrel export for all tool definitions in this server.
3
+ * Import allToolDefinitions into createApp() in src/index.ts.
4
+ * @module mcp-server/tools/definitions/index
5
+ */
6
+ export { biorxivGetPreprintTool } from './biorxiv-get-preprint.tool.js';
7
+ export { biorxivGetPublishedVersionTool } from './biorxiv-get-published-version.tool.js';
8
+ export { biorxivListCategoriesTool } from './biorxiv-list-categories.tool.js';
9
+ export { biorxivListRecentTool } from './biorxiv-list-recent.tool.js';
10
+ export { biorxivSearchPreprintsTool } from './biorxiv-search-preprints.tool.js';
11
+ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
12
+ biorxiv: import("zod").ZodArray<import("zod").ZodString>;
13
+ medrxiv: import("zod").ZodArray<import("zod").ZodString>;
14
+ }, import("zod/v4/core").$strip>, undefined>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
15
+ start_date: import("zod").ZodString;
16
+ end_date: import("zod").ZodString;
17
+ server: import("zod").ZodDefault<import("zod").ZodEnum<{
18
+ biorxiv: "biorxiv";
19
+ medrxiv: "medrxiv";
20
+ both: "both";
21
+ }>>;
22
+ category: import("zod").ZodOptional<import("zod").ZodString>;
23
+ cursor: import("zod").ZodDefault<import("zod").ZodNumber>;
24
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
25
+ preprints: import("zod").ZodArray<import("zod").ZodObject<{
26
+ doi: import("zod").ZodString;
27
+ title: import("zod").ZodOptional<import("zod").ZodString>;
28
+ authors: import("zod").ZodOptional<import("zod").ZodString>;
29
+ authorCorresponding: import("zod").ZodOptional<import("zod").ZodString>;
30
+ authorCorrespondingInstitution: import("zod").ZodOptional<import("zod").ZodString>;
31
+ date: import("zod").ZodOptional<import("zod").ZodString>;
32
+ version: import("zod").ZodOptional<import("zod").ZodString>;
33
+ type: import("zod").ZodOptional<import("zod").ZodString>;
34
+ license: import("zod").ZodOptional<import("zod").ZodString>;
35
+ category: import("zod").ZodOptional<import("zod").ZodString>;
36
+ jatsxmlUrl: import("zod").ZodOptional<import("zod").ZodString>;
37
+ abstract: import("zod").ZodOptional<import("zod").ZodString>;
38
+ funder: import("zod").ZodOptional<import("zod").ZodString>;
39
+ publishedJournalDoi: import("zod").ZodOptional<import("zod").ZodString>;
40
+ server: import("zod").ZodOptional<import("zod").ZodString>;
41
+ }, import("zod/v4/core").$strip>>;
42
+ pagination: import("zod").ZodObject<{
43
+ biorxiv: import("zod").ZodOptional<import("zod").ZodObject<{
44
+ cursor: import("zod").ZodNumber;
45
+ total: import("zod").ZodNumber;
46
+ nextCursor: import("zod").ZodOptional<import("zod").ZodNumber>;
47
+ }, import("zod/v4/core").$strip>>;
48
+ medrxiv: import("zod").ZodOptional<import("zod").ZodObject<{
49
+ cursor: import("zod").ZodNumber;
50
+ total: import("zod").ZodNumber;
51
+ nextCursor: import("zod").ZodOptional<import("zod").ZodNumber>;
52
+ }, import("zod/v4/core").$strip>>;
53
+ }, import("zod/v4/core").$strip>;
54
+ canvas_id: import("zod").ZodOptional<import("zod").ZodString>;
55
+ message: import("zod").ZodOptional<import("zod").ZodString>;
56
+ }, import("zod/v4/core").$strip>, readonly [{
57
+ readonly reason: "invalid_date_range";
58
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
59
+ readonly when: "end_date is before start_date, or either date is malformed.";
60
+ readonly recovery: "Provide valid YYYY-MM-DD dates where start_date is on or before end_date.";
61
+ }, {
62
+ readonly reason: "invalid_category";
63
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
64
+ readonly when: "The supplied category string is not in the taxonomy.";
65
+ readonly recovery: "Call biorxiv_list_categories to get valid category strings and retry.";
66
+ }]>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
67
+ dois: import("zod").ZodArray<import("zod").ZodString>;
68
+ server: import("zod").ZodDefault<import("zod").ZodEnum<{
69
+ biorxiv: "biorxiv";
70
+ medrxiv: "medrxiv";
71
+ both: "both";
72
+ }>>;
73
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
74
+ preprints: import("zod").ZodArray<import("zod").ZodObject<{
75
+ doi: import("zod").ZodString;
76
+ revisions: import("zod").ZodArray<import("zod").ZodObject<{
77
+ doi: import("zod").ZodString;
78
+ title: import("zod").ZodOptional<import("zod").ZodString>;
79
+ authors: import("zod").ZodOptional<import("zod").ZodString>;
80
+ authorCorresponding: import("zod").ZodOptional<import("zod").ZodString>;
81
+ authorCorrespondingInstitution: import("zod").ZodOptional<import("zod").ZodString>;
82
+ date: import("zod").ZodOptional<import("zod").ZodString>;
83
+ version: import("zod").ZodOptional<import("zod").ZodString>;
84
+ type: import("zod").ZodOptional<import("zod").ZodString>;
85
+ license: import("zod").ZodOptional<import("zod").ZodString>;
86
+ category: import("zod").ZodOptional<import("zod").ZodString>;
87
+ jatsxmlUrl: import("zod").ZodOptional<import("zod").ZodString>;
88
+ abstract: import("zod").ZodOptional<import("zod").ZodString>;
89
+ funder: import("zod").ZodOptional<import("zod").ZodString>;
90
+ publishedJournalDoi: import("zod").ZodOptional<import("zod").ZodString>;
91
+ server: import("zod").ZodOptional<import("zod").ZodString>;
92
+ }, import("zod/v4/core").$strip>>;
93
+ }, import("zod/v4/core").$strip>>;
94
+ failed: import("zod").ZodArray<import("zod").ZodObject<{
95
+ doi: import("zod").ZodString;
96
+ error: import("zod").ZodString;
97
+ }, import("zod/v4/core").$strip>>;
98
+ }, import("zod/v4/core").$strip>, readonly [{
99
+ readonly reason: "doi_not_found";
100
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
101
+ readonly when: "ALL requested DOIs resolve to empty collections on all requested servers.";
102
+ readonly recovery: "Verify the DOI format (must start with 10.1101/) and check it exists on bioRxiv or medRxiv.";
103
+ }, {
104
+ readonly reason: "invalid_doi_format";
105
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
106
+ readonly when: "One or more input DOIs do not match the 10.NNNN/ pattern.";
107
+ readonly recovery: "Correct the DOI format — bioRxiv DOIs start with 10.1101/ followed by the manuscript ID.";
108
+ }]>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
109
+ doi: import("zod").ZodString;
110
+ server: import("zod").ZodDefault<import("zod").ZodEnum<{
111
+ biorxiv: "biorxiv";
112
+ medrxiv: "medrxiv";
113
+ }>>;
114
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
115
+ preprintDoi: import("zod").ZodString;
116
+ publishedDoi: import("zod").ZodOptional<import("zod").ZodString>;
117
+ publishedJournal: import("zod").ZodOptional<import("zod").ZodString>;
118
+ publishedDate: import("zod").ZodOptional<import("zod").ZodString>;
119
+ preprintTitle: import("zod").ZodOptional<import("zod").ZodString>;
120
+ preprintAuthors: import("zod").ZodOptional<import("zod").ZodString>;
121
+ preprintCategory: import("zod").ZodOptional<import("zod").ZodString>;
122
+ preprintDate: import("zod").ZodOptional<import("zod").ZodString>;
123
+ preprintAbstract: import("zod").ZodOptional<import("zod").ZodString>;
124
+ preprintAuthorCorresponding: import("zod").ZodOptional<import("zod").ZodString>;
125
+ preprintAuthorCorrespondingInstitution: import("zod").ZodOptional<import("zod").ZodString>;
126
+ }, import("zod/v4/core").$strip>, readonly [{
127
+ readonly reason: "doi_not_found";
128
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
129
+ readonly when: "Crosswalk endpoint returns empty collection — preprint may not be published yet.";
130
+ readonly recovery: "Use biorxiv_get_preprint to check the published field. If it shows NA, the preprint is not yet published.";
131
+ }, {
132
+ readonly reason: "invalid_doi_format";
133
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
134
+ readonly when: "The input DOI does not match the 10.NNNN/ pattern.";
135
+ readonly recovery: "Correct the DOI format — bioRxiv DOIs start with 10.1101/ followed by the manuscript ID.";
136
+ }]>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
137
+ query: import("zod").ZodString;
138
+ server: import("zod").ZodDefault<import("zod").ZodEnum<{
139
+ biorxiv: "biorxiv";
140
+ medrxiv: "medrxiv";
141
+ both: "both";
142
+ }>>;
143
+ date_from: import("zod").ZodOptional<import("zod").ZodString>;
144
+ date_to: import("zod").ZodOptional<import("zod").ZodString>;
145
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
146
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
147
+ preprints: import("zod").ZodArray<import("zod").ZodObject<{
148
+ doi: import("zod").ZodString;
149
+ title: import("zod").ZodOptional<import("zod").ZodString>;
150
+ authors: import("zod").ZodOptional<import("zod").ZodString>;
151
+ authorCorresponding: import("zod").ZodOptional<import("zod").ZodString>;
152
+ date: import("zod").ZodOptional<import("zod").ZodString>;
153
+ version: import("zod").ZodOptional<import("zod").ZodString>;
154
+ category: import("zod").ZodOptional<import("zod").ZodString>;
155
+ server: import("zod").ZodOptional<import("zod").ZodString>;
156
+ jatsxmlUrl: import("zod").ZodOptional<import("zod").ZodString>;
157
+ publishedJournalDoi: import("zod").ZodOptional<import("zod").ZodString>;
158
+ abstract: import("zod").ZodOptional<import("zod").ZodString>;
159
+ enriched: import("zod").ZodBoolean;
160
+ revisionCount: import("zod").ZodOptional<import("zod").ZodNumber>;
161
+ }, import("zod/v4/core").$strip>>;
162
+ total_from_search: import("zod").ZodNumber;
163
+ partial_results: import("zod").ZodBoolean;
164
+ message: import("zod").ZodOptional<import("zod").ZodString>;
165
+ }, import("zod/v4/core").$strip>, readonly [{
166
+ readonly reason: "search_unavailable";
167
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
168
+ readonly when: "EuropePMC search endpoint is unreachable or returns a server error.";
169
+ readonly recovery: "EuropePMC may be temporarily unavailable. Retry after a short delay or use biorxiv_list_recent with a date range instead.";
170
+ }]>];
171
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAQhF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMrB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @fileoverview Barrel export for all tool definitions in this server.
3
+ * Import allToolDefinitions into createApp() in src/index.ts.
4
+ * @module mcp-server/tools/definitions/index
5
+ */
6
+ export { biorxivGetPreprintTool } from './biorxiv-get-preprint.tool.js';
7
+ export { biorxivGetPublishedVersionTool } from './biorxiv-get-published-version.tool.js';
8
+ export { biorxivListCategoriesTool } from './biorxiv-list-categories.tool.js';
9
+ export { biorxivListRecentTool } from './biorxiv-list-recent.tool.js';
10
+ export { biorxivSearchPreprintsTool } from './biorxiv-search-preprints.tool.js';
11
+ import { biorxivGetPreprintTool } from './biorxiv-get-preprint.tool.js';
12
+ import { biorxivGetPublishedVersionTool } from './biorxiv-get-published-version.tool.js';
13
+ import { biorxivListCategoriesTool } from './biorxiv-list-categories.tool.js';
14
+ import { biorxivListRecentTool } from './biorxiv-list-recent.tool.js';
15
+ import { biorxivSearchPreprintsTool } from './biorxiv-search-preprints.tool.js';
16
+ export const allToolDefinitions = [
17
+ biorxivListCategoriesTool,
18
+ biorxivListRecentTool,
19
+ biorxivGetPreprintTool,
20
+ biorxivGetPublishedVersionTool,
21
+ biorxivSearchPreprintsTool,
22
+ ];
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,yBAAyB;IACzB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,0BAA0B;CAClB,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @fileoverview BiorxivApiService — wraps api.biorxiv.org endpoints for
3
+ * preprint details (/details), date-range listing (/details with date interval),
4
+ * and crosswalk (/pubs). All methods retry with exponential backoff. Parses
5
+ * and normalizes raw JSON into domain types. Detects HTML error pages.
6
+ * @module services/biorxiv/biorxiv-service
7
+ */
8
+ import type { Context } from '@cyanheads/mcp-ts-core';
9
+ import type { AppConfig } from '@cyanheads/mcp-ts-core/config';
10
+ import type { StorageService } from '@cyanheads/mcp-ts-core/storage';
11
+ import type { BiorxivServer, CategoryTaxonomy, ListingResult, PreprintRevision, PublishedVersion } from './types.js';
12
+ export declare class BiorxivApiService {
13
+ private readonly baseUrl;
14
+ private readonly userAgent;
15
+ constructor(_config: AppConfig, _storage: StorageService);
16
+ /** Returns the hardcoded subject category taxonomy. No API call. */
17
+ getCategories(): CategoryTaxonomy;
18
+ /** Returns true if the given category string is in the taxonomy. */
19
+ isValidCategory(category: string): boolean;
20
+ /**
21
+ * Fetch all revisions for a DOI from a single server.
22
+ * Returns an empty collection if the DOI is not found on this server.
23
+ */
24
+ getDetails(doi: string, server: BiorxivServer, ctx: Context): Promise<PreprintRevision[]>;
25
+ /**
26
+ * Fetch preprints posted or revised within a date interval from a single server.
27
+ * `cursor` is an integer offset (0, 30, 60, …). Page size is always 30.
28
+ * Returns listing result with pagination state.
29
+ */
30
+ getListing(server: BiorxivServer, startDate: string, endDate: string, cursor: number, category: string | undefined, ctx: Context): Promise<ListingResult>;
31
+ /**
32
+ * Resolve a preprint DOI to its published journal record via /pubs endpoint.
33
+ * Returns undefined when the preprint is not yet published.
34
+ */
35
+ getPublishedVersion(doi: string, server: BiorxivServer, ctx: Context): Promise<PublishedVersion | undefined>;
36
+ }
37
+ export declare function initBiorxivApiService(config: AppConfig, storage: StorageService): void;
38
+ export declare function getBiorxivApiService(): BiorxivApiService;
39
+ //# sourceMappingURL=biorxiv-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biorxiv-service.d.ts","sourceRoot":"","sources":["../../../src/services/biorxiv/biorxiv-service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAIjB,MAAM,YAAY,CAAC;AA4IpB,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc;IAQxD,oEAAoE;IACpE,aAAa,IAAI,gBAAgB;IAIjC,oEAAoE;IACpE,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI1C;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA4B/F;;;;OAIG;IACG,UAAU,CACd,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,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