Get the FREE Ultimate OpenClaw Setup Guide →

mcp-pubmed -pancrpal

一个用来让本地agent利用api高效爬取pubmed论文的mcp工具;第一开发hhx: https://github.com/hhx465453939/mcp-pubmed-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 pancrepal-xiaoyibao-mcp-pubmed-server-pancrpal npx -y mcp-pubmed-llm-server \
  --env PUBMED_EMAIL="your_email@example.com" \
  --env ABSTRACT_MODE="quick" \
  --env FULLTEXT_MODE="disabled" \
  --env ENDNOTE_EXPORT="enabled" \
  --env PUBMED_API_KEY="your_ncbi_api_key_if_available"

How to use

This MCP server provides structured PubMed literature data to LLM clients via the MCP protocol. It supports literature search, caching, OA full-text download (when enabled), and EndNote export. Clients can connect in stdio mode for local integration or use the Streamable HTTP transport for remote deployment. The server handles PubMed API access (with optional API keys) and exposes a range of tools for querying PubMed data, managing cache, and exporting references in RIS/BibTeX formats. To begin, run the MCP server (via npx mcp-pubmed-llm-server or locally from source) and connect your MCP client to the available /mcp endpoint in streamable HTTP mode, or use stdio for direct integration with local LLM tools.

How to install

Prerequisites:

  • Node.js v18.0.0+ and npm
  • Git (for cloning from source)

Install (global package):

npm install -g mcp-pubmed-llm-server

Install from source:

git clone git@github.com:PancrePal-xiaoyibao/mcp-pubmed-server-pancrpal.git
cd mcp-pubmed-server-pancrpal
npm install

Configuration:

  • Copy the example environment file and add your keys if available:
cp .env.example .env
  • Edit .env to set PUBMED_API_KEY, PUBMED_EMAIL, and optional modes like ABSTRACT_MODE, FULLTEXT_MODE, ENDNOTE_EXPORT.

Run options:

  • Run as npm package (stdio by default):
npm run start
  • Run via NPX (quick start):
npx mcp-pubmed-llm-server
  • Run from source (stdio mode):
node src/index.js --mode=stdio
  • Run in Streamable HTTP mode (recommended for remote clients):
node src/index.js --mode=streamableHttp

Additional notes

Environment variables: PUBMED_API_KEY and PUBMED_EMAIL are optional; leaving them unset runs in anonymous mode with reduced rate limits. The API key pool (if configured) can be managed via api-keys.json or environment variables. When FULLTEXT_MODE is enabled, PubMed full text (OA if available) can be downloaded; ENDNOTE_EXPORT enables RIS/BibTeX export tools. For production, consider using a reverse proxy, TLS termination, and a process manager (PM2/systemd). The Streamable HTTP mode uses the /mcp endpoint and supports session-based communication; ensure firewall rules allow port 8745 if you use the default port, or configure a custom port as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers