| # mcp/cbio.py | |
| from functools import lru_cache | |
| from mcp.clients import BaseClient | |
| class CbioClient(BaseClient): | |
| def __init__(self): | |
| super().__init__("https://www.cbioportal.org/api", None) | |
| async def fetch_variants(self, gene: str, profile: str="brca_tcga_pan_can_atlas_2018_mutations"): | |
| path = f"molecular-profiles/{profile}/genes/{gene}/mutations?projection=SUMMARY" | |
| return await self.request("GET", path) | |
| cbio = CbioClient() | |