PubMed-MCP-Server

MCP.Pizza Chef: JackKuo666

Four working tools search the United States National Library of Medicine's catalogue by keyword, or by a mix of title, author, journal and date, then hand back each paper's title, authors, journal, year and abstract. Two headline features are broken. The download tool looks on the article page for a phrase PubMed Central stopped printing, so it declares nearly every paper closed, and the deep-analysis feature fails on every attempt with an open bug report against it. No account, key or payment is involved.

Unmaintained ยท No commits in 15 months.
Web/Research

Use This MCP server To

Find recent studies about a drug or a condition Read the abstract of a paper from its PubMed number Search for papers by one specific author Narrow a search to a single journal and date range Gather ten citations to start a literature review

README

MseeP.ai Security Assessment Badge

PubMed MCP Server

smithery badge

๐Ÿ” 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 "{}"
  1. Clone the repository:

    git clone https://github.com/JackKuo666/PubMed-MCP-Server.git
    cd PubMed-MCP-Server
    
  2. 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:

  1. search_pubmed_key_words: Search for articles on PubMed using keywords.
  2. search_pubmed_advanced: Perform an advanced search for articles on PubMed with multiple parameters.
  3. get_pubmed_article_metadata: Fetch metadata for a PubMed article using its PMID.
  4. download_pubmed_pdf: Attempt to download the full-text PDF for a PubMed article.
  5. 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 FastMCP
  • pubmed_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.

PubMed-MCP-Server FAQ

Do I need an API key or a PubMed account?
No. The catalogue it queries is free and open. Unregistered use is capped at roughly three requests a second, and every search fetches its results one paper at a time, so a big search feels slow.
Can I use this to download the full PDF of a paper?
Almost never now. The download tool decides whether an article is free by looking for a specific sentence on the page, and PubMed Central no longer prints it, so the tool replies that the paper is not open access and stops.
Where would a downloaded file even go?
Into whatever folder the server happened to start in, under a fixed name you cannot change, and only a text message comes back to you. There is no setting for a download folder.
How many tools does it really have?
Four. The project lists five, but the deep-analysis one is registered as a prompt rather than a tool, so many apps never show it. Where it does appear it errors out every time, which is an open bug with an unmerged fix waiting.
Which apps does it work in?
Claude Desktop, Cursor, Cline and Windsurf are all documented, most easily through the Smithery installer.
Does the Mac setup shown in the project notes work?
No. The Mac snippet tells your app to run a name that is not a valid program name. Point it at the downloaded pubmed_server.py file instead, the way the Windows example does.
Can it read the whole paper?
No. You get the title, authors, journal, year and the abstract, and only the first paragraph of an abstract that comes in several parts.
Is it still maintained?
The last code change was May 2025. Around ten reports sit open, including one from a reader whose open-access download failed and one for the crashing analysis feature, and a fix has been offered but not merged.