Healthcare Research MCP Server
Allows searching PubMed for biomedical literature, retrieving detailed article information by PMID, and combining PubMed evidence with other sources for multi-source research.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Healthcare Research MCP Serverfind clinical trials for lung cancer"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Healthcare Research MCP Server
A healthcare research system built around the Model Context Protocol (MCP) that provides structured access to biomedical research from PubMed and ClinicalTrials.gov.
The project exposes healthcare research capabilities as MCP tools, prompts, and resources, while also providing a lightweight web interface for direct human use.
Overview
Healthcare research often requires searching multiple sources, comparing evidence, and preserving identifiers such as PMIDs and NCT IDs.
This project provides a single research interface that can:
Search PubMed for biomedical research articles
Retrieve detailed PubMed article information
Search ClinicalTrials.gov for clinical studies
Combine evidence from multiple research sources
Rank ClinicalTrials.gov results using lightweight relevance scoring
Expose research capabilities through MCP
Provide a structured research brief prompt
Provide research methodology and safety guidelines as an MCP resource
Provide a browser-based web interface
Provide a standalone MCP demonstration client
Validate user input and handle external API failures
Preserve research identifiers for further review
The system is designed for research assistance, not individualized medical decision-making.
Related MCP server: PubMed MCP Server
Key Features
PubMed
The server provides:
pubmed_searchpubmed_get_article
PubMed searches return structured article information such as:
PMID
Title
Authors
Journal
Publication date
Article retrieval can provide additional information including available abstracts and DOI information.
ClinicalTrials.gov
The server provides:
clinical_trials_search
Clinical trial results include:
NCT ID
Study title
Overall status
Study type
Conditions
The implementation performs a lightweight relevance ranking after retrieving candidate studies from ClinicalTrials.gov.
Query terms receive higher relevance when they occur in study titles, helping reduce unrelated results from broad searches.
Multi-source Healthcare Research
The server provides:
healthcare_research
This combines research retrieval from:
PubMed
ClinicalTrials.gov
The result is returned as a structured evidence package that can be consumed by an MCP client or the web application.
The workflow is deterministic rather than agentic. It follows predefined research steps instead of dynamically deciding which tools to use.
MCP Capabilities
The project exposes three types of MCP capabilities.
Tools
The MCP server currently exposes four tools:
Tool | Purpose |
| Search PubMed for biomedical research |
| Retrieve detailed information for a PubMed article |
| Search ClinicalTrials.gov |
| Run a combined multi-source research workflow |
Prompt
The server exposes:
research_briefThe prompt generates a structured healthcare research brief containing:
Research question
Key findings
Relevant PubMed evidence
Relevant clinical trial evidence
Areas of agreement
Areas of uncertainty or conflicting evidence
Limitations
Sources requiring further review
The prompt explicitly instructs the consuming AI system to distinguish retrieved evidence from interpretation and avoid inventing unavailable findings.
Resource
The server exposes:
healthcare://research-guidelinesThe resource contains guidelines covering:
Evidence handling
PMID and NCT preservation
Distinguishing evidence from interpretation
Research limitations
Clinical trial status changes
Independent review
Medical safety
Architecture
User / AI Application
|
v
+----------------+
| MCP Client |
+----------------+
|
MCP Protocol
|
v
+--------------------------+
| Healthcare MCP Server |
+--------------------------+
| | |
| | |
Tools Prompt Resource
|
v
+-----------------------+
| Research Workflow |
+-----------------------+
| |
v v
+---------+ +----------------+
| PubMed | | ClinicalTrials |
+---------+ +----------------+
| |
+------┬------+
|
v
Structured Evidence
|
v
MCP Client /
Web InterfaceThe web interface and MCP interface use the same underlying research functions.
Why MCP?
The project could technically be implemented using ordinary Python functions and HTTP endpoints alone.
MCP adds a standardized interface between an AI application and the research capabilities.
Instead of building a separate custom integration for every AI client, the capabilities are exposed through MCP so compatible clients can discover and invoke:
Tools
Prompts
Resources
Conceptually:
AI Application
|
v
MCP Client
|
v
MCP Server
|
+---- Tools
|
+---- Prompts
|
+---- Resources
|
v
External Research APIsThis separation makes the research capabilities reusable by different MCP-compatible AI applications.
Research Workflow
For a query such as:
artificial intelligence ECGthe multi-source workflow performs the following:
User Research Query
|
v
Input Validation
|
+----------------------+
| |
v v
PubMed ClinicalTrials.gov
| |
| Candidate Studies
| |
| Relevance Ranking
| |
+----------+-----------+
|
v
Combined Evidence
|
v
Structured JSONThe system does not claim that retrieved evidence proves causation unless the retrieved research supports such a conclusion.
Project Structure
healthcare-research-mcp/
│
├── demo.py
├── web_app.py
├── requirements.txt
├── README.md
├── .gitignore
│
├── frontend/
│ ├── index.html
│ ├── style.css
│ └── app.js
│
├── server/
│ ├── __init__.py
│ ├── server.py
│ │
│ ├── tools/
│ │ ├── __init__.py
│ │ ├── pubmed.py
│ │ ├── clinical_trials.py
│ │ └── research.py
│ │
│ ├── prompts/
│ │ ├── __init__.py
│ │ └── research.py
│ │
│ ├── resources/
│ │ ├── __init__.py
│ │ └── guidelines.py
│ │
│ └── utils/
│ ├── errors.py
│ └── validation.py
│
└── tests/
├── test_client.py
├── test_mcp_server.py
├── test_research.py
└── test_validation.pyTechnologies Used
Python 3.11+
Model Context Protocol
FastMCP
FastAPI
Uvicorn
Requests
PubMed / NCBI APIs
ClinicalTrials.gov API
HTML
CSS
JavaScript
Pytest
Requirements
Python 3.11 or newer is recommended.
Install the dependencies with:
python -m pip install -r requirements.txtThe main dependencies are:
mcp<2
requests
fastapi
uvicornSetup
Clone the repository:
git clone https://github.com/Anubhab36/healthcare-research-mcp.git
cd healthcare-research-mcpCreate a virtual environment:
python3 -m venv venvActivate it:
Linux / ChromeOS
source venv/bin/activateWindows
venv\Scripts\activateInstall dependencies:
python -m pip install -r requirements.txtRunning the MCP Server
From the project root:
python -m server.serverThe server communicates using MCP over standard input/output.
The server can then be connected to by an MCP-compatible client.
Running the MCP Demo
A standalone demonstration client is included in:
demo.pyRun:
python demo.pyThe demo:
Starts the MCP server
Establishes an MCP connection
Discovers available tools
Discovers available prompts
Discovers available resources
Executes the multi-source healthcare research tool
Retrieves PubMed results
Retrieves ClinicalTrials.gov results
Displays sample evidence
Exits after completing the demonstration
Example:
============================================================
Healthcare Research MCP Server
============================================================
Connecting to MCP server...
✓ MCP connection established
[1] Available Tools
✓ pubmed_search
✓ pubmed_get_article
✓ clinical_trials_search
✓ healthcare_research
[2] Available Prompts
✓ research_brief
[3] Available Resources
✓ healthcare://research-guidelines
[4] Research Query
artificial intelligence ECG
[5] Running healthcare research...
✓ PubMed: 3 results
✓ ClinicalTrials.gov: 3 results
[6] Sample PubMed Evidence
PMID: 42646568
Title: From Automated ECG Interpretation to Multimodal Cardiovascular Intelligence...
[7] Sample Clinical Trial
NCT ID: NCT05942859
Title: Applying Artificial Intelligence to the 12 Lead ECG for the Diagnosis of Pulmonary Hypertension...
Status: ENROLLING_BY_INVITATION
============================================================
MCP demonstration completed successfully
============================================================Running the Web Interface
The project also includes a lightweight browser-based interface.
Start the application with:
python -m uvicorn web_app:app --host 0.0.0.0 --port 8000Then open:
http://localhost:8000The web interface provides a user-friendly way to submit research queries and view evidence without directly interacting with the MCP protocol.
The frontend communicates with the FastAPI backend, which uses the same healthcare research functionality exposed by the MCP server.
Web Interface Architecture
Browser
|
v
frontend/
|
v
FastAPI
(web_app.py)
|
v
Research Workflow
|
+--------+---------+
| |
v v
PubMed ClinicalTrials.gov
| |
+--------+---------+
|
v
Research ResultsThe frontend is intentionally lightweight. It acts as a demonstration and human-facing interface rather than replacing the MCP interface.
Testing
The project includes automated tests for:
Input validation
Research workflow behavior
MCP tool discovery
MCP prompt discovery
MCP resource discovery
MCP client behavior
Run the complete test suite with:
python -m pytest -qCurrent test status:
9 passedValidation
Research queries and result limits are validated before external API requests are performed.
This helps prevent invalid requests from propagating into the research workflow.
Error Handling
External research APIs can fail for reasons outside the application's control.
The project therefore handles:
HTTP request failures
Invalid JSON responses
Missing research fields
Source-specific failures
Invalid user input
The research workflow can distinguish between successful source retrieval and unavailable source information rather than silently inventing results.
Evidence Handling
The project follows several evidence-handling principles:
Prefer retrieved source information over assumptions.
Preserve PMID identifiers for PubMed evidence.
Preserve NCT identifiers for clinical trial evidence.
Clearly distinguish retrieved evidence from interpretation.
Report when an abstract or other field is unavailable.
Do not invent unavailable research findings.
Do not automatically treat retrieved research as proof of causation.
Search results should not be assumed to represent the complete scientific literature.
Clinical trial status can also change over time.
Medical Safety
This project is intended for research assistance and evidence retrieval.
It is not a substitute for:
Professional medical judgment
Clinical diagnosis
Individualized treatment decisions
Regulatory decision-making
Retrieved research should be independently reviewed before being used for clinical or regulatory decisions.
The system does not provide individualized medical advice.
Limitations
Literature Coverage
The system currently focuses on:
PubMed
ClinicalTrials.gov
It does not automatically search every biomedical database or scientific publisher.
Search Completeness
Search results depend on the underlying APIs and query formulation.
A returned set of studies should not be interpreted as a complete systematic review.
Relevance Ranking
ClinicalTrials.gov results receive lightweight local relevance ranking based primarily on query terms appearing in study titles and conditions.
This improves basic relevance but is not equivalent to a sophisticated semantic retrieval system.
Abstract Availability
Some PubMed records may not contain an available abstract.
The application reports unavailable fields rather than generating missing research content.
Clinical Trial Status
Clinical trial status may change after retrieval.
No LLM Synthesis
The core research workflow retrieves and structures evidence. It does not require an LLM to generate or alter the underlying research data.
The research_brief MCP prompt can be supplied to an MCP-compatible AI application for structured synthesis.
Security Considerations
The current project is designed primarily as a local research application.
For production deployment, additional security controls would be appropriate, including:
Authentication
Authorization
Rate limiting
Stronger input restrictions
Secret management
Request logging
Monitoring
Access control
Secure remote MCP transport
The application should follow the principle of least privilege when connected to external systems.
Future Improvements
Potential future enhancements include:
Additional biomedical research sources
More advanced semantic relevance ranking
Research history and saved searches
Citation export
Advanced filtering
LLM-assisted evidence synthesis
Evidence-quality scoring
Systematic-review workflows
Authentication and authorization
Production monitoring
Automated CI/CD
Public deployment
These are future extensions rather than required components of the current implementation.
Project Status
The current implementation includes:
MCP server
Four MCP tools
One MCP prompt
One MCP resource
PubMed integration
ClinicalTrials.gov integration
Multi-source research workflow
Clinical trial relevance ranking
Input validation
Error handling
Automated tests
Standalone MCP demo client
Lightweight web interface
GitHub repository documentation
Current automated test result:
9 passedPublic deployment is not currently included. The web interface is intended to run locally.
Example Research Query
artificial intelligence ECGThe system can retrieve biomedical literature and clinical trial information related to the query while preserving source identifiers for further investigation.
Example source identifiers:
PMID: 42646568
NCT ID: NCT05942859Disclaimer
This project is an educational and research-oriented software system.
It provides structured access to biomedical research information and should not be used as a substitute for qualified medical, scientific, or regulatory expertise.
Always independently review the underlying research sources before making consequential decisions.
License
This project is currently intended as an educational and portfolio project.
Add a formal open-source license if the repository is intended to be distributed or reused under specific licensing terms.
This server cannot be deployed
Maintenance
Related MCP Connectors
Search 36M+ PubMed biomedical articles and ClinicalTrials.gov studies.
Connect AI clients to biomedical data and tools.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Source-traced evidence research for AI agents. We organise the evidence; you decide.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search across multiple academic databases (PubMed, arXiv, bioRxiv, medRxiv, Semantic Scholar) through a unified interface. Supports advanced filtering, metadata retrieval, PDF downloads, and comprehensive research workflows with citation analysis.5-
- AlicenseBqualityDmaintenanceEnables AI assistants to search and retrieve biomedical research articles from PubMed's database of over 35 million citations, including metadata, abstracts, MeSH terms, and full-text PDFs when available.11MIT
- AlicenseBqualityDmaintenanceEnables medical evidence retrieval and analysis via AI-powered search and summarization tools.145 npmMIT
- FlicenseBqualityDmaintenanceEnables AI agents to query free biomedical and pharmaceutical APIs for clinical trials, drug data, molecular structures, adverse events, and research literature.14-