CP

chrismannina/pubmed-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 4 forks 质量 58 趋势 18MIT

A Model Context Protocol (MCP) server that enables AI assistants to search and analyze PubMed medical literature with advanced filtering, citations, and research tools.

概览

A comprehensive Model Context Protocol (MCP) server for PubMed literature search and management. This server provides advanced search capabilities, citation formatting, and research analysis tools through the MCP protocol. - : Search with complex filters including date ranges, article types, authors, journals, and MeSH terms - : Retrieve detailed information for specific PMIDs including abstracts, authors, and metadata - : Export citations in multiple formats (BibTeX, APA, MLA, Chicago, Vancouver, EndNote, RIS) - : Find articles by specific authors with co-author information - : Discover articles related to a specific PMID - : Search and explore Medical Subject Headings - : Get metrics and recent articles from specific journals - : Analyze publication trends over time - : Compare multiple articles side by side - : Built-in caching for improved performance - : Respectful API usage with configurable rate limits - Python 3.

README

以下为原文 README 节选,完整内容请查看原文。

PubMed MCP Server

A comprehensive Model Context Protocol (MCP) server for PubMed literature search and management. This server provides advanced search capabilities, citation formatting, and research analysis tools through the MCP protocol.

Features

  • Advanced PubMed Search: Search with complex filters including date ranges, article types, authors, journals, and MeSH terms
  • Article Details: Retrieve detailed information for specific PMIDs including abstracts, authors, and metadata
  • Citation Export: Export citations in multiple formats (BibTeX, APA, MLA, Chicago, Vancouver, EndNote, RIS)
  • Author Search: Find articles by specific authors with co-author information
  • Related Articles: Discover articles related to a specific PMID
  • MeSH Term Search: Search and explore Medical Subject Headings
  • Journal Analysis: Get metrics and recent articles from specific journals
  • Research Trends: Analyze publication trends over time
  • Article Comparison: Compare multiple articles side by side
  • Caching: Built-in caching for improved performance
  • Rate Limiting: Respectful API usage with configurable rate limits

Installation

Prerequisites

  • Python 3.8 or higher
  • NCBI API key (free registration required)
  • Valid email address for NCBI API identification

Quick Start

  1. Clone the repository:

    git clone https://github.com/your-org/pubmed-mcp.git
    cd pubmed-mcp
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Set up environment variables:

    cp env.example .env
    # Edit .env with your NCBI API key and email
    
  4. Run the server:

    python -m src.main
    

Development Installation

For development with additional tools:

make install-dev

Or manually:

pip install -r requirements.txt
pip install -e .
pip install black isort mypy flake8

Configuration

Create a .env file in the project root with the following variables:

# Required
PUBMED_API_KEY=your_ncbi_api_key_here
[email protected]

# Optional
CACHE_TTL=300
CACHE_MAX_SIZE=1000
RATE_LIMIT=3.0
LOG_LEVEL=info

Getting an NCBI API Key

  1. Visit NCBI Account Settings
  2. Sign in or create an account
  3. Navigate to “API Key Management”
  4. Create a new API key
  5. Copy the key to your .env file

Usage

Available Tools

The server provides the following MCP tools:

1. search_pubmed

Search PubMed with advanced filtering options.

{
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →