Skip to content

Commit 21786ec

Browse files
authored
Feat: Publish new PubMed MCP server (#41)
1 parent bbeb661 commit 21786ec

24 files changed

+1943
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"actorSpecification": 1,
3+
"name": "pubmed-mcp-server",
4+
"title": "PubMed MCP server",
5+
"description": "A server implementing the Model Context Protocol (MCP) for accessing and processing PubMed biomedical literature data.",
6+
"version": "0.0",
7+
"buildTag": "latest",
8+
"usesStandbyMode": true,
9+
"meta": {
10+
"templateId": "python-mcp-server"
11+
},
12+
"dockerfile": "../Dockerfile",
13+
"webServerMcpPath": "/mcp"
14+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"actor-start": {
3+
"eventTitle": "MCP server startup",
4+
"eventDescription": "Initial fee for starting the MCP Server Actor",
5+
"eventPriceUsd": 0.1
6+
},
7+
"searchPubmedKeywords": {
8+
"eventTitle": "PubMed keyword search",
9+
"eventDescription": "Fee for searching PubMed articles by keywords.",
10+
"eventPriceUsd": 0.0001
11+
},
12+
"searchPubmedAdvanced": {
13+
"eventTitle": "PubMed advanced search",
14+
"eventDescription": "Fee for advanced search on PubMed articles.",
15+
"eventPriceUsd": 0.0002
16+
},
17+
"getPubmedArticleMetadata": {
18+
"eventTitle": "Get PubMed article metadata",
19+
"eventDescription": "Fee for retrieving metadata for a PubMed article.",
20+
"eventPriceUsd": 0.00005
21+
},
22+
"downloadPubmedPdf": {
23+
"eventTitle": "Download PubMed article PDF",
24+
"eventDescription": "Fee for downloading a PubMed article PDF.",
25+
"eventPriceUsd": 0.0005
26+
},
27+
"deepPaperAnalysis": {
28+
"eventTitle": "Deep analysis of PubMed paper",
29+
"eventDescription": "Fee for running deep analysis on a PubMed paper.",
30+
"eventPriceUsd": 0.001
31+
}
32+
}

pubmed-mcp-server/.gitignore

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
.mise.toml
2+
.nvim.lua
3+
storage
4+
5+
# The rest is copied from https://github.com/github/gitignore/blob/main/Python.gitignore
6+
7+
# Byte-compiled / optimized / DLL files
8+
__pycache__/
9+
*.py[cod]
10+
*$py.class
11+
12+
# C extensions
13+
*.so
14+
15+
# Distribution / packaging
16+
.Python
17+
build/
18+
develop-eggs/
19+
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
share/python-wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
*.py,cover
56+
.hypothesis/
57+
.pytest_cache/
58+
cover/
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
local_settings.py
67+
db.sqlite3
68+
db.sqlite3-journal
69+
70+
# Flask stuff:
71+
instance/
72+
.webassets-cache
73+
74+
# Scrapy stuff:
75+
.scrapy
76+
77+
# Sphinx documentation
78+
docs/_build/
79+
80+
# PyBuilder
81+
.pybuilder/
82+
target/
83+
84+
# Jupyter Notebook
85+
.ipynb_checkpoints
86+
87+
# IPython
88+
profile_default/
89+
ipython_config.py
90+
91+
# pyenv
92+
# For a library or package, you might want to ignore these files since the code is
93+
# intended to run in multiple environments; otherwise, check them in:
94+
.python-version
95+
96+
# pdm
97+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
98+
#pdm.lock
99+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
100+
# in version control.
101+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
102+
.pdm.toml
103+
.pdm-python
104+
.pdm-build/
105+
106+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
107+
__pypackages__/
108+
109+
# Celery stuff
110+
celerybeat-schedule
111+
celerybeat.pid
112+
113+
# SageMath parsed files
114+
*.sage.py
115+
116+
# Environments
117+
.env
118+
.venv
119+
env/
120+
venv/
121+
ENV/
122+
env.bak/
123+
venv.bak/
124+
125+
# Spyder project settings
126+
.spyderproject
127+
.spyproject
128+
129+
# Rope project settings
130+
.ropeproject
131+
132+
# mkdocs documentation
133+
/site
134+
135+
# mypy
136+
.mypy_cache/
137+
.dmypy.json
138+
dmypy.json
139+
140+
# Pyre type checker
141+
.pyre/
142+
143+
# pytype static type analyzer
144+
.pytype/
145+
146+
# Cython debug symbols
147+
cython_debug/
148+
149+
# PyCharm
150+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
151+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
152+
# and can be added to the global gitignore or merged into this file. For a more nuclear
153+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
154+
.idea/
155+
156+
# Visual Studio Code
157+
# Ignores the folder created by VS Code when changing workspace settings, doing debugger
158+
# configuration, etc. Can be commented out to share Workspace Settings within a team
159+
.vscode
160+
161+
# Zed editor
162+
# Ignores the folder created when setting Project Settings in the Zed editor. Can be commented out
163+
# to share Project Settings within a team
164+
.zed
165+
166+
# Added by Apify CLI
167+
node_modules

pubmed-mcp-server/.ruff.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
exclude = ["PubMed-MCP-Server/*"]
3+

pubmed-mcp-server/Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# First, specify the base Docker image.
2+
# You can see the Docker images from Apify at https://hub.docker.com/r/apify/.
3+
# You can also use any other image from Docker Hub.
4+
FROM apify/actor-python:3.13
5+
6+
# Second, copy just requirements.txt into the Actor image,
7+
# since it should be the only file that affects the dependency installation in the next step,
8+
# in order to speed up the build.
9+
COPY requirements.txt ./
10+
11+
# Install the packages specified in requirements.txt,
12+
# print the installed Python version, pip version,
13+
# and all installed packages with their versions for debugging.
14+
RUN echo "Python version:" \
15+
&& python --version \
16+
&& echo "Pip version:" \
17+
&& pip --version \
18+
&& echo "Installing dependencies:" \
19+
&& pip install -r requirements.txt \
20+
&& echo "All installed Python packages:" \
21+
&& pip freeze
22+
23+
# Next, copy the remaining files and directories with the source code.
24+
# Since we do this after installing the dependencies, quick builds will be really fast
25+
# for most source file changes.
26+
COPY . ./
27+
28+
# Use compileall to ensure the runnability of the Actor Python code.
29+
RUN python3 -m compileall -q src/
30+
31+
# Specify how to launch the source code of your Actor.
32+
# By default, the "python3 -m ." command is run.
33+
CMD ["python3", "-m", "src"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Python-generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
# Virtual environments
10+
.venv
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
FROM python:3.10-alpine
3+
4+
# Install necessary system dependencies
5+
RUN apk add --no-cache gcc musl-dev linux-headers
6+
7+
WORKDIR /app
8+
9+
# Copy the entire repository to the container
10+
COPY . .
11+
12+
# Install Python dependencies
13+
RUN pip install --no-cache-dir -r requirements.txt
14+
15+
# Expose ports if needed (not required for stdio transport)
16+
17+
CMD ["python", "pubmed_server.py"]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 JackKuo666
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)