pubmed-search
A Model Content Protocol server that provides tools to search and retrieve academic papers from PubMed database.
claude mcp add --transport stdio gradusnikov-pubmed-search-mcp-server python pubmed_search_mcp_server.py \ --env PYTHONUNBUFFERED="1"
How to use
The PubMedSearch MCP server exposes tools to search PubMed and retrieve detailed paper information. You can start the server in development mode using Python and then invoke the MCP endpoints to perform keyword-based searches or fetch detailed metadata for specific papers. The server is designed to integrate with MCP-compatible clients (for example Claude Desktop) and can be wired into client configurations that point at the script-based server entry point. Typical usage includes performing a search by keywords in the title/abstract or by author names, and then requesting detailed fields such as title, authors, journal, abstract, DOI, and other bibliographic metadata.
To run locally, start the server with the development command and then use the MCP client tools or your integration layer to call the provided MCP methods. If you’re integrating with Claude Desktop, you can add an entry that points to your local Python server command so Claude can invoke the server’s search and retrieval capabilities directly from the UI. When deploying, ensure the server has network access to PubMed (NCBI Entrez) endpoints and that any required API keys or rate-limiting considerations are accounted for in your environment.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- pip (Python package installer)
- Internet access to install dependencies
Install steps:
-
Clone the repository (or download the source): git clone <repository-url> cd pubmed-search-mcp-server
-
Install required Python dependencies: pip install fastmcp requests python-dotenv
-
Create a .env file in the project root if you need to configure environment variables (for example PubMed API parameters or rate limits):
Example content
PUBMED_ENTREZ_BASE_URL=https://eutils.ncbi.nlm.nih.gov/entrez/eutils
PUBMED_API_KEY=your_api_key_here
-
Run the server in development mode to test: python pubmed_search_mcp_server.py
Notes:
- Ensure Python is added to your system PATH so the python command is accessible from your terminal.
- If the server expects additional configuration (such as API keys), provide them via environment variables or a .env file as appropriate to the codebase.
Additional notes
Tips and common considerations:
- If you encounter rate-limiting from PubMed, consider using an API key (NCBI E-utilities) and respecting their usage guidelines. Configure the API key via environment variables in a .env file or your deployment environment.
- For Claude Desktop or other MCP clients, ensure the client is configured to point at the correct entry point (the Python script path) and that network routing allows local or remote access to the server.
- If you see issues with Python module imports, verify that your working directory contains the pubmed_search_mcp_server.py script and that dependencies installed correctly in the active Python environment.
- You can extend the .env file to include endpoints, timeout settings, or caching strategies if your implementation supports them.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP