Get the FREE Ultimate OpenClaw Setup Guide →

PubMed

MCP server from Augmented-Nature/PubMed-MCP-Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio augmented-nature-pubmed-mcp-server node path/to/pubmed-server/build/index.js

How to use

The PubMed MCP Server exposes PubMed and PubMed Central APIs through 16 specialized MCP tools, enabling you to search, retrieve, and analyze biomedical literature directly from your MCP-enabled environment. Use the search and discovery tools to locate articles by keywords, authors, journals, MeSH terms, or date ranges; retrieve article details, abstracts, and full text (where available) with the article retrieval tools; and leverage citation and reference capabilities to explore related literature. The server also includes data quality features like automatic rate limiting and robust error handling to ensure reliable integration with your workflows. Typical use involves querying with search parameters, fetching PMIDs or full metadata, and exporting citations in various formats for downstream analysis or bibliography management.

How to install

Prerequisites:

  • Node.js 16+ installed on your system
  • npm (comes with Node.js)
  • Optional: an NCBI API key for higher rate limits

Step-by-step installation:

  1. Install dependencies
npm install
  1. Build the server (if applicable, depending on project setup)
npm run build
  1. Run the MCP server locally (example command; adjust path as needed)
node path/to/pubmed-server/build/index.js
  1. Configure the MCP with a basic server entry (example configuration)
{
  "mcpServers": {
    "pubmed-server": {
      "command": "node",
      "args": ["path/to/pubmed-server/build/index.js"],
      "autoApprove": [
        "search_articles",
        "get_article_details",
        "get_abstract",
        "validate_pmid"
      ]
    }
  }
}
  1. (Optional) Provide a NCBI API key for higher rate limits by setting environment variables as shown in the README (NCBI_API_KEY and NCBI_EMAIL) whenever you enable extra tools like search_by_author or search_by_journal.

Additional notes

Tips and notes:

  • Rate limits: 3 requests per second without an API key; 10 per second with a key. If you hit limits, implement exponential backoff or stagger requests.
  • You can enable higher capabilities by adding more tools to the autoApprove list, such as search_by_author and search_by_journal, especially when using an API key.
  • Ensure your environment provides network access to the NCBI E-utilities and PubMed Central APIs; firewall rules should allow outbound HTTP(S) requests.
  • Use MeSH terms and field-specific queries for precise results; the API supports a wide range of PubMed search fields and operators.
  • When exporting citations, choose the desired format (APA, MLA, Chicago, BibTeX, RIS) to match your workflow.
  • If you plan to run at scale, consider caching common queries and handling retries with backoff to stay within rate limits and improve performance.

Related MCP Servers

Sponsor this space

Reach thousands of developers