File size: 397 Bytes
758d4b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# mcp/hpo.py
"""
Human Phenotype Ontology quick lookup.
"""

import httpx
from typing import Dict

BASE = "https://hpo.jax.org/api/hpo/term/"

async def get_hpo(term_id: str) -> Dict:
    """Fetch HPO term details by ID (e.g., HP:0001250)."""
    async with httpx.AsyncClient(timeout=15) as client:
        r = await client.get(BASE + term_id)
        r.raise_for_status()
        return r.json()