Learn to interact with AI assistants using real-world medical and pharmaceutical data through Model Context Protocol (MCP) servers.
- Interact with AI Chat in VSCode - Use GitHub Copilot Chat with specialized MCP servers
- Query PubMed - Search and analyze medical literature using natural language
- Access FDA Data - Query drug information, adverse events, recalls, and medical device data
Click the "Open in GitHub Codespaces" button above or:
- Fork this repository
- Click the green "Code" button
- Select "Create codespace on main"
The environment will automatically set up with:
- Python 3.11
- Node.js 20
- GitHub Copilot extensions
- Both MCP servers (PubMed and OpenFDA)
After the Codespace launches, add the MCP servers through VS Code:
-
Open Command Palette: Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS) -
Run Add MCP Server: Type
MCP: Add MCP Serverand select the command -
Choose Connection Type: Select
stdio -
Add PubMed Server:
- Command:
bash - Args:
-c "source /workspaces/CC/mcp-servers/pubmearch/.venv/bin/activate && python -m pubmearch.server" - Target: Workspace
- Command:
-
Add OpenFDA Server:
- Command:
bash - Args:
-c "node /workspaces/CC/mcp-servers/OpenFDA-MCP-Server/build/index.js" - Target: Workspace
- Command:
Create a .env file from the template:
cp .env.example .envEdit .env and add your API keys:
# PubMed API (Required)
export NCBI_USER_EMAIL="your_email@example.com"
export NCBI_USER_API_KEY="your_api_key"
# FDA API (Optional - increases rate limit)
export FDA_API_KEY="your_fda_key"PubMed API Key (Required):
- Go to NCBI Account Settings
- Log in or create an account
- Scroll to "API Keys" section
- Click "Create API Key"
FDA API Key (Optional - increases rate limit from 1,000 to 120,000 requests/hour):
- Visit openFDA Authentication
- Sign up for an API key
Open GitHub Copilot Chat (Ctrl+Shift+I or Cmd+Shift+I) and try these example prompts.
Tip: Use #pubmed or #openfda at the start of your message to tell the AI which MCP server to use.
#pubmed Find recent studies about diabetes treatment
#pubmed What are the latest papers on Alzheimer's disease?
#pubmed Show me research trends for COVID-19 vaccines
#pubmed Search for studies about heart disease prevention published in the last year
#pubmed Find papers about cancer immunotherapy from 2024
#pubmed What's the latest research on obesity and mental health?
#pubmed Search for studies comparing different diabetes medications
#pubmed Find research about sleep disorders and their treatments
#openfda Find side effects reported for ibuprofen
#openfda What adverse events have been reported for insulin?
#openfda Show me recent drug recalls
#openfda Find all FDA-approved medications for high blood pressure
#openfda What drugs were recalled due to contamination?
#openfda Search for adverse events related to pacemakers
#openfda Find information about diabetes medications made by Novo Nordisk
#openfda What are the reported side effects of aspirin?
#openfda Show me drug shortages for antibiotics
#openfda Find recalls of medical devices in the last 6 months
Query and analyze medical literature from PubMed.
Features:
- Literature search with advanced syntax
- Research hotspot analysis
- Trend tracking over time
- Publication count statistics
- Comprehensive reports
Tools Available:
search_pubmed- Search PubMed databaseanalyze_research_keywords- Identify research hotspotsanalyze_publication_count- Track publication trendsgenerate_comprehensive_analysis- Full analysis reports
Access FDA databases for drugs and medical devices.
Features:
- Drug adverse event reports (FAERS)
- Drug labeling information
- Drug recalls and shortages
- FDA-approved drugs database
- Medical device data (510k, classifications, adverse events)
Tools Available:
search_drug_adverse_events- FAERS datasearch_drug_labels- Product labelingsearch_drug_ndc- National Drug Code directorysearch_drug_recalls- Recall enforcementsearch_drugs_fda- FDA-approved drugssearch_drug_shortages- Current shortagessearch_device_510k- Device clearancessearch_device_adverse_events- Device adverse events
.
├── .devcontainer/ # Codespaces configuration
│ ├── devcontainer.json # Container settings
│ └── post-create.sh # Setup script
├── .vscode/
│ └── mcp.json # MCP server configuration
├── .env.example # API keys template
├── .env # Your API keys (create from template)
├── mcp-servers/ # MCP server installations (auto-generated)
│ ├── pubmearch/ # PubMed MCP server
│ └── OpenFDA-MCP-Server/ # FDA MCP server
└── README.md # This file
PubMed supports advanced search queries:
# Search in specific fields
diabetes[Title/Abstract]
# Combine terms
(prostat*[Title/Abstract]) AND (cancer[Title/Abstract]) AND (immuno*[Title/Abstract])
# Date ranges
cancer[Title] AND ("2023/01/01"[PDAT] : "2023/12/31"[PDAT])
FDA queries support detailed filtering:
Find drug adverse events for:
- Drug: aspirin
- Country: United States
- Date range: 2023-01-01 to 2023-12-31
- Serious events only: true
Both MCP servers can generate comprehensive analysis reports:
Generate a comprehensive analysis of COVID-19 vaccine research from the past 6 months
Problem: "Authentication failed" or "Rate limit exceeded"
Solution:
- Verify
.envfile exists and contains correct API keys - For PubMed, ensure both
NCBI_USER_EMAILandNCBI_USER_API_KEYare set - Save the file - changes take effect immediately
Problem: Chat doesn't recognize PubMed/FDA queries
Solution:
- Check
.envfile exists with your API keys - Verify the MCP servers were installed:
ls -la mcp-servers/
- Try using the
#pubmedor#openfdaprefix in your message
- Model Context Protocol Documentation
- PubMed Search Tips
- OpenFDA API Documentation
- GitHub Copilot Chat Documentation
- PubMed MCP Server: darkroaster/pubmearch
- OpenFDA MCP Server: Augmented-Nature/OpenFDA-MCP-Server
This educational project is provided as-is for learning purposes.
Note: This tool provides access to public medical datasets. Always consult healthcare professionals for medical decisions and drug information.