Logo vun Medical MCP Server

Medical MCP Server

Communautéit
JamesANZ

An MCP server that provides comprehensive medical information by querying multiple authoritative medical APIs including FDA, WHO, PubMed, Google Scholar, and RxNorm

EditeurJamesANZ
Repositorymedical-mcp
SproochTypeScript
Forks
35
Stären
113
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Medical MCP Server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    113 Stären an 35 Forks aus dem verlinkte Repository.

🩺 Medical MCP Server

Bring trusted medical data directly into your AI workflow. A local server for private, free access to FDA, WHO, PubMed, RxNorm, Semantic Scholar, and Google Scholar. No API keys. No data leaks.

An MCP (Model Context Protocol) server that brings authoritative medical information into AI coding environments like Cursor and Claude Desktop.

Trust Score

Why Use Medical MCP?

  • 🔒 Your Data Never Leaves – Runs 100% locally; no tracking, no logs, no cloud
  • 🆓 No API Keys – Works out of the box, zero configuration
  • 🏥 Authoritative Sources – FDA, TGA, Health Canada, EMA, DailyMed, WHO, PubMed, RxNorm, ClinicalTrials.gov
  • ⚡ Easy Setup – One-click install in Cursor or simple manual setup
  • 🔬 Comprehensive – Drug info, health stats, medical literature, clinical guidelines, pediatric sources
  • 🛡️ Resilient – Circuit breakers, retry with backoff, rate limiting, and automatic fallbacks
  • 📊 Evidence-Graded – Results tagged with study type and evidence level (Meta-Analysis → Case Report). Tags are automatic labels from the title and abstract, not independently checked grades.
  • 🏥 Health Monitoring – Built-in health check tool to diagnose source availability

What's New in v2.0

  • Resilience Layer – Circuit breakers per source, retry with exponential backoff + jitter, per-source token bucket rate limiters
  • Monid web search – Scholar, AAP, and PMC HTML go through Monid TinyFish (Tavily-style search/fetch). Semantic Scholar is the no-key fallback
  • Evidence Grading – PubMed and multi-database results tagged with study type (Systematic Review, RCT, Cohort, Case Report, etc.) and evidence grade (I–V). These tags are automatic labels from the title and abstract, not independently checked grades.
  • Response Validation – Zod schemas validate all upstream API responses, logging warnings on schema drift without breaking
  • NCBI API Key Support – Optional NCBI_API_KEY env var boosts PubMed from 3 req/sec to 10 req/sec
  • Health Check Tool – health-check pings all upstream sources and reports latency, circuit breaker states, rate limiter status, and cache health
  • Structured Logging – Leveled, structured logging (DEBUG/INFO/WARN/ERROR) with source tracking and timing for every API call
  • Request Timeouts – All upstream calls have explicit response/deadline timeouts to prevent hanging

Quick Start

Install in Cursor (Recommended):

🔗 Install in Cursor

Or install manually:

bash
npm install -g medical-mcp
# Or from source:
git clone https://github.com/JamesANZ/medical-mcp.git
cd medical-mcp && npm install && npm run build

Features

💊 Drug Information

  • search-drugs – Search FDA, DailyMed, TGA (Australia), Health Canada, and EMA. Filter with countries (US, AU, CA, EU). Unsupported codes are rejected rather than returned as empty regulatory results.
  • search-drug-nomenclature – Standardized drug names via RxNorm (limit defaults to 25)
  • search-drug-safety – FDA FAERS adverse events (with report IDs), recalls, and shortages

📊 Health Statistics

  • get-health-statistics – WHO Global Health Observatory data (life expectancy, mortality, disease prevalence)

🔬 Medical Literature

  • search-medical-literature – Search 30M+ PubMed articles (with evidence grading). Optional question or rerank reorders those hits so papers that actually answer the question sit above papers that only share keywords.
  • rank-search-hits – Same rerank for a list you already have (title + abstract). Retrieval ranking only — not diagnosis or advice.
  • get-article-details – Detailed article info by PMID
  • search-google-scholar – Academic papers via Monid TinyFish (research_paper) when MONID_API_KEY is set; otherwise Semantic Scholar
  • search-medical-journals – Top journals (NEJM, JAMA, Lancet, BMJ, Nature Medicine)

🏥 Clinical Tools

  • search-clinical-guidelines – Practice recommendations from medical organizations
  • search-clinical-trials – ClinicalTrials.gov
  • list-sources – Full catalog of registry adapters and dedicated-tool sources (WHO, PubMed, RxNorm, Scholar, AAP), including which MCP tool reaches each. This is not the search-drugs five-regulator fanout.

👶 Pediatric Sources

  • search-pediatric-guidelines – AAP policy/clinical reports via PubMed, plus Bright Futures. Off-domain web hits are dropped; labels come from the page, not from which search ran.
  • search-pediatric-literature – Research from major pediatric journals. Optional question / rerank like medical literature.
  • search-pediatric-drugs – Drugs with pediatric labeling, NDC, manufacturer, and DailyMed URL

🛡️ Reliability & Monitoring

  • health-check – Ping all upstream sources, report latency/status, circuit breaker states, and cache health
  • get-cache-stats – View cache statistics (hit rate, memory usage, entry count)

Installation

Cursor (One-Click)

Click the install link above or use:

cursor://anysphere.cursor-deeplink/mcp/install?name=medical-mcp&config=eyJtZWRpY2FsLW1jcCI6eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1lZGljYWwtbWNwIl19fQ==

Manual Installation

Requirements: Node.js 18+ and npm

bash
git clone https://github.com/JamesANZ/medical-mcp.git
cd medical-mcp
npm install
npm run build
npm start

Claude Desktop

Add to claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "medical-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/medical-mcp/build/index.js"],
      "env": {
        "NCBI_API_KEY": "your_optional_key_here"
      }
    }
  }
}

Restart Claude Desktop after configuration.

Usage Examples

Search for Drug Information

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

Search Medical Literature (with Evidence Grading)

Results now include evidence tags:

1. Efficacy of COVID-19 Treatments: A Meta-Analysis
   Evidence: [Systematic Review / Meta-Analysis • tool grade I]
   Authors: Smith J, Jones K...

2. Randomized Trial of Remdesivir in Adults
   Evidence: [Randomized Controlled Trial • tool grade II]
   Authors: Chen L, Wang M...

Run Health Check

json
{ "tool": "health-check", "arguments": {} }

Returns:

✅ FDA: healthy (234ms)
✅ PubMed: healthy (156ms)
✅ WHO: healthy (890ms)
✅ RxNorm: healthy (312ms)
✅ ClinicalTrials: healthy (445ms)
✅ SemanticScholar: healthy (189ms)

NCBI API Key: ✅ Configured (10 req/sec PubMed)

Architecture

Resilience Stack

Every API call flows through a three-layer resilience stack:

Request → Rate Limiter → Circuit Breaker → Retry (with backoff) → Upstream API
  • Rate Limiter — Per-source token bucket prevents exceeding API limits (PubMed: 3/sec without key, 10/sec with; FDA: 4/sec; Google Scholar: 0.2/sec)
  • Circuit Breaker — After 3 consecutive failures, the circuit opens for 60s, preventing cascade failures. Transitions: CLOSED → OPEN → HALF_OPEN → CLOSED
  • Retry — Exponential backoff with full jitter on transient failures (429, 5xx, network errors). Max 2 retries

Evidence Grading

PubMed and multi-database results are automatically classified:

GradeStudy TypeExamples
ISystematic Review / Meta-AnalysisCochrane reviews, PRISMA studies
IIRandomized Controlled TrialDouble-blind placebo-controlled trials
IIICohort / Case-Control StudyProspective, retrospective, population-based
IVCase Report / Case SeriesClinical case presentations
VExpert Opinion / EditorialCommentaries, perspectives, narrative reviews

These tags are automatic labels from the title and abstract, not independently checked grades.

Automatic Fallback

When MONID_API_KEY is set, Scholar/AAP search and PMC HTML fetch go through Monid TinyFish. Without a key, Scholar falls back to Semantic Scholar's API — free, well-structured, 100 req/sec, no API key needed.

Response Validation

All upstream API responses are validated against Zod schemas. If a source changes their API response format, the server logs a warning but continues operating with raw data — no crashes, just alerts.

Data Sources

SourceCoverageUpdate FrequencyResilience
FDAUS approved drug labelsReal-timeCircuit breaker + retry
DailyMedUS structured product labelsDailyCircuit breaker + retry
TGA ARTGAustralian Register of Therapeutic GoodsReal-timeCircuit breaker + retry
Health Canada DPDCanadian marketed/approved drugsReal-timeCircuit breaker + retry
EMAEU centrally authorised medicinesTwice daily JSONIn-memory cache + retry
FDA FAERS / recalls / shortagesUS safety signalsReal-timeCircuit breaker + retry
WHOGlobal health stats (194 countries)AnnualCircuit breaker + retry
PubMed30M+ medical citationsDailyCircuit breaker + retry + NCBI key
RxNormStandardized drug nomenclature (US)WeeklyCircuit breaker + retry
TinyFish via MonidResearch papers + domain-scoped webReal-timeOptional MONID_API_KEY
Semantic Scholar200M+ papers with citation dataReal-timeCircuit breaker + retry
AAPBright Futures & policy statementsPeriodicGraceful degradation
Pediatric JournalsMajor pediatric journalsDailyCircuit breaker + retry
ClinicalTrials.govInterventional and observational trialsReal-timeCircuit breaker + retry

Configuration

Environment Variables

Performance & Reliability:

VariableDefaultDescription
NCBI_API_KEY(none)Free PubMed API key — 3x throughput. Get one at NCBI
MONID_API_KEY(none)Optional. When set, Scholar/AAP/PMC HTML use Monid's TinyFish search and fetch (Tavily-style web scraper). Get a key at Monid
TINYFISH_API_KEY(none)Optional fallback if you call TinyFish directly instead of through Monid.
TYPESAFE_API_KEY(none)Optional. Needed to rerank literature hits with JEV (jev-1.13.0). Without it, search works as before. Get a key at TypeSafe
LOG_LEVELINFOLogging level: DEBUG, INFO, WARN, ERROR, SILENT

Cache:

VariableDefaultDescription
CACHE_ENABLEDtrueEnable/disable caching
CACHE_MAX_SIZE1000Maximum cache entries
CACHE_TTL_FDA86400FDA TTL in seconds (24h)
CACHE_TTL_PUBMED3600PubMed TTL (1h)
CACHE_TTL_WHO604800WHO TTL (7d)
CACHE_TTL_RXNORM2592000RxNorm TTL (30d)
CACHE_TTL_GOOGLE_SCHOLAR3600Google Scholar TTL (1h)
CACHE_TTL_BRIGHT_FUTURES2592000Bright Futures TTL (30d)
CACHE_TTL_AAP_POLICY604800AAP Policy TTL (7d)
CACHE_TTL_REGULATORS86400TGA/EMA/Health Canada TTL
CACHE_TTL_SAFETY3600FAERS/recalls/shortages TTL
CACHE_TTL_TRIALS3600Clinical trial search TTL
CACHE_CLEANUP_INTERVAL300000Cleanup interval in ms (5min)

Deduplication:

VariableDefaultDescription
DEDUP_ENABLEDtrueEnable/disable cross-source deduplication
DEDUP_SIMILARITY_THRESHOLD0.9Fuzzy title match threshold (0.0–1.0)
DEDUP_LOG_REMOVEDfalseLog removed duplicates

Performance: Cached responses return in <10ms vs 800–1500ms for API calls. Expected hit rate: 60%+ for common queries.

Security & Privacy

  • ✅ Localhost-only – Server runs locally, no external access
  • ✅ No data storage – All queries are real-time, nothing saved to disk
  • ✅ Process isolation – Medical data stays on your machine
  • ✅ No API keys required – Works without credentials (NCBI and Monid keys are optional)

Technical Details

Built with: Node.js, TypeScript, MCP SDK Dependencies: @modelcontextprotocol/sdk, superagent, zod, express, cors Platforms: macOS, Windows, Linux

Source layout:

src/
├── index.ts                    # MCP tool definitions
├── utils.ts                    # Core API functions + formatters
├── constants.ts                # API URLs, config constants
├── types.ts                    # TypeScript types
├── logger.ts                   # Structured leveled logging
├── rank/                       # Optional JEV post-retrieval ranker (question vs abstract)
│   ├── policy.ts               # Keep / demote / drop — no HTTP
│   └── jev-client.ts           # TypeSafe System One client (jev-1.13.0)
├── cache/
│   ├── config.ts               # TTL policies, env var support
│   └── manager.ts              # In-memory LRU cache
├── resilience/
│   ├── index.ts                # Composed resilientCall()
│   ├── circuit-breaker.ts      # Per-source circuit breaker
│   ├── retry.ts                # Exponential backoff + jitter
│   └── rate-limiter.ts         # Token bucket rate limiter
├── validation/
│   └── schemas.ts              # Zod schemas for API responses
├── sources/                    # Country/source registry + adapters
│   ├── adapters/               # FDA, TGA, Health Canada, EMA, DailyMed, FAERS, trials, TinyFish
│   └── ...
└── utils/
    ├── deduplication.ts         # Cross-source paper dedup
    ├── evidence-grading.ts      # Study type classification
    └── semantic-scholar.ts      # Semantic Scholar API client

Medical Disclaimer

⚠️ Important: This tool provides information from authoritative sources but should not replace professional medical advice, diagnosis, or treatment. Always consult qualified healthcare professionals for medical decisions.

Contributing

⭐ If this project helps you, please star it on GitHub! ⭐

Contributions welcome! Please open an issue or submit a pull request.

License

MIT License – see LICENSE.md for details.

Support

If you find this project useful, consider supporting it:

⚡ Lightning Network

lnbc1pjhhsqepp5mjgwnvg0z53shm22hfe9us289lnaqkwv8rn2s0rtekg5vvj56xnqdqqcqzzsxqyz5vqsp5gu6vh9hyp94c7t3tkpqrp2r059t4vrw7ps78a4n0a2u52678c7yq9qyyssq7zcferywka50wcy75skjfrdrk930cuyx24rg55cwfuzxs49rc9c53mpz6zug5y2544pt8y9jflnq0ltlha26ed846jh0y7n4gm8jd3qqaautqa

₿ Bitcoin: bc1ptzvr93pn959xq4et6sqzpfnkk2args22ewv5u2th4ps7hshfaqrshe0xtp

Ξ Ethereum/EVM: 0x42ea529282DDE0AA87B42d9E83316eb23FE62c3f

Installatioun

TypingMind
{
  "mcpServers": {
    "medical-mcp": {
      "command": "medical-mcp",
      "args": [
        "-y",
        "medical-mcp"
      ]
    }
  }
}

Medical MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Medical MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Medical MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Medical MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "medical-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "medical-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Medical MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Medical MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Medical MCP Server?
Medical MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat Medical MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Medical MCP Server benotzt?

Medical MCP Server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Medical MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Medical MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Medical MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Medical MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Medical MCP Server MCP mat TypingMind?

Medical MCP Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Medical MCP Server MCP an TypingMind zur Verfügung?

Medical MCP Server stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Medical MCP Server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Medical MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇