Content
# PubMed Analysis MCP Server
> **MCP server for PubMed**: This is a newly developed project with features still being refined. Suggestions and improvements are welcome!
A professional MCP server for analyzing PubMed medical literature to help researchers quickly gain insights into medical research dynamics.
## Features
- **Literature Retrieval**: Supports PubMed advanced search syntax with date filtering.
- **Hotspot Analysis**: Analyzes keyword frequencies to identify popular research areas.
- **Trend Tracking**: Tracks keyword changes over time to reveal evolving research trends.
- **Publication Count**: Analyzes publication volume changes with customizable time periods.
- **Comprehensive Reports**: Generates complete reports with customizable parameters.
## MCP Tools
### 1. search_pubmed
Search PubMed and save results.
Key parameters:
Generally, no need to set explicitly, communicate with large models.
- `advanced_search`: PubMed search query (required, same as advanced search syntax)
- `start_date`: Start date (format: YYYY/MM/DD)
- `end_date`: End date (format: YYYY/MM/DD)
- `max_results`: Maximum results (default: 1000)
### 2. list_result_files
List available result files.
### 3. analyze_research_keywords
Analyze research hotspots and research trends.
Key parameters:
- `top_n`: Number of keywords (default: 20)
### 4. analyze_publication_count
Analyze publication counts.
### 5. generate_comprehensive_analysis
Generate comprehensive analysis.
## Example for Trae
*Between us... when I use the same model, Cursor makes me feel like I'm the one not making sense. Trae, on the other hand, just gets me. Seriously great IDE!*
### Install Dependencies
Recommend using uv virtual environment.
uv: [Visit uv repo](https://github.com/astral-sh/uv)
```bash
# In the pyproject.toml directory:
uv pip install -e .
```
### Write mcp.json
Merge the following configuration in mcp.json (for Windows):
```json
{
"mcpServers": {
"pubmearch": {
"command": "cmd",
"args": [
"/c",
"uv",
"run",
"--directory",
"path/to/project/root/directory", // The folder where the pubmearch folder is located
"-m",
"pubmearch.server"
],
"env": {
"NCBI_USER_EMAIL": "youremailaddress@email.com",
"NCBI_USER_API_KEY": "your_api_key"
}
}
}
}
```
### Get PubMed API key
1. Log in to PubMed.
2. Click on your profile picture and select "Account Settings".
3. Scroll down to the "API Keys" section and click "Create API Key".
### LLM prompt (Agent mode)
**Use advanced search syntax**.
- Help me analyze the research hotspots on prostate cancer immunotherapy in the past three months. The advanced search query is ((prostat*[Title/Abstract]) AND (cancer[Title/Abstract])) AND (immu*[Title/Abstract]).
- 帮我分析一下近三个月前列腺癌免疫治疗的研究热点,检索词为((prostat*[Title/Abstract]) AND (cancer[Title/Abstract])) AND (immu*[Title/Abstract]).
## Notes
- Follow NCBI usage policies.
- Results saved in `pubmearch/results` directory, logs in `pubmed_server.log`.
- I am busy with my studies, the project may be delayed.
## Contributions
Contributions are welcome via Issues or Pull Requests.
## License
[MIT](https://github.com/Darkroaster/pubmearch/blob/main/LICENSE)
You Might Also Like
MarkItDown MCP
markitdown-mcp is a lightweight MCP server for converting various URIs to Markdown.
Github
GitHub MCP Server connects AI tools to GitHub for code management and automation.

apisix
Apache APISIX is an API Gateway for managing APIs and microservices.
opik
Opik is a powerful tool for managing and optimizing machine learning experiments.

MCP Toolbox for Databases
MCP Toolbox for Databases is an open-source server simplifying database tool...

sqlglot
SQLGlot is a no-dependency SQL parser and transpiler supporting 30 dialects.