PubMed-MCP-Server

PubMed-MCP-Server

0

The PubMed MCP Server leverages the FastMCP framework and BioPython's Entrez module to search PubMed for article abstracts asynchronously. It offers features like querying for articles and retrieving abstracts while using asynchronous execution to enhance server performance.

PubMed MCP Server

This repository contains an MCP server that searches PubMed for article abstracts using BioPython's Entrez module. It leverages the FastMCP framework to provide asynchronous search capabilities for PubMed.

Features

  • Search PubMed: Query for articles based on a search term.
  • Retrieve Abstracts: Fetch abstracts of articles returned from PubMed.
  • Asynchronous Operation: Uses asynchronous execution to avoid blocking the server.

Prerequisites

  • Python 3.8 or higher
  • mcp[cli]
  • BioPython

Setup

  1. Clone the repository.
  2. Install dependencies using uv.
  3. Configure Entrez Email by setting a valid email address in the code.

Running the Server

Start the PubMed MCP server using the uv command-line tool.

Configuring the MCP Client

Update the config.json to connect to the PubMed MCP server.

Usage

Use the tool search_pubmed with parameters query and max_results. This will return a string with the abstracts of the articles.