Skip to main content

MCP server for PubMed/NCBI E-utilities API — search, fetch, and verify citations

Project description

PubMed MCP Server

An MCP (Model Context Protocol) server that provides tools for searching and retrieving biomedical literature from PubMed via the NCBI E-utilities API.

Features

Tool Description
search_pubmed Search PubMed with a query string, returns article summaries
fetch_article Fetch full metadata and abstract for a specific PMID
fetch_abstract Get just the abstract text for a PMID
verify_citation Check if a PMID matches a given title (returns similarity score)
search_by_title Find the correct PMID for a given article title

Installation

From PyPI

pip install suppevo-pubmed-mcp

From source

git clone https://github.com/gomezmera/suppevo-pubmed-mcp.git
cd suppevo-pubmed-mcp/pubmed
pip install -e .

Configuration

NCBI API Key (recommended)

An API key increases your rate limit from 3 requests/sec to 10 requests/sec.

  1. Create a free NCBI account at NCBI
  2. Go to Account Settings and generate an API key
  3. Set the environment variable:
export NCBI_API_KEY="your-api-key-here"

Or add it to a .env file in your home directory (~/.env):

NCBI_API_KEY=your-api-key-here

The server will automatically load it from ~/.env if present.

Running the Server

Standalone

# If installed via pip
suppevo-pubmed-mcp

# Or run directly with FastMCP
fastmcp run server.py

With Kiro

Add to your .kiro/settings/mcp.json:

{
  "mcpServers": {
    "pubmed": {
      "command": "python",
      "args": ["/path/to/suppevo-pubmed-mcp/pubmed/server.py"],
      "env": {
        "NCBI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Or if installed from PyPI:

{
  "mcpServers": {
    "pubmed": {
      "command": "uvx",
      "args": ["suppevo-pubmed-mcp"],
      "env": {
        "NCBI_API_KEY": "your-api-key-here"
      }
    }
  }
}

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "pubmed": {
      "command": "uvx",
      "args": ["suppevo-pubmed-mcp"],
      "env": {
        "NCBI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Usage Examples

Once connected to an MCP client, you can use natural language:

  • "Search PubMed for vitamin D supplementation meta-analysis 2024"
  • "Fetch the full details for PMID 30415628"
  • "Verify that PMID 17846391 is about vitamin D supplementation and total mortality"
  • "Find the PMID for the article titled 'Effect of zinc supplementation on C-reactive protein'"
  • "Get the abstract for PMID 25927176"

Query Syntax

The search_pubmed tool supports PubMed's full query syntax:

# Basic search
vitamin D supplementation

# Field-specific
curcumin AND inflammation[Title]

# Author search
Prasad AS[Author] AND zinc

# Date range
omega-3 AND cardiovascular[Title] AND 2020:2024[dp]

# MeSH terms
"Zinc/therapeutic use"[MeSH]

Rate Limits

Configuration Rate Limit
Without API key 3 requests/second
With API key 10 requests/second

The server automatically throttles requests to stay within limits. NCBI may temporarily block IPs that exceed these limits.

Development

# Clone and install in development mode
git clone https://github.com/gomezmera/suppevo-pubmed-mcp.git
cd suppevo-pubmed-mcp/pubmed
pip install -e .

# Run the server
python server.py

Publishing

See RELEASING.md for instructions on publishing to PyPI.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

suppevo_pubmed_mcp-1.0.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

suppevo_pubmed_mcp-1.0.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file suppevo_pubmed_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: suppevo_pubmed_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for suppevo_pubmed_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dad98eea5ea8373a0b099f56aa3c9fa46f2eda2e93d7f8ad082b9a92978deb8c
MD5 065346c3568ac76dc3f187aafba0d4b2
BLAKE2b-256 1295946f8eddb49695f937fffd2cc16cceca1afba7a3924b24e1b9bdb4306f11

See more details on using hashes here.

File details

Details for the file suppevo_pubmed_mcp-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for suppevo_pubmed_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47c303965a5727a9c20efb5f7dabf94ba2d9200abfb0b2904ef06f8c8c0d2365
MD5 af61a0b4be170e7cf534ab3fd68a936b
BLAKE2b-256 991e7bb2cd287bf83d3142080ebd37e5a61f8c678eeec417ae53244fc4b7a6f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page