medical-mcp

medical-mcp

Aggregated medical knowledge and statistics from authoritative sources via Model Context Protocol.

16
Stars
7
Forks
16
Watchers
1
Issues
Medical MCP Server implements the Model Context Protocol (MCP) to provide comprehensive medical information by integrating data from FDA, WHO, PubMed, RxNorm, and Google Scholar. It offers specialized tools for drug information, health statistics, drug nomenclature, and academic literature search. The server exposes a standardized interface for MCP-compatible clients and ensures robust error handling and web scraping protection. It supports connecting to multiple medical APIs for up-to-date, authoritative insights.

Key Features

Standardized context protocol for medical data queries
Integration with FDA, WHO, PubMed, RxNorm, and Google Scholar
Search and retrieval of drug information by name or NDC
Access to global health statistics with country and indicator filters
Medical literature search via PubMed and Google Scholar
Robust error handling and fallback strategies
Anti-detection web scraping for Google Scholar
Schema validation for tool parameters
Real-time and regularly updated data from medical sources
Stdio-based server for MCP-compatible clients

Use Cases

Aggregating detailed drug information for healthcare professionals
Retrieving national and global health statistics for researchers
Searching academic literature for clinical studies or reviews
Providing up-to-date safety warnings and drug interactions
Assisting healthcare AI applications with context-enriched response
Automating medical data collection for clinical decision support
Integrating standardized drug nomenclature into health records
Generating medical knowledge graphs sourced from validated APIs
Facilitating advanced research in pharmacology and epidemiology
Supporting informed public health analysis with authoritative data

README

Medical MCP Server

Trust Score

A Model Context Protocol (MCP) server that provides comprehensive medical information by querying multiple authoritative medical APIs including FDA, WHO, PubMed, and RxNorm.

Features

This MCP server offers five specialized tools for querying medical information from reliable sources:

💊 Drug Information Tools

search-drugs

Search for drug information using the FDA database.

Input:

  • query (string): Drug name to search for (brand name or generic name)
  • limit (optional, number): Number of results to return (1-50, default: 10)

Output:

  • Drug information including brand name, generic name, manufacturer, route, dosage form, and purpose

Example:

Drug Search Results for "Advil"

Found 1 drug(s)

1. **ADVIL**
   Generic Name: IBUPROFEN
   Manufacturer: PFIZER CONSUMER HEALTHCARE
   Route: ORAL
   Dosage Form: TABLET
   Purpose: For temporary relief of minor aches and pains...
   Last Updated: 20210902

get-drug-details

Get detailed information about a specific drug by NDC (National Drug Code).

Input:

  • ndc (string): National Drug Code (NDC) of the drug

Output:

  • Comprehensive drug information including warnings, drug interactions, and clinical pharmacology

📊 Health Statistics Tools

get-health-statistics

Get health statistics and indicators from WHO Global Health Observatory.

Input:

  • indicator (string): Health indicator to search for (e.g., 'Life expectancy', 'Mortality rate')
  • country (optional, string): Country code (e.g., 'USA', 'GBR')
  • limit (optional, number): Number of results to return (1-20, default: 10)

Output:

  • Health statistics with values, ranges, and temporal data

Example:

Health Statistics: Life expectancy at birth (years)

Country: USA
Found 10 data points

1. **USA** (2019)
   Value: 78.5 years
   Numeric Value: 78.5
   Date: 2019-12-31

🔬 Medical Literature Tools

search-medical-literature

Search for medical research articles in PubMed.

Input:

  • query (string): Medical topic or condition to search for
  • max_results (optional, number): Maximum number of articles to return (1-20, default: 10)

Output:

  • Medical research articles with titles, PMIDs, journals, and publication dates

Example:

Medical Literature Search: "diabetes treatment"

Found 10 article(s)

1. **Novel Approaches to Diabetes Management**
   PMID: 12345678
   Journal: New England Journal of Medicine
   Publication Date: 2024-01-15

search-google-scholar

Search for academic research articles using Google Scholar.

Input:

  • query (string): Academic topic or research query to search for

Output:

  • Academic research articles with titles, authors, abstracts, journals, years, citations, and URLs

Example:

Google Scholar Search: "machine learning healthcare"

Found 10 article(s)

1. **Machine Learning in Healthcare: A Systematic Review**
   Authors: Smith J, Johnson A - Journal of Medical AI
   Year: 2023
   Citations: Cited by 45
   URL: https://scholar.google.com/...
   Abstract: This systematic review examines the application of machine learning...

Note: This tool uses web scraping to access Google Scholar since it doesn't provide a public API. It includes rate limiting protection and stealth measures to avoid detection.

🏥 Drug Nomenclature Tools

search-drug-nomenclature

Search for drug information using RxNorm (standardized drug nomenclature).

Input:

  • query (string): Drug name to search for in RxNorm database

Output:

  • Standardized drug information with RxCUI codes, synonyms, and term types

Installation

  1. Clone this repository:
bash
git clone <repository-url>
cd medical-mcp
  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build

Usage

Running the Server

Start the MCP server:

bash
npm start

The server runs on stdio and can be connected to any MCP-compatible client.

Example Queries

Here are some example queries you can make with this MCP server:

Search for Drug Information

json
{
  "tool": "search-drugs",
  "arguments": {
    "query": "Tylenol",
    "limit": 5
  }
}

Get Drug Details by NDC

json
{
  "tool": "get-drug-details",
  "arguments": {
    "ndc": "00071015527"
  }
}

Get Health Statistics

json
{
  "tool": "get-health-statistics",
  "arguments": {
    "indicator": "Life expectancy at birth (years)",
    "country": "USA",
    "limit": 5
  }
}

Search Medical Literature

json
{
  "tool": "search-medical-literature",
  "arguments": {
    "query": "COVID-19 treatment",
    "max_results": 10
  }
}

Search Drug Nomenclature

json
{
  "tool": "search-drug-nomenclature",
  "arguments": {
    "query": "aspirin"
  }
}

API Endpoints

This MCP server integrates with the following medical APIs:

FDA API

  • GET /drug/label.json - Drug labeling information
  • Search by brand name, generic name, or NDC
  • Provides safety information, warnings, and clinical data

WHO Global Health Observatory API

  • GET /api/Indicator - Health statistics and indicators
  • Global health data with country-specific information
  • Temporal data for trend analysis

PubMed API

  • GET /esearch.fcgi - Search for medical articles
  • GET /efetch.fcgi - Retrieve article details
  • Access to millions of medical research papers

RxNorm API

  • GET /REST/drugs.json - Standardized drug nomenclature
  • Drug name standardization and relationships
  • Clinical drug information

Google Scholar (Web Scraping)

  • Web scraping of Google Scholar search results
  • Academic research article discovery
  • Citation and publication information
  • Note: Uses Puppeteer for browser automation with anti-detection measures

Data Sources

FDA (Food and Drug Administration)

  • Source: Official FDA drug labeling database
  • Coverage: All FDA-approved drugs in the United States
  • Data: Drug safety, efficacy, dosage, warnings, and interactions
  • Update Frequency: Real-time as drugs are approved or labeling changes

WHO (World Health Organization)

  • Source: Global Health Observatory database
  • Coverage: Global health statistics from 194 countries
  • Data: Life expectancy, mortality rates, disease prevalence, and health indicators
  • Update Frequency: Annual updates with historical data

PubMed (National Library of Medicine)

  • Source: MEDLINE database of medical literature
  • Coverage: Over 30 million citations from medical journals
  • Data: Research articles, clinical studies, and medical reviews
  • Update Frequency: Daily updates as new articles are published

RxNorm (National Library of Medicine)

  • Source: Standardized drug nomenclature system
  • Coverage: Clinical drugs available in the United States
  • Data: Drug names, codes, relationships, and clinical information
  • Update Frequency: Weekly updates

Google Scholar (Web Scraping)

  • Source: Google Scholar academic search engine
  • Coverage: Academic papers, theses, books, and abstracts across all disciplines
  • Data: Research articles, citations, authors, journals, and publication dates
  • Update Frequency: Real-time as new papers are indexed
  • Note: Access via web scraping with rate limiting protection

Error Handling

The server includes comprehensive error handling:

  • Network errors are caught and reported with descriptive messages
  • Invalid queries return appropriate error messages
  • Rate limiting and API errors are handled gracefully
  • Fallback responses when specific APIs are unavailable

Web Scraping Implementation

The Google Scholar integration uses Puppeteer for web scraping with the following features:

Anti-Detection Measures

  • Stealth Mode: Browser launched with multiple flags to avoid detection
  • User Agent Spoofing: Realistic browser user agent strings
  • Random Delays: Built-in delays between requests to avoid rate limiting
  • Header Spoofing: Realistic HTTP headers to appear as a regular browser
  • Viewport Settings: Standard desktop viewport dimensions

Robust Parsing

  • Multiple Selectors: Uses various CSS selectors to handle different Google Scholar layouts
  • Fallback Strategies: Multiple parsing approaches for different page structures
  • Error Recovery: Graceful handling of missing elements or changed page structures
  • Data Validation: Filters out incomplete or invalid results

Rate Limiting Protection

  • Random Delays: 1-3 second random delays between requests
  • Browser Management: Proper browser cleanup to prevent resource leaks
  • Timeout Handling: Configurable timeouts for network requests
  • Error Recovery: Automatic retry logic for failed requests

Medical Disclaimer

Important: This MCP server provides information from authoritative medical sources but should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult with qualified healthcare professionals for medical decisions.

  • The information provided is for educational and informational purposes only
  • Drug information may not be complete or up-to-date for all medications
  • Health statistics are aggregated data and may not reflect individual circumstances
  • Medical literature should be interpreted by qualified healthcare professionals

Dependencies

  • @modelcontextprotocol/sdk - MCP SDK for server implementation
  • superagent - HTTP client for API requests
  • puppeteer - Browser automation for web scraping Google Scholar
  • zod - Schema validation for tool parameters

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Star History

Star History Chart

Repository Owner

JamesANZ
JamesANZ

User

Repository Details

Language TypeScript
Default Branch main
Size 39 KB
Contributors 2
License MIT License
MCP Verified Sep 5, 2025

Programming Languages

TypeScript
100%

Topics

fda google-scholar llms mcp-server pubmed rxnorm who

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • awslabs/mcp

    awslabs/mcp

    Specialized MCP servers for seamless AWS integration in AI and development environments.

    AWS MCP Servers is a suite of specialized servers implementing the open Model Context Protocol (MCP) to bridge large language model (LLM) applications with AWS services, tools, and data sources. It provides a standardized way for AI assistants, IDEs, and developer tools to access up-to-date AWS documentation, perform cloud operations, and automate workflows with context-aware intelligence. Featuring a broad catalog of domain-specific servers, quick installation for popular platforms, and both local and remote deployment options, it enhances cloud-native development, infrastructure management, and workflow automation for AI-driven tools. The project includes Docker, Lambda, and direct integration instructions for environments such as Amazon Q CLI, Cursor, Windsurf, Kiro, and VS Code.

    • 6,220
    • MCP
    • awslabs/mcp
  • cloudflare/mcp-server-cloudflare

    cloudflare/mcp-server-cloudflare

    Connect Cloudflare services to Model Context Protocol (MCP) clients for AI-powered management.

    Cloudflare MCP Server enables integration between Cloudflare's suite of services and clients using the Model Context Protocol (MCP). It provides multiple specialized servers that allow AI models to access, analyze, and manage configurations, logs, analytics, and other features across Cloudflare's platform. Users can leverage natural language interfaces in compatible MCP clients to read data, gain insights, and perform automated actions on their Cloudflare accounts. This project aims to streamline the orchestration of security, development, monitoring, and infrastructure tasks through standardized MCP connections.

    • 2,919
    • MCP
    • cloudflare/mcp-server-cloudflare
  • 1mcp-app/agent

    1mcp-app/agent

    A unified server that aggregates and manages multiple Model Context Protocol servers.

    1MCP Agent provides a single, unified interface that aggregates multiple Model Context Protocol (MCP) servers, enabling seamless integration and management of external tools for AI assistants. It acts as a proxy, managing server configuration, authentication, health monitoring, and dynamic server control with features like asynchronous loading, tag-based filtering, and advanced security options. Compatible with popular AI development environments, it simplifies setup by reducing redundant server instances and resource usage. Users can configure, monitor, and scale model tool integrations across various AI clients through easy CLI commands or Docker deployment.

    • 96
    • MCP
    • 1mcp-app/agent
  • OpenMCP

    OpenMCP

    A standard and registry for converting web APIs into MCP servers.

    OpenMCP defines a standard for converting various web APIs into servers compatible with the Model Context Protocol (MCP), enabling efficient, token-aware communication with client LLMs. It also provides an open-source registry of compliant servers, allowing clients to access a wide array of external services. The platform supports integration with local and remote hosting environments and offers tools for configuring supported clients, such as Claude desktop and Cursor. Comprehensive guidance is offered for adapting different API formats including REST, gRPC, GraphQL, and more into MCP endpoints.

    • 252
    • MCP
    • wegotdocs/open-mcp
  • mcp-open-library

    mcp-open-library

    Model Context Protocol server for accessing Open Library book and author data.

    Provides an implementation of a Model Context Protocol (MCP) server to enable AI assistants and clients to search and retrieve book and author information from the Open Library API. Supports searching by title, author name, and various identifiers, as well as fetching author photos and book covers. Returns structured, machine-readable data suitable for AI model context integration. Offers installation via Smithery, manual setup, and Docker deployment.

    • 34
    • MCP
    • 8enSmith/mcp-open-library
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results