PubMed MCP Server
A server for searching, retrieving, and analyzing articles from the PubMed database.
PubMed MCP Server
š Enable AI assistants to search, access, and analyze PubMed articles through a simple MCP interface.
The PubMed MCP Server provides a bridge between AI assistants and PubMed's vast repository of biomedical literature through the Model Context Protocol (MCP). It allows AI models to search for scientific articles, access their metadata, and perform deep analysis in a programmatic way.
š¤ Contribute ⢠š Report Bug
⨠Core Features
- š Paper Search: Query PubMed articles with keywords or advanced search ā
- š Efficient Retrieval: Fast access to paper metadata ā
- š Metadata Access: Retrieve detailed metadata for specific papers ā
- š Research Support: Facilitate biomedical sciences research and analysis ā
- š Paper Access: Attempt to download full-text PDF content ā
- š§ Deep Analysis: Perform comprehensive analysis of papers ā
- š Research Prompts: A set of specialized prompts for paper analysis ā
š Quick Start
Prerequisites
- Python 3.10+
- FastMCP library
Installation
Installing via Smithery
To install pubmed-mcp-server for Claude Desktop automatically via Smithery:
claude
npx -y @smithery/cli install @JackKuo666/pubmed-mcp-server --client claude
Cursor
Paste the following into Settings ā Cursor Settings ā MCP ā Add new server:
- Mac/Linux
npx -y @smithery/cli@latest run @JackKuo666/pubmed-mcp-server --client cursor --config "{}"
Windsurf
npx -y @smithery/cli@latest install @JackKuo666/pubmed-mcp-server --client windsurf --config "{}"
CLine
npx -y @smithery/cli@latest install @JackKuo666/pubmed-mcp-server --client cline --config "{}"
-
Clone the repository:
git clone https://github.com/JackKuo666/PubMed-MCP-Server.git cd PubMed-MCP-Server -
Install the required dependencies:
pip install -r requirements.txt
š Usage
Start the MCP server:
python pubmed_server.py
Usage with Claude Desktop
Add this configuration to your claude_desktop_config.json:
(Mac OS)
{
"mcpServers": {
"pubmed": {
"command": "python",
"args": ["-m", "pubmed-mcp-server"]
}
}
}
(Windows version):
{
"mcpServers": {
"pubmed": {
"command": "C:\\Users\\YOUR\\PATH\\miniconda3\\envs\\mcp_server\\python.exe",
"args": [
"D:\\code\\YOUR\\PATH\\PubMed-MCP-Server\\pubmed_server.py"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
Using with Cline
{
"mcpServers": {
"pubmed": {
"command": "bash",
"args": [
"-c",
"source /home/YOUR/PATH/mcp-server-pubmed/.venv/bin/activate && python /home/YOUR/PATH/pubmed-mcp-server.py"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
š MCP Tools
The PubMed MCP Server provides the following tools:
search_pubmed_key_words: Search for articles on PubMed using keywords.search_pubmed_advanced: Perform an advanced search for articles on PubMed with multiple parameters.get_pubmed_article_metadata: Fetch metadata for a PubMed article using its PMID.download_pubmed_pdf: Attempt to download the full-text PDF for a PubMed article.deep_paper_analysis: Perform a comprehensive analysis of a PubMed article.
Searching Papers
You can ask the AI assistant to search for papers using queries like:
Can you search PubMed for recent papers about CRISPR?
Getting Paper Details
Once you have a PMID, you can ask for more details:
Can you show me the metadata for the paper with PMID 12345678?
Analyzing Papers
You can request a deep analysis of a paper:
Can you perform a deep analysis of the paper with PMID 12345678?
š Project Structure
pubmed_server.py: The main MCP server implementation using FastMCPpubmed_web_search.py: Contains the logic for searching PubMed and retrieving article information
š§ Dependencies
- Python 3.10+
- FastMCP
- asyncio
- logging
- requests
- beautifulsoup4
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
š License
This project is licensed under the MIT License.
ā ļø Disclaimer
This tool is for research purposes only. Please respect PubMed's terms of service and use this tool responsibly.
Server Terkait
DevRag
Free local RAG for Claude Code - Save tokens & time with vector search. Indexes markdown docs and finds relevant info without reading entire files (40x fewer tokens, 15x faster).
NRT Search
A near real-time search server for indexing and querying documents, implemented in Java.
Perplexity AI
An MCP server to interact with Perplexity AI's language models for search and conversational AI.
MCP Research Friend
Research tools, including a Sqlite-backed document stash
SearchAPI
Provides standardized access to Google Maps, Google Flights, Google Hotels, and other services via the SearchAPI.
stooq-mcp
MCP server to fetch stock prices from stooq.com (Rust)
Baidu Map
A Location-Based Service (LBS) providing geospatial APIs for geocoding, POI search, route planning, and more.
MCP NIF.PT
Query and analyze Portuguese companies using the NIF.PT public API. Supports search by NIF, company name, and city.
AWS Documentation
Fetch, convert, and search AWS documentation pages, with recommendations for related content.
SearchAPI Agent
An MCP agent that integrates various search tools using the SearchAPI service. Requires SearchAPI and Google API keys.
