mcp-simple-pubmed

MCP server for searching and querying PubMed medical papers/research database

GitHub Stars

126

User Rating

Not Rated

Favorites

0

Views

23

Forks

24

Issues

3

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Python 3.6以上

Installation

Installation

Prerequisites

Please specify required software and versions:
Python: 3.6 or higher

Installation Steps

1. Clone Repository

bash
git clone https://github.com/andybrandt/mcp-simple-pubmed.git
cd mcp-simple-pubmed

2. Install Dependencies

bash
pip install mcp-simple-pubmed

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Python version and reinstall dependencies. Issue: Invalid API key Solution: Verify your API key on the NCBI website.

Configuration

Configuration

Basic Configuration

Environment Variables

You need to set the following environment variables:
bash
export PUBMED_EMAIL="your-email@example.com"
export PUBMED_API_KEY="your-api-key"  # Optional

Configuration Example

Basic Configuration

json
{
  "mcpServers": {
    "simple-pubmed": {
      "command": "python",
      "args": ["-m", "mcp_simple_pubmed"],
      "env": {
        "PUBMED_EMAIL": "your-email@example.com"
      }
    }
  }
}

Examples

Examples

Basic Usage

Programmatic Usage

python
import requests

def call_pubmed_tool(tool_name, params):
    response = requests.post(
        'http://localhost:3000/mcp/call',
        json={
            'tool': tool_name,
            'parameters': params
        }
    )
    return response.json()

Usage example

result = call_pubmed_tool('search', { 'query': 'COVID-19', 'options': {'format': 'json'} }) print(result)

Use Cases

Using an AI assistant to search for specific research papers from PubMed.
Medical researchers accessing the latest research findings through PubMed.
Educational institutions providing students with open access papers.
Data scientists retrieving data from PubMed for medical data analysis.

Additional Resources