Get the FREE Ultimate OpenClaw Setup Guide →

mcp-pubmed

一个用来让本地agent利用api高效爬取pubmed论文的mcp工具

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hhx465453939-mcp-pubmed-server node src/index.js \
  --env HTTP_PROXY="" \
  --env HTTPS_PROXY="" \
  --env PUBMED_EMAIL="your-email@example.com" \
  --env ABSTRACT_MODE="deep" \
  --env FULLTEXT_MODE="enabled" \
  --env PROXY_ENABLED="disabled" \
  --env ENDNOTE_EXPORT="enabled" \
  --env PUBMED_API_KEY="your-pubmed-api-key"

How to use

This MCP server provides PubMed data to your LLM workflows. It exposes a set of tooling endpoints that allow you to search PubMed, fetch detailed records, extract key insights, and manage full-text availability and EndNote exports. Typical usage involves running the server locally or in your environment, then configuring your MCP client (e.g., VS Code extension, Cherry Studio, Claude Desktop/Code) to point at the local node process. The included tools include pubmed_search for querying literature, pubmed_get_details for retrieving detailed records, pubmed_extract_key_info for structured extraction, and pubmed_batch_query to optimize batch requests. You can also check full-text status, download Open Access PDFs when available, and manage EndNote RIS/BibTeX exports. The server supports proxy configuration and adjustable abstract/full-text modes to balance context length with retrieval depth.

How to install

Prerequisites:

  • Node.js v18.0.0+ installed
  • npm installed
  • Access to PubMed API key and a registered email

Steps:

  1. Clone the repository and navigate to the project
git clone https://github.com/your-repo/mcp-pubmed-server.git
cd mcp-pubmed-server
  1. Install dependencies
npm install
  1. Create and configure environment variables
cp .env.example .env

Edit .env to include:

PUBMED_API_KEY=your-pubmed-api-key
PUBMED_EMAIL=your-email@example.com
ABSTRACT_MODE=deep
FULLTEXT_MODE=enabled
PROXY_ENABLED=disabled
HTTP_PROXY=
HTTPS_PROXY=
ENDNOTE_EXPORT=enabled
  1. Run the MCP server (as a local MCP server)
node src/index.js
  1. Verify the server starts and outputs a ready message such as:
PubMed Data Server v2.0 running on stdio
  1. Optional: configure your MCP client adapters (VS Code, Cherry Studio, Claude) with the provided templates in the README to connect to this server.

Additional notes

Tips and notes:

  • The server exposes PubMed-related tools via JSON interfaces; ensure your client config uses the same command and environment as shown in the README examples.
  • If you enable FULLTEXT_MODE, the server will attempt to detect and download OA full texts where available; ensure your network allows access.
  • Use ABSTRACT_MODE to balance context length; quick mode reduces the abstract length for faster queries, while deep mode provides longer abstracts when context window permits.
  • PROXY_ENABLED and related HTTP_PROXY/HTTPS_PROXY settings help in restricted networks; set appropriate values if you’re behind a corporate proxy.
  • EndNote export (RIS/BibTeX) can be disabled by setting ENDNOTE_EXPORT to disabled if you don’t need exports.
  • For MCP client integrations, you can copy the server configuration into your client’s mcpServers section to enable seamless cross-tool usage.

Related MCP Servers

Sponsor this space

Reach thousands of developers