drug-pipeline-mcp
by DasClown
README.md
# š drug-pipeline-mcp
[](https://github.com/DasClown/drug-pipeline-mcp/actions/workflows/ci.yml)
[](https://github.com/DasClown/drug-pipeline-mcp/actions/workflows/ci.yml)
[](https://ghcr.io/dasclown/drug-pipeline-mcp)
[](https://smithery.ai/servers/crop-mcp/drug-pipeline)
[](https://www.python.org/downloads/)
[](LICENSE)
[](https://pypi.org/project/drug-pipeline-mcp/)
[](https://github.com/DasClown/drug-pipeline-mcp/stargazers)
**Pharmaceutical R&D Pipeline Intelligence for AI Agents** ā a lightweight MCP server that aggregates clinical trial data, FDA/EMA approvals, safety surveillance (FAERS), drug labels, patents, drug interactions, recalls, and publications through a unified API. Every output includes a verifiable source identifier (NCT ID, FDA Application Number, or PMID).
Not a replacement for IQVIA/EvaluatePharma. A real-time, publicly accessible intelligence layer that complements subscription databases.
---
## Quick Start
```bash
pip install git+https://github.com/DasClown/drug-pipeline-mcp.git
# Start MCP server (stdio)
drug-pipeline
# Or HTTP mode for remote access
pip install drug-pipeline-mcp[http]
drug-pipeline --http --port 8081
```
Or deploy via [Smithery](https://smithery.ai/servers/crop-mcp/drug-pipeline) ā one click, no config.
---
## Tools (28)
| Tool | What it does | Data Source |
|------|-------------|-------------|
| `search_trials` | Search clinical trials by condition, phase, status, sponsor | ClinicalTrials.gov |
| `get_trial_detail` | Full protocol for a specific NCT (eligibility, outcomes, locations) | ClinicalTrials.gov |
| `get_trial_results` | Trial outcomes ā endpoints, adverse events, participant flow | ClinicalTrials.gov |
| `get_trial_sites` | Trial site locations ā facilities, countries, geo distribution | ClinicalTrials.gov |
| `lookup_drug` | Drug info: active ingredients, strength, ATC classification, NDC | openFDA + RxNorm |
| `get_approvals` | FDA approval history with submission dates and status | openFDA Drugs@FDA |
| `get_eu_approvals` | EU/EMA authorization ā brand names, ATC, status, orphan/biosimilar flags | EMA Daily XLSX |
| `get_safety_data` | FAERS adverse event reports ā top reactions, serious outcomes, total count | openFDA FAERS |
| `detect_safety_signals` | Disproportionality screening (exploratory) ā AE reporting ratios | openFDA FAERS |
| `get_drug_label` | FDA prescribing info ā indications, boxed warnings, contraindications, dosing | openFDA Drug Labeling |
| `get_dailymed_label` | NIH drug label (OTC + Rx) ā SPL set ID, version, DailyMed URL | DailyMed (NIH/NLM) |
| `get_recalls` | FDA drug recalls ā Class I/II/III, reasons, dates, firms | openFDA Enforcement |
| `get_patent_expiry` | Patent & exclusivity ā approval dates, market exclusivity estimates | openFDA |
| `get_drug_interactions` | Drug-drug interactions ā FDA label + FAERS co-reported drugs | openFDA Labeling + FAERS |
| `get_drug_pricing` | US drug product ID ā NDC codes, manufacturers, strength, form | openFDA NDC Directory |
| `get_opentargets_drug` | Drug-target MOA ā mechanisms, targets, clinical stage, drug type | Open Targets (EMBL-EBI) |
| `get_us_orphan_designations` | US FDA Orphan Drug Designations ā indication, status, exclusivity | MyChem.info |
| `approved_for_condition` | Find drugs by indication ā which are EU-approved for a condition | EMA Daily XLSX |
| `list_orphan_drugs` | EU orphan drug designations ā filter by therapeutic area | EMA Daily XLSX |
| `list_biosimilars` | EU biosimilars ā filter by condition / therapeutic area | EMA Daily XLSX |
| `list_loss_of_exclusivity` | LOE timing ā biosimilar competition by active substance | EMA + FDA |
| `company_pipeline` | Company R&D ā trials grouped by phase + EU approval enrichment | ClinicalTrials.gov + EMA |
| `search_publications` | PubMed search for drug/trial publications | PubMed / NCBI |
| `find_investigators` | KOL / PI search ā investigators by condition or drug | ClinicalTrials.gov + PubMed |
| `detect_combination_therapies` | Combination therapy detection ā co-administered drugs in trials | ClinicalTrials.gov |
| `compare_drugs` | Head-to-head ā FDA, EU, MOA, safety, patent across 2 drugs | Composite |
| `drug_pipeline` | **Composite** ā drug info + FDA + EU + safety + label + signals + recalls + interactions + trials + pubs + patent | All sources |
| `pipeline_landscape` | **Full pipeline for a condition** ā approved + Phase 3/2/1 + mechanisms + sponsors + pubs | Composite |
> ā ļø **`detect_safety_signals`**: Exploratory disproportionality screening ā uses an approximate denominator, not a validated PRR. Not for regulatory or clinical use. See methodology note in code.
---
## Architecture
```
drug-pipeline-mcp/
āāā drug_pipeline/
ā āāā __init__.py # Version
ā āāā server.py # MCP server (28 tools)
ā āāā sources.py # Data source fetchers (API aggregation layer)
āāā drug_pipeline_cli.py # CLI entry point
āāā tests/ # 61 unit tests (pytest)
āāā pyproject.toml
āāā README.md
```
**Design philosophy:** Lightweight API aggregation. No caching layer. No ML models. No predictions. Each tool makes real-time requests to a public API and returns structured data with source identifiers. The server is intentionally simple ā it extracts, structures, and annotates, nothing more.
**Limitations by design:**
- Rate limits apply per source (openFDA: 10 req/sec, ClinicalTrials.gov: generous)
- EMA data sourced from a daily-updated XLSX register ā format changes monitored manually
- FAERS data is spontaneous reporting, not incidence rates
- The server does not interpret, predict, or synthesize beyond what the sources provide
---
## Data Sources
| Source | Data | Access |
|--------|------|--------|
| ClinicalTrials.gov | 500K+ studies, phases, status, eligibility, results, site locations | ā
Always free |
| openFDA NDC Directory | Drug product ID, NDC codes, manufacturers | ā
Always free |
| openFDA FAERS | Adverse event reports, reactions, serious outcomes | ā
Always free |
| openFDA Drug Labeling | Prescribing info, interactions, contraindications | ā
Always free |
| openFDA Drugs@FDA | Approval history, submissions, orphan designations | ā
Always free |
| openFDA Enforcement | Recalls, market withdrawals, safety alerts | ā
Always free |
| RxNorm / RxNav | Drug identifiers, RxCUI, ATC classification | ā
Always free |
| PubMed / NCBI | Scientific publications, abstracts, PMIDs | ā
Always free |
| EMA Medicines Register | EU authorization status, ATC, orphan/biosimilar flags | ā
Always free |
| Open Targets (EMBL-EBI) | Drug-target mechanisms of action, clinical development stage | ā
Always free |
| DailyMed (NIH/NLM) | Drug labels (OTC + Rx), structured product labeling | ā
Always free |
| MyChem.info | US FDA Orphan Drug Designations | ā
Always free |
**All sources are publicly funded and freely accessible.** No API keys, subscriptions, or licensing required.
---
## Verifiable Outputs
Every data point includes a direct link to its primary source:
| Output Field | Example Source URL |
|-------------|-------------------|
| NCT ID | `https://clinicaltrials.gov/study/NCT03178617` |
| FDA Application Number | `https://www.accessdata.fda.gov/scripts/cder/daf/index.cfm?event=overview.process&ApplNo=NDA125456` |
| PMID | `https://pubmed.ncbi.nlm.nih.gov/37272535/` |
| FDA Product NDC | `https://www.accessdata.fda.gov/scripts/cder/ndc/` |
| DailyMed SPL Set ID | `https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=xxx` |
No calculated fields. No predictions. No estimates. The tool is an aggregator, not an oracle ā it brings primary-source data into an AI agent's context so the LLM can apply reasoning, not so the server can produce answers.
---
## Testing & Quality
| Check | Status |
|-------|--------|
| Unit tests | ā
61 passing (pytest) |
| CI/CD | ā
Multi-Python matrix (3.10ā3.13), Docker build, PyPI publish |
| Linting | ā
Ruff (zero warnings) |
| Formatting | ā
Black-compatible |
| Code coverage | Tracked in CI |
---
## Regulatory Intelligence
Beyond drug-level approvals, this project provides **multi-jurisdiction regulatory framework intelligence** for pipeline analysis. See [`docs/local-regulation-2026.md`](docs/local-regulation-2026.md) for a comprehensive reference covering 7 jurisdictions:
- šŗšø **US IRA** ā Medicare Part D price negotiation (Sep 2026), Small Molecule Penalty (7 yr vs 13 yr)
- š©šŖ **Germany AMNOG** ā Benefit assessment, 2026 reform with fixed effect-size thresholds
- š«š· **France HAS/CEPS** ā SMR/ASMR ratings, 400ā600 day access timelines
- š®š¹ **Italy AIFA** ā 21 regional formularies, payback mechanisms
- š¬š§ **UK MHRA/NICE** ā Post-Brexit ILAP pathway, Ā£/QALY thresholds
- šÆšµ **Japan PMDA/NHI** ā Sakigake designation, biennial price revision
- šØš³ **China NMPA/NRDL** ā Annual ā61% price negotiation
---
## Example Agent Queries
> *"What's in the pipeline for GLP-1 agonists?"*
ā `drug_pipeline(drug_name="semaglutide")` ā ATC class, FDA status, clinical trials, publications
> *"Which companies have Phase 3 trials for non-small cell lung cancer?"*
ā `search_trials(condition="non-small cell lung cancer", phase="PHASE3", status="RECRUITING")`
> *"Is pembrolizumab approved in the EU vs US?"*
ā `get_approvals(drug_name="Keytruda")` + `get_eu_approvals(drug_name="Keytruda")`
> *"What are the safety signals for semaglutide?"*
ā `get_safety_data(drug_name="semaglutide")` + `detect_safety_signals(drug_name="semaglutide")`
> *"What does the label say for Keytruda?"*
ā `get_drug_label(drug_name="Keytruda")` ā indications, boxed warnings, contraindications, dosing
> *"When does the patent for Keytruda expire?"*
ā `get_patent_expiry(drug_name="Keytruda")` ā exclusivity information
> *"What drugs are approved for non-small cell lung cancer in the EU?"*
ā `approved_for_condition(condition="non-small cell lung cancer")`
---
## Client Integration
### Claude Desktop
```json
{
"mcpServers": {
"drug-pipeline": {
"command": "python3",
"args": ["-m", "drug_pipeline.server"]
}
}
}
```
### Cursor / VS Code
```json
{
"mcpServers": {
"drug-pipeline": {
"command": "uvx",
"args": ["drug-pipeline-mcp"]
}
}
}
```
### HTTP / SSE (Remote)
```bash
pip install drug-pipeline-mcp[http]
drug-pipeline --http --port 8081
```
Connect at `http://your-server:8081/sse`.
### Smithery
[One-click deploy](https://smithery.ai/servers/crop-mcp/drug-pipeline). No config needed.
---
## š¤ Getting Help & Contributing
| Channel | Purpose |
|---------|---------|
| **[š¬ GitHub Discussions](https://github.com/DasClown/drug-pipeline-mcp/discussions)** | Questions before coding, feature ideas, community chat |
| **[š GitHub Issues](https://github.com/DasClown/drug-pipeline-mcp/issues)** | Bug reports, confirmed feature requests |
| **[š CONTRIBUTING.md](CONTRIBUTING.md)** | Development setup, code style, testing |
New contributors welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions.
---
## License
MITThis server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessUnresponsive