| | --- |
| | title: MCP Res |
| | emoji: π |
| | colorFrom: red |
| | colorTo: gray |
| | sdk: docker |
| | sdk_version: 1.46.0 |
| | app_file: app.py |
| | pinned: false |
| | short_description: Research |
| | --- |
| | |
| | MedGenesis AI |
| | MedGenesis AI is a biomedical literature discovery workbench that unifies live data from PubMed, arXiv, MyGene.info, ClinicalTrials.gov v2, DisGeNET, openFDA, Open Targets, DrugCentral, UMLS and moreβthen lets you explore the evidence in a rich Streamlit interface powered by OpenAI or Gemini LLMs. |
| |
|
| |
|
| | ββββββββββββββββββββββββββββββββββββββββββββββ |
| | β Streamlit UI (app.py) β |
| | β β’ Results / Genes / Trials / Graph tabs β |
| | β β’ PDF / CSV export & follow-up Q&A β |
| | ββββββββββββββββ¬ββββββββββββββββββββββββββββββ |
| | β async calls |
| | ββββββββββββββββΌββββββββββββββββββββββββββββββ |
| | β Orchestrator (mcp/orchestrator.py) β |
| | β β’ pulls PubMed, arXiv β |
| | β β’ keyword extraction (spaCy) β |
| | β β’ fans-out to MyGene, CT.gov v2, UMLSβ¦ β |
| | β β’ merges & summarises with LLM β |
| | ββββββββββββββββ¬ββββββββββββββββββββββββββββββ |
| | β helpers (mcp/*.py) |
| | βΌ |
| | ββββββββββββββββββββββββββββββββββββββββββββββ |
| | β External APIs + local TSV (DrugBank) β |
| | ββββββββββββββββββββββββββββββββββββββββββββββ |
| | |
| |
|
| |
|
| | π Features |
| | Domain Source / API What you get |
| | Literature PubMed + arXiv titles, abstracts, authors, year |
| | Gene info MyGene.info + NCBI Gene symbol, name, GO, ClinVar, MeSH definitions |
| | Trials ClinicalTrials.gov v2 NCT ID, phase, status, start date |
| | Disease β gene DisGeNET top associations & scores |
| | Drug safety openFDA, DrugCentral adverse events, approvals, MoA |
| | Graph edges Open Targets GraphQL geneβdisease-drug links (+ OT score) |
| | Ontology UMLS, HPO, Wikidata concept CUI, phenotype look-ups |
| |
|
| | π Quick start |
| | bash |
| | Copy |
| | Edit |
| | # clone repo |
| | git clone https://github.com/your-org/medgenesis.git |
| | cd medgenesis |
| |
|
| | # build & run locally |
| | python -m venv .venv && source .venv/bin/activate |
| | pip install -r requirements.txt |
| | python -m spacy download en_core_web_sm |
| | streamlit run app.py |
| | app.py starts a Streamlit server on localhost:8501. |
| | Enter a biomedical question (e.g. βCRISPR glioblastoma therapyβ) and press Run Search π. |
| | |
| | π³ Docker / Hugging Face Space |
| | The included Dockerfile is CPU-only and downloads the spaCy model at build time: |
| | |
| | bash |
| | Copy |
| | Edit |
| | docker build -t medgenesis . |
| | docker run -p 7860:7860 -e OPENAI_API_KEY=sk-... medgenesis |
| | HF Spaces: push the repo, set the environment secrets below, and Spaces will pick up Dockerfile. |
| | |
| | π Environment variables |
| | Variable Description |
| | OPENAI_API_KEY OpenAI account key (GPT-4o, GPT-4o-mini β¦) |
| | GEMINI_KEY Google Generative AI key (Gemini 1.5 Flash) |
| | UMLS_KEY UMLS Licensing key (ticket auth) |
| | DISGENET_KEY DisGeNET Bearer token (optional) |
| | PUB_KEY NCBI E-utils key (optional, boosts quota) |
| | BIO_KEY NCBI E-utils key for Gene/MeSH (optional) |
| |
|
| | Set them in .env, your shell, or HF Secrets. |
| |
|
| | ποΈ Local data |
| | mcp/data/drugbank_open_structured_drug_links.tsv β DrugBank Open Data |
| | Download from the DrugBank Open-Data page and place it here. |
| |
|
| | The file is lazy-loaded and cached; the app still works without it. |
| |
|
| | π§ͺ Tests |
| | bash |
| | Copy |
| | Edit |
| | pytest tests/ |
| | Unit tests mock external APIs and verify parsing, caching and orchestrator merges. |
| |
|
| | π οΈ Contributing |
| | Fork & create a feature branch. |
| |
|
| | Follow Conventional Commits for PR titles. |
| |
|
| | Run pre-commit install to auto-format with black & ruff. |
| |
|
| | Submit a PR; GitHub Actions will run lint + tests. |
| |
|
| | π License |
| | Apache 2.0 β free for research and commercial use. |
| | API terms of each external provider still apply. |
| |
|
| | Happy discovering! |