@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.
- package/AGENTS.md +309 -0
- package/CLAUDE.md +309 -0
- package/Dockerfile +99 -0
- package/LICENSE +195 -0
- package/README.md +279 -0
- package/changelog/0.1.x/0.1.0.md +18 -0
- package/changelog/0.1.x/0.1.1.md +32 -0
- package/changelog/0.1.x/0.1.2.md +23 -0
- package/changelog/0.1.x/0.1.3.md +23 -0
- package/changelog/0.1.x/0.1.4.md +19 -0
- package/changelog/0.1.x/0.1.5.md +18 -0
- package/changelog/template.md +93 -0
- package/dist/biorxiv-mcp-server.mcpb +0 -0
- package/dist/config/server-config.d.ts +17 -0
- package/dist/config/server-config.d.ts.map +1 -0
- package/dist/config/server-config.js +34 -0
- package/dist/config/server-config.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +54 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js +208 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts +39 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js +99 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.d.ts +13 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.js +40 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts +65 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js +269 -0
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts +46 -0
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js +279 -0
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/index.d.ts +171 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/index.js +23 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -0
- package/dist/services/biorxiv/biorxiv-service.d.ts +39 -0
- package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -0
- package/dist/services/biorxiv/biorxiv-service.js +307 -0
- package/dist/services/biorxiv/biorxiv-service.js.map +1 -0
- package/dist/services/biorxiv/types.d.ts +127 -0
- package/dist/services/biorxiv/types.d.ts.map +1 -0
- package/dist/services/biorxiv/types.js +9 -0
- package/dist/services/biorxiv/types.js.map +1 -0
- package/dist/services/europe-pmc/europe-pmc-service.d.ts +36 -0
- package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -0
- package/dist/services/europe-pmc/europe-pmc-service.js +100 -0
- package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -0
- package/dist/services/europe-pmc/types.d.ts +33 -0
- package/dist/services/europe-pmc/types.d.ts.map +1 -0
- package/dist/services/europe-pmc/types.js +8 -0
- package/dist/services/europe-pmc/types.js.map +1 -0
- package/package.json +102 -0
- package/server.json +111 -0
package/Dockerfile
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Build Stage
|
|
3
|
+
#
|
|
4
|
+
# This stage installs all dependencies (including dev), builds the TypeScript
|
|
5
|
+
# source code into JavaScript, and prepares the production assets.
|
|
6
|
+
# ==============================================================================
|
|
7
|
+
FROM oven/bun:1.3 AS build
|
|
8
|
+
|
|
9
|
+
WORKDIR /usr/src/app
|
|
10
|
+
|
|
11
|
+
# Copy dependency manifests for optimized layer caching
|
|
12
|
+
COPY package.json bun.lock ./
|
|
13
|
+
|
|
14
|
+
# Install all dependencies (including dev dependencies for building)
|
|
15
|
+
RUN bun install --frozen-lockfile
|
|
16
|
+
|
|
17
|
+
# Copy the rest of the source code
|
|
18
|
+
COPY . .
|
|
19
|
+
|
|
20
|
+
# Build the application
|
|
21
|
+
RUN bun run build
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# ==============================================================================
|
|
25
|
+
# Production Stage
|
|
26
|
+
#
|
|
27
|
+
# This stage creates a minimal, optimized, and secure image for running the
|
|
28
|
+
# application. It uses a slim base image and only includes production
|
|
29
|
+
# dependencies and build artifacts.
|
|
30
|
+
# ==============================================================================
|
|
31
|
+
FROM oven/bun:1.3-slim AS production
|
|
32
|
+
|
|
33
|
+
WORKDIR /usr/src/app
|
|
34
|
+
|
|
35
|
+
# Set the environment to production for performance and to ensure only
|
|
36
|
+
# production dependencies are installed.
|
|
37
|
+
ENV NODE_ENV=production
|
|
38
|
+
|
|
39
|
+
# OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
|
|
40
|
+
LABEL org.opencontainers.image.title="@cyanheads/biorxiv-mcp-server"
|
|
41
|
+
LABEL org.opencontainers.image.description="Search and retrieve bioRxiv and medRxiv preprints — by DOI, date interval, or keyword — via MCP. STDIO or Streamable HTTP."
|
|
42
|
+
LABEL org.opencontainers.image.source="https://github.com/cyanheads/biorxiv-mcp-server"
|
|
43
|
+
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
44
|
+
|
|
45
|
+
# Copy dependency manifests
|
|
46
|
+
COPY package.json bun.lock ./
|
|
47
|
+
|
|
48
|
+
# Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
|
|
49
|
+
# that are not needed in the final production image.
|
|
50
|
+
RUN bun install --production --frozen-lockfile --ignore-scripts
|
|
51
|
+
|
|
52
|
+
# Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
|
|
53
|
+
# These are not bundled by default to keep the base image lean. Enable at build time
|
|
54
|
+
# with: docker build --build-arg OTEL_ENABLED=true
|
|
55
|
+
ARG OTEL_ENABLED=true
|
|
56
|
+
RUN if [ "$OTEL_ENABLED" = "true" ]; then \
|
|
57
|
+
bun add @hono/otel \
|
|
58
|
+
@opentelemetry/instrumentation-http \
|
|
59
|
+
@opentelemetry/exporter-metrics-otlp-http \
|
|
60
|
+
@opentelemetry/exporter-trace-otlp-http \
|
|
61
|
+
@opentelemetry/instrumentation-pino \
|
|
62
|
+
@opentelemetry/resources \
|
|
63
|
+
@opentelemetry/sdk-metrics \
|
|
64
|
+
@opentelemetry/sdk-node \
|
|
65
|
+
@opentelemetry/sdk-trace-node \
|
|
66
|
+
@opentelemetry/semantic-conventions; \
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
# Copy the compiled application code from the build stage
|
|
70
|
+
COPY --from=build /usr/src/app/dist ./dist
|
|
71
|
+
|
|
72
|
+
# The 'oven/bun' image already provides a non-root user named 'bun'.
|
|
73
|
+
# We will use this existing user for enhanced security.
|
|
74
|
+
|
|
75
|
+
# Create and set permissions for the log directory, assigning ownership to the 'bun' user.
|
|
76
|
+
RUN mkdir -p /var/log/biorxiv-mcp-server && chown -R bun:bun /var/log/biorxiv-mcp-server
|
|
77
|
+
|
|
78
|
+
# Switch to the non-root user
|
|
79
|
+
USER bun
|
|
80
|
+
|
|
81
|
+
# Define an argument for the port, allowing it to be overridden at build time.
|
|
82
|
+
# The `PORT` variable is often injected by cloud environments at runtime.
|
|
83
|
+
ARG PORT
|
|
84
|
+
|
|
85
|
+
# Set runtime environment variables
|
|
86
|
+
# Note: PORT is an automatic variable in many cloud environments (e.g., Cloud Run)
|
|
87
|
+
ENV MCP_HTTP_PORT=${PORT:-3010}
|
|
88
|
+
ENV MCP_HTTP_HOST="0.0.0.0"
|
|
89
|
+
ENV MCP_TRANSPORT_TYPE="http"
|
|
90
|
+
ENV MCP_SESSION_MODE="stateless"
|
|
91
|
+
ENV MCP_LOG_LEVEL="info"
|
|
92
|
+
ENV LOGS_DIR="/var/log/biorxiv-mcp-server"
|
|
93
|
+
ENV MCP_FORCE_CONSOLE_LOGGING="true"
|
|
94
|
+
|
|
95
|
+
# Expose the port the server listens on
|
|
96
|
+
EXPOSE ${MCP_HTTP_PORT}
|
|
97
|
+
|
|
98
|
+
# The command to start the server
|
|
99
|
+
CMD ["bun", "run", "dist/index.js"]
|
package/LICENSE
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
+
improving the Work, but excluding communication that is conspicuously
|
|
56
|
+
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
+
Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by the Licensor and incorporated
|
|
61
|
+
within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by the combination of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
+
institute patent litigation against any entity (including a cross-claim
|
|
80
|
+
or counterclaim in a lawsuit) alleging that the Work or any
|
|
81
|
+
Contribution embodied within the Work constitutes direct or contributory
|
|
82
|
+
patent infringement, then any patent licenses granted to You under
|
|
83
|
+
this License for that Work shall terminate as of the date such
|
|
84
|
+
litigation is filed.
|
|
85
|
+
|
|
86
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
+
modifications, and in Source or Object form, provided that You
|
|
89
|
+
meet the following conditions:
|
|
90
|
+
|
|
91
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
92
|
+
Works a copy of this License; and
|
|
93
|
+
|
|
94
|
+
(b) You must cause any modified files to carry prominent notices
|
|
95
|
+
stating that You changed the files; and
|
|
96
|
+
|
|
97
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
98
|
+
that You distribute, all copyright, patent, trademark, and
|
|
99
|
+
attribution notices from the Source form of the Work,
|
|
100
|
+
excluding those notices that do not pertain to any part of
|
|
101
|
+
the Derivative Works; and
|
|
102
|
+
|
|
103
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
+
distribution, You must include a readable copy of the
|
|
105
|
+
attribution notices contained within such NOTICE file, in
|
|
106
|
+
at least one of the following places: within a NOTICE text
|
|
107
|
+
file distributed as part of the Derivative Works; within
|
|
108
|
+
the Source form or documentation, if provided along with the
|
|
109
|
+
Derivative Works; or, within a display generated by the
|
|
110
|
+
Derivative Works, if and wherever such third-party notices
|
|
111
|
+
normally appear. The contents of the NOTICE file are for
|
|
112
|
+
informational purposes only and do not modify the License.
|
|
113
|
+
You may add Your own attribution notices within Derivative
|
|
114
|
+
Works that You distribute, alongside or as an addendum to
|
|
115
|
+
the NOTICE text from the Work, provided that such additional
|
|
116
|
+
attribution notices cannot be construed as modifying the
|
|
117
|
+
License.
|
|
118
|
+
|
|
119
|
+
You may add Your own license statement for Your modifications and
|
|
120
|
+
may provide additional grant of rights to use, copy, modify, merge,
|
|
121
|
+
publish, distribute, sublicense, and/or sell copies of Your
|
|
122
|
+
modifications, or for such Derivative Works as a whole, under
|
|
123
|
+
the terms and conditions of this License.
|
|
124
|
+
|
|
125
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
126
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
127
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
128
|
+
this License, without any additional terms or conditions.
|
|
129
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
130
|
+
the terms of any separate license agreement you may have executed
|
|
131
|
+
with Licensor regarding such Contributions.
|
|
132
|
+
|
|
133
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
134
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
135
|
+
except as required for reasonable and customary use in describing the
|
|
136
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
137
|
+
|
|
138
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
139
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
140
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
141
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
142
|
+
implied, including, without limitation, any warranties or conditions
|
|
143
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
144
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
145
|
+
appropriateness of using or reproducing the Work and assume any
|
|
146
|
+
risks associated with Your exercise of permissions under this License.
|
|
147
|
+
|
|
148
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
149
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
150
|
+
unless required by applicable law (such as deliberate and grossly
|
|
151
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
152
|
+
liable to You for damages, including any direct, indirect, special,
|
|
153
|
+
incidental, or exemplary damages of any character arising as a
|
|
154
|
+
result of this License or out of the use or inability to use the
|
|
155
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
156
|
+
work stoppage, computer failure or malfunction, or all other
|
|
157
|
+
commercial damages or losses), even if such Contributor has been
|
|
158
|
+
advised of the possibility of such damages.
|
|
159
|
+
|
|
160
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
161
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
162
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
163
|
+
or other liability obligations and/or rights consistent with this
|
|
164
|
+
License. However, in accepting such obligations, You may offer such
|
|
165
|
+
obligations only on Your own behalf and on Your sole responsibility,
|
|
166
|
+
not on behalf of any other Contributor, and only if You agree to
|
|
167
|
+
indemnify, defend, and hold each Contributor harmless for any
|
|
168
|
+
liability incurred by, or claims asserted against, such Contributor
|
|
169
|
+
by reason of your accepting any such warranty or additional liability.
|
|
170
|
+
|
|
171
|
+
END OF TERMS AND CONDITIONS
|
|
172
|
+
|
|
173
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
174
|
+
|
|
175
|
+
To apply the Apache License to your work, attach the following
|
|
176
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
177
|
+
replaced with your own identifying information. (Don't include
|
|
178
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
179
|
+
comment syntax for the comment format in use. We recommend that
|
|
180
|
+
you also include a "file or directory name and description of purpose"
|
|
181
|
+
on the same line as the copyright.
|
|
182
|
+
|
|
183
|
+
Copyright [yyyy] [name of copyright owner]
|
|
184
|
+
|
|
185
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
186
|
+
you may not use this file except in compliance with the License.
|
|
187
|
+
You may obtain a copy of the License at
|
|
188
|
+
|
|
189
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
190
|
+
|
|
191
|
+
Unless required by applicable law or agreed to in writing, software
|
|
192
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
193
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
194
|
+
See the License for the specific language governing permissions and
|
|
195
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>@cyanheads/biorxiv-mcp-server</h1>
|
|
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>5 Tools</div>
|
|
5
|
+
</p>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div align="center">
|
|
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
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div align="center">
|
|
15
|
+
|
|
16
|
+
[](https://github.com/cyanheads/biorxiv-mcp-server/releases/latest/download/biorxiv-mcp-server.mcpb) [](https://cursor.com/en/install-mcp?name=biorxiv-mcp-server&config=eyJjb21tYW5kIjoibnB4IC15IEBjeWFuaGVhZHMvYmlvcnhpdi1tY3Atc2VydmVyIn0=) [](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22biorxiv-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fbiorxiv-mcp-server%22%5D%7D)
|
|
17
|
+
|
|
18
|
+
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Tools
|
|
25
|
+
|
|
26
|
+
Five tools for working with bioRxiv and medRxiv preprint data:
|
|
27
|
+
|
|
28
|
+
| Tool | Description |
|
|
29
|
+
|:---|:---|
|
|
30
|
+
| `biorxiv_get_preprint` | Fetch full metadata, abstract, revision history, and journal crosswalk for one or more preprints by DOI |
|
|
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 |
|
|
33
|
+
| `biorxiv_get_published_version` | Resolve a preprint DOI to its journal publication record (journal DOI, name, published date) |
|
|
34
|
+
| `biorxiv_list_categories` | List valid subject category strings for bioRxiv and medRxiv |
|
|
35
|
+
|
|
36
|
+
### `biorxiv_get_preprint`
|
|
37
|
+
|
|
38
|
+
Fetch preprint metadata by DOI — all revisions in one call.
|
|
39
|
+
|
|
40
|
+
- Batch fetch up to 10 DOIs in a single request
|
|
41
|
+
- Each DOI returns the full revision history in `collection[]` — one API call per DOI, no enumeration loop
|
|
42
|
+
- Includes title, authors, abstract, category, license, PDF link (`jatsxml`), and published journal DOI when the preprint has been accepted
|
|
43
|
+
- Scope to `biorxiv`, `medrxiv`, or `both`; when `both`, each DOI fans out in parallel and partial failures report per-DOI in `failed[]`
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### `biorxiv_list_recent`
|
|
48
|
+
|
|
49
|
+
Page through preprints in a date interval.
|
|
50
|
+
|
|
51
|
+
- Server-side category filtering via `?category=…` — pass a value from `biorxiv_list_categories`
|
|
52
|
+
- Fixed page size of 30 (API constraint); advance with integer `cursor` (0, 30, 60, …)
|
|
53
|
+
- Response includes `total` count per server for calculating remaining pages
|
|
54
|
+
- When `server="both"`, each server paginates independently; response surfaces per-server pagination state (`{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### `biorxiv_search_preprints`
|
|
59
|
+
|
|
60
|
+
Keyword search with relevance ranking.
|
|
61
|
+
|
|
62
|
+
- EuropePMC powers relevance ranking (indexes new preprints within 1–2 days of posting); bioRxiv/medRxiv API provides canonical metadata enrichment
|
|
63
|
+
- Covers both servers by default; scope down with `server`
|
|
64
|
+
- Optional date range filters (`date_from`, `date_to`)
|
|
65
|
+
- Enrichment failures degrade gracefully to EuropePMC-only metadata, surfaced via `partial_results`
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### `biorxiv_get_published_version`
|
|
70
|
+
|
|
71
|
+
Resolve a preprint DOI to its journal publication crosswalk.
|
|
72
|
+
|
|
73
|
+
- Uses the `/pubs/{server}/{doi}` endpoint for richer metadata than the `published` field in `biorxiv_get_preprint`
|
|
74
|
+
- Returns journal DOI, journal name, published date, and corresponding author institution
|
|
75
|
+
- Use when the preprint's `published` field is non-null and you need the full crosswalk record
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### `biorxiv_list_categories`
|
|
80
|
+
|
|
81
|
+
Return the static subject category taxonomy for both servers.
|
|
82
|
+
|
|
83
|
+
- No API call — hardcoded static list (~30 bioRxiv + ~50 medRxiv categories)
|
|
84
|
+
- Use to validate category strings before passing to `biorxiv_list_recent`
|
|
85
|
+
|
|
86
|
+
## Features
|
|
87
|
+
|
|
88
|
+
Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):
|
|
89
|
+
|
|
90
|
+
- Declarative tool definitions — single file per tool, framework handles registration and validation
|
|
91
|
+
- Unified error handling across all tools
|
|
92
|
+
- Pluggable auth (`none`, `jwt`, `oauth`)
|
|
93
|
+
- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`
|
|
94
|
+
- Structured logging with optional OpenTelemetry tracing
|
|
95
|
+
- STDIO and Streamable HTTP transports
|
|
96
|
+
|
|
97
|
+
bioRxiv-specific:
|
|
98
|
+
|
|
99
|
+
- `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
|
|
101
|
+
- Two-server fan-out via `Promise.allSettled` — both `biorxiv` and `medrxiv` queried in parallel when `server="both"`, results merged and deduplicated by DOI
|
|
102
|
+
- Polite `User-Agent` header including a mailto address (`BIORXIV_MAILTO` env var) per Cold Spring Harbor Lab API guidelines
|
|
103
|
+
- Pairs with **pubmed-mcp-server** (post-publication), **openalex-mcp-server** (citation analytics), and **crossref-mcp-server** (DOI metadata)
|
|
104
|
+
|
|
105
|
+
## Getting started
|
|
106
|
+
|
|
107
|
+
Add the following to your MCP client configuration file.
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"mcpServers": {
|
|
112
|
+
"biorxiv": {
|
|
113
|
+
"type": "stdio",
|
|
114
|
+
"command": "bunx",
|
|
115
|
+
"args": ["@cyanheads/biorxiv-mcp-server@latest"],
|
|
116
|
+
"env": {
|
|
117
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
118
|
+
"MCP_LOG_LEVEL": "info",
|
|
119
|
+
"BIORXIV_MAILTO": "your@email.com"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Or with npx (no Bun required):
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"mcpServers": {
|
|
131
|
+
"biorxiv": {
|
|
132
|
+
"type": "stdio",
|
|
133
|
+
"command": "npx",
|
|
134
|
+
"args": ["-y", "@cyanheads/biorxiv-mcp-server@latest"],
|
|
135
|
+
"env": {
|
|
136
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
137
|
+
"MCP_LOG_LEVEL": "info",
|
|
138
|
+
"BIORXIV_MAILTO": "your@email.com"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Or with Docker:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"mcpServers": {
|
|
150
|
+
"biorxiv": {
|
|
151
|
+
"type": "stdio",
|
|
152
|
+
"command": "docker",
|
|
153
|
+
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "-e", "BIORXIV_MAILTO=your@email.com", "ghcr.io/cyanheads/biorxiv-mcp-server:latest"]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
For Streamable HTTP, set the transport and start the server:
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 BIORXIV_MAILTO=your@email.com bun run start:http
|
|
163
|
+
# Server listens at http://localhost:3010/mcp
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Prerequisites
|
|
167
|
+
|
|
168
|
+
- [Bun v1.3.2](https://bun.sh/) or higher (or Node.js v24+).
|
|
169
|
+
|
|
170
|
+
### Installation
|
|
171
|
+
|
|
172
|
+
1. **Clone the repository:**
|
|
173
|
+
|
|
174
|
+
```sh
|
|
175
|
+
git clone https://github.com/cyanheads/biorxiv-mcp-server.git
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
2. **Navigate into the directory:**
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
cd biorxiv-mcp-server
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
3. **Install dependencies:**
|
|
185
|
+
|
|
186
|
+
```sh
|
|
187
|
+
bun install
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
4. **Configure environment:**
|
|
191
|
+
|
|
192
|
+
```sh
|
|
193
|
+
cp .env.example .env
|
|
194
|
+
# optionally set BIORXIV_MAILTO for polite API access
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Configuration
|
|
198
|
+
|
|
199
|
+
All configuration is validated at startup via Zod schemas in `src/config/server-config.ts`.
|
|
200
|
+
|
|
201
|
+
| Variable | Description | Default |
|
|
202
|
+
|:---|:---|:---|
|
|
203
|
+
| `BIORXIV_MAILTO` | Email address included in the `User-Agent` header for polite API access per Cold Spring Harbor Lab guidelines. Optional, but recommended. | — |
|
|
204
|
+
| `BIORXIV_API_BASE_URL` | Override the bioRxiv API base URL. | `https://api.biorxiv.org` |
|
|
205
|
+
| `EUROPEPMC_API_BASE_URL` | Override the EuropePMC base URL. | `https://www.ebi.ac.uk/europepmc/webservices/rest` |
|
|
206
|
+
| `CANVAS_PROVIDER_TYPE` | Set to `duckdb` to enable DataCanvas spillover for large result sets (Node only). | — |
|
|
207
|
+
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
208
|
+
| `MCP_HTTP_PORT` | HTTP server port. | `3010` |
|
|
209
|
+
| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path. | `/mcp` |
|
|
210
|
+
| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |
|
|
211
|
+
| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.). | `info` |
|
|
212
|
+
| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |
|
|
213
|
+
| `OTEL_ENABLED` | Enable OpenTelemetry instrumentation. | `false` |
|
|
214
|
+
|
|
215
|
+
## Running the server
|
|
216
|
+
|
|
217
|
+
### Local development
|
|
218
|
+
|
|
219
|
+
- **Build and run:**
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
# One-time build
|
|
223
|
+
bun run rebuild
|
|
224
|
+
|
|
225
|
+
# Run the built server
|
|
226
|
+
bun run start:stdio
|
|
227
|
+
# or
|
|
228
|
+
bun run start:http
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
- **Run checks and tests:**
|
|
232
|
+
|
|
233
|
+
```sh
|
|
234
|
+
bun run devcheck # Lint, format, typecheck, security
|
|
235
|
+
bun run test # Vitest test suite
|
|
236
|
+
bun run lint:mcp # Validate MCP definitions against spec
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Docker
|
|
240
|
+
|
|
241
|
+
```sh
|
|
242
|
+
docker build -t biorxiv-mcp-server .
|
|
243
|
+
docker run --rm -e BIORXIV_MAILTO=your@email.com -p 3010:3010 biorxiv-mcp-server
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/biorxiv-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.
|
|
247
|
+
|
|
248
|
+
## Project structure
|
|
249
|
+
|
|
250
|
+
| Directory | Purpose |
|
|
251
|
+
|:---|:---|
|
|
252
|
+
| `src/index.ts` | `createApp()` entry point — registers tools and initializes services. |
|
|
253
|
+
| `src/config` | Server-specific environment variable parsing and validation with Zod. |
|
|
254
|
+
| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Five tools across bioRxiv and medRxiv. |
|
|
255
|
+
| `src/services/biorxiv` | `BiorxivApiService` — details, publications, and crosswalk endpoint wrappers with retry. |
|
|
256
|
+
| `src/services/europe-pmc` | `EuropePmcService` — preprint keyword search endpoint wrapper. |
|
|
257
|
+
| `tests/` | Unit and integration tests mirroring the `src/` structure. |
|
|
258
|
+
|
|
259
|
+
## Development guide
|
|
260
|
+
|
|
261
|
+
See [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:
|
|
262
|
+
|
|
263
|
+
- Handlers throw, framework catches — no `try/catch` in tool logic
|
|
264
|
+
- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage
|
|
265
|
+
- Register new tools via the barrel in `src/mcp-server/tools/definitions/index.ts`
|
|
266
|
+
- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
|
|
267
|
+
|
|
268
|
+
## Contributing
|
|
269
|
+
|
|
270
|
+
Issues and pull requests are welcome. Run checks and tests before submitting:
|
|
271
|
+
|
|
272
|
+
```sh
|
|
273
|
+
bun run devcheck
|
|
274
|
+
bun run test
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## License
|
|
278
|
+
|
|
279
|
+
Apache-2.0 — see [LICENSE](./LICENSE) for details.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Initial scaffold from @cyanheads/mcp-ts-core; tool-surface design for bioRxiv/medRxiv API."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.0 — 2026-05-21
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- Project scaffolded from `@cyanheads/mcp-ts-core`.
|
|
12
|
+
- Idea seed (`docs/idea.md`) covering domain rationale, data source, user goals, and open questions for the bioRxiv/medRxiv API wrapper.
|
|
13
|
+
- Tool-surface design (`docs/design.md`): five tools (`biorxiv_get_preprint`, `biorxiv_list_recent`, `biorxiv_search_preprints`, `biorxiv_get_published_version`, `biorxiv_list_categories`), two services (`BiorxivApiService`, `EuropePmcService`), error contracts, pagination model, and decisions log.
|
|
14
|
+
- Skills synced to `.claude/skills/`.
|
|
15
|
+
|
|
16
|
+
## Removed
|
|
17
|
+
|
|
18
|
+
- Unused echo definitions (resource, app-resource, prompt, app-tool) — design is tools-only; no standalone resources or prompts.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Full tool surface implementation: five bioRxiv/medRxiv tools, two API services, and tests."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.1 — 2026-05-21
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- `BiorxivApiService` (`src/services/biorxiv/`) — wraps the bioRxiv content API (`/details`, `/pubs`, `/publisher` endpoints) with domain-typed responses, `BIORXIV_MAILTO` User-Agent, and two-server fan-out via `Promise.allSettled`.
|
|
12
|
+
- `EuropePmcService` (`src/services/europe-pmc/`) — wraps the EuropePMC REST search endpoint for preprint keyword search.
|
|
13
|
+
- `src/config/server-config.ts` — lazy-parsed server config (`BIORXIV_MAILTO`, `BIORXIV_API_BASE_URL`, `EUROPEPMC_API_BASE_URL`) via `parseEnvConfig`.
|
|
14
|
+
- Five tool definitions registered in `createApp()`:
|
|
15
|
+
- `biorxiv_list_categories` — returns valid subject category strings for bioRxiv and medRxiv.
|
|
16
|
+
- `biorxiv_list_recent` — date-range browser with per-server pagination state when `server="both"`.
|
|
17
|
+
- `biorxiv_get_preprint` — DOI lookup with revision list, abstract, and full crosswalk metadata.
|
|
18
|
+
- `biorxiv_get_published_version` — published-version crosswalk (journal, DOI, licence) for accepted preprints.
|
|
19
|
+
- `biorxiv_search_preprints` — EuropePMC relevance search enriched via the bioRxiv details endpoint.
|
|
20
|
+
- Barrel export `src/mcp-server/tools/definitions/index.ts`.
|
|
21
|
+
- Service tests: `tests/services/biorxiv/biorxiv-service.test.ts`, `tests/services/europe-pmc/europe-pmc-service.test.ts`.
|
|
22
|
+
- Tool tests for all five definitions (sparse-payload cases included).
|
|
23
|
+
- Server-level `instructions` in `createApp()` orienting the model to the tool surface.
|
|
24
|
+
|
|
25
|
+
## Changed
|
|
26
|
+
|
|
27
|
+
- `src/index.ts` — replaced echo placeholder with `allToolDefinitions` barrel, added `setup()` to initialize both services.
|
|
28
|
+
- `scripts/list-skills.ts` — resolve skills dir relative to project root (not CWD); parallelize skill loading; fix `|` vs `>` block-scalar handling; add `stripQuotes`; guard undefined array access.
|
|
29
|
+
|
|
30
|
+
## Removed
|
|
31
|
+
|
|
32
|
+
- Echo tool (`src/mcp-server/tools/definitions/echo.tool.ts`) and its test.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "mcp-ts-core ^0.9.5, MCPB bundle support, optional-chain lint fixes."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.2 — 2026-05-23
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- MCPB bundle support: `manifest.json`, `.mcpbignore`, and `bundle`/`lint:packaging`/`audit:refresh`/`publish-mcp` scripts for one-click Claude Desktop install.
|
|
12
|
+
- `.env.example` with `BIORXIV_MAILTO` and optional `BIORXIV_API_BASE_URL` / `EUROPEPMC_API_BASE_URL` entries.
|
|
13
|
+
- README install badges (Claude Desktop, Cursor, VS Code) and repositioned framework badge.
|
|
14
|
+
- `scripts/lint-packaging.ts` — verifies env var alignment between `manifest.json` and `server.json` (run by `devcheck`).
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
|
|
18
|
+
- `@cyanheads/mcp-ts-core` `^0.9.1 → ^0.9.5`.
|
|
19
|
+
- `zod` `^4.4.3` added as explicit dependency (was transitive).
|
|
20
|
+
- `biorxiv-list-recent.tool.ts`, `biorxiv-service.ts` — Biome optional-chain fixes.
|
|
21
|
+
- `scripts/devcheck.ts` updated; `scripts/lint-packaging.ts` added.
|
|
22
|
+
- Skills synced: `field-test` 2.4→2.5, `maintenance` 2.1→2.4, `polish-docs-meta` 1.8→2.1, `release-and-publish` 2.2→2.4.
|
|
23
|
+
- CLAUDE.md: framework version, server version, bundling section, commands table updated.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Error code semantics for domain validation; mcp-ts-core ^0.9.5 → ^0.9.6."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.3 — 2026-05-23
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- `@cyanheads/mcp-ts-core` `^0.9.5 → ^0.9.6`.
|
|
12
|
+
- Skills synced: `polish-docs-meta` 2.1→2.2, `release-and-publish` 2.4→2.5.
|
|
13
|
+
- `scripts/lint-packaging.ts` — added manifest `name` scope check and `user_config` key validation.
|
|
14
|
+
|
|
15
|
+
## Fixed
|
|
16
|
+
|
|
17
|
+
- `biorxiv-get-preprint` — `invalid_doi_format` error now uses `ValidationError` code instead of `InvalidParams`.
|
|
18
|
+
- `biorxiv-get-published-version` — `invalid_doi_format` error now uses `ValidationError` code instead of `InvalidParams`.
|
|
19
|
+
- `biorxiv-list-recent` — `invalid_date_range` and `invalid_category` errors now use `ValidationError` code instead of `InvalidParams`.
|
|
20
|
+
|
|
21
|
+
## Added
|
|
22
|
+
|
|
23
|
+
- `LICENSE` — Apache-2.0 license file.
|