PubMed

v2.7.1Data Science & MLstable

Analyzes PubMed medical literature to help researchers quickly gain insights into medical research dynamics, with features including literature retrieval, hotspot analysis, trend tracking, and comprehensive reports.

ai-agentsai-toolsbioinformaticsbiomedicalcitations
Share:
149
Stars
0
Downloads
0
Weekly
0/5

What is PubMed?

PubMed is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to analyzes pubmed medical literature to help researchers quickly gain insights into medical research dynamics, with features including literature retrieval, hotspot analysis, trend tracking, and compreh...

Analyzes PubMed medical literature to help researchers quickly gain insights into medical research dynamics, with features including literature retrieval, hotspot analysis, trend tracking, and comprehensive reports.

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • fetch_pubmed_content
  • generate_pubmed_chart
  • get_pubmed_article_connections
  • pubmed_research_agent
  • search_pubmed_articles

Use Cases

Fetches detailed information from PubMed using NCBI EFetch. Can be used with a direct list of PMIDs or with queryKey/webEnv from an ESearch history entry. Supports pagination (retstart, retmax) when u
Generates a customizable chart (PNG) from structured data. Supports 'bar', 'line', 'scatter', 'pie', 'doughnut', 'bubble', 'radar', and 'polarArea' plots. Requires data values and field mappings for a
Finds articles related to a source PubMed ID (PMID) or retrieves formatted citations for it. Supports finding similar articles, articles that cite the source, articles referenced by the source (via NC
Generates a standardized JSON research plan outline from component details you provide. It accepts granular inputs for all research phases (conception, data collection, analysis, dissemination, cross-
Searches PubMed for articles using a query term and optional filters (max results, sort, date range, publication types). Uses NCBI ESearch to find PMIDs and ESummary (optional) for brief summaries. Re
Darkroaster

Maintainer

LicenseMIT License
Languagepython
Versionv2.7.1
UpdatedApr 23, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @cyanheads/pubmed-mcp-server

Manual Installation

npx -y @cyanheads/pubmed-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use PubMed

The PubMed MCP server connects AI assistants to the NCBI PubMed database, enabling deep analysis of biomedical literature through NCBI E-Utilities and Europe PMC APIs. It lets researchers search millions of articles, identify research hotspots and publication trends, retrieve full-text connections between papers, and generate comprehensive analysis reports — all through natural language. Researchers and clinicians use it to rapidly synthesize evidence, track emerging topics, and understand the landscape of any biomedical field without manually querying PubMed's web interface.

Prerequisites

  • Python 3.10+ and uv package manager installed
  • NCBI account with a registered email address (required for API access)
  • NCBI API key from https://www.ncbi.nlm.nih.gov/account/ (strongly recommended to avoid rate limits)
  • Git to clone the repository
  • An MCP client such as Claude Desktop or Claude Code
1

Clone the repository

Clone the pubmearch repository from GitHub to your local machine.

git clone https://github.com/Darkroaster/pubmearch.git
cd pubmearch
2

Create and activate a virtual environment

Use uv to create an isolated Python environment and install dependencies from the project.

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e .
3

Set required environment variables

Export your NCBI email and API key. The email is required by NCBI policy; the API key raises the rate limit from 3 to 10 requests per second.

export NCBI_USER_EMAIL="[email protected]"
export NCBI_USER_API_KEY="your_ncbi_api_key_here"
4

Verify the server starts correctly

Run the server manually to confirm it starts without errors before adding it to your MCP client. Logs are written to pubmed_server.log and results to pubmearch/results/.

uv run python -m pubmearch
5

Add to your MCP client configuration

Register the server in your MCP client config file so it launches automatically. Use the absolute path to the project directory and your uv binary.

{
  "mcpServers": {
    "pubmed": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/pubmearch", "python", "-m", "pubmearch"],
      "env": {
        "NCBI_USER_EMAIL": "[email protected]",
        "NCBI_USER_API_KEY": "your_ncbi_api_key_here"
      }
    }
  }
}

PubMed Examples

Client configuration

Example claude_desktop_config.json entry for the PubMed MCP server using uv.

{
  "mcpServers": {
    "pubmed": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/pubmearch", "python", "-m", "pubmearch"],
      "env": {
        "NCBI_USER_EMAIL": "[email protected]",
        "NCBI_USER_API_KEY": "your_ncbi_api_key_here"
      }
    }
  }
}

Prompts to try

Sample requests that exercise the server's search, trend analysis, and report tools.

- "Search PubMed for articles on prostate cancer immunotherapy published in the last 3 months and identify the top research hotspots."
- "Analyze publication count trends for CRISPR gene editing from 2015 to 2024."
- "Find articles related to PMID 38234567, including papers that cite it and papers it references."
- "Generate a comprehensive analysis report on mRNA vaccine research, covering keywords, publication counts, and key findings."

Troubleshooting PubMed

HTTP 429 Too Many Requests errors when searching PubMed

Ensure NCBI_USER_API_KEY is set. Without an API key, NCBI limits requests to 3 per second. With a key, the limit rises to 10 per second. Register at https://www.ncbi.nlm.nih.gov/account/ to obtain a key.

Server exits immediately with an error about missing environment variables

Make sure NCBI_USER_EMAIL and NCBI_USER_API_KEY are set either in your shell before launching or in the env block of your MCP client config. Both must be non-empty strings.

No results returned for a valid search query

PubMed requires proper boolean syntax. Use field tags such as [Title/Abstract] and operators like AND/OR. Example: ((cancer[Title/Abstract]) AND (immunotherapy[Title/Abstract])). Avoid plain free-text queries without field qualifiers.

Frequently Asked Questions about PubMed

What is PubMed?

PubMed is a Model Context Protocol (MCP) server that analyzes pubmed medical literature to help researchers quickly gain insights into medical research dynamics, with features including literature retrieval, hotspot analysis, trend tracking, and comprehensive reports. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install PubMed?

Install via npm with the command: npx -y @cyanheads/pubmed-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with PubMed?

PubMed works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is PubMed free to use?

Yes, PubMed is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "pubmed": { "command": "npx", "args": ["-y", "@cyanheads/pubmed-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use PubMed?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides