mcpbeat Sign in

Query Opentarget Agent Skill

Query OpenTargets for drug targets, disease associations, and therapeutic evidence. Use when user asks about drug targets, disease mechanisms, target validation, or drug-disease associations. Triggers on "opentarget", "drug target", "target validation", "disease association", "therapeutic target", "drug for disease".

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
132
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/BioTender-max/awesome-bio-agent-skills --skill query-opentarget

The instruction itself

5 sections, as written by the author

OpenTargets Platform Query

Query the OpenTargets Platform GraphQL API for drug-target-disease associations.

When to Use

  • User asks about drug targets for a disease
  • User wants disease-gene associations
  • User asks about drugs targeting a specific gene
  • User wants evidence for target validation

How to Execute

import requests
import json

OPENTARGETS_URL = "https://api.platform.opentargets.org/api/v4/graphql"

def query_opentargets(graphql_query, variables=None):
    payload = {"query": graphql_query, "variables": variables or {}}
    r = requests.post(OPENTARGETS_URL, json=payload, headers={"Content-Type": "application/json"})
    r.raise_for_status()
    return r.json()

# 1. Search for a target (gene)
def search_target(gene_name):
    query = '''
    query searchTarget($name: String!) {
      search(queryString: $name, entityNames: ["target"], page: {index: 0, size: 5}) {
        hits { id name description entity }
      }
    }'''
    return query_opentargets(query, {"name": gene_name})

# 2. Get diseases associated with a target
def target_diseases(ensembl_id, size=10):
    query = '''
    query targetDiseases($ensemblId: String!, $size: Int!) {
      target(ensemblId: $ensemblId) {
        id approvedSymbol approvedName
        associatedDiseases(page: {index: 0, size: $size}) {
          count
          rows { disease { id name } score
            datasourceScores { componentId score } }
        }
      }
    }'''
    return query_opentargets(query, {"ensemblId": ensembl_id, "size": size})

# 3. Get targets for a disease
def disease_targets(disease_id, size=10):
    query = '''
    query diseaseTargets($diseaseId: String!, $size: Int!) {
      disease(efoId: $diseaseId) {
        id name
        associatedTargets(page: {index: 0, size: $size}) {
          count
          rows { target { id approvedSymbol approvedName } score }
        }
      }
    }'''
    return query_opentargets(query, {"diseaseId": disease_id, "size": size})

# 4. Get drugs for a target
def target_drugs(ensembl_id):
    query = '''
    query targetDrugs($ensemblId: String!) {
      target(ensemblId: $ensemblId) {
        id approvedSymbol
        knownDrugs(size: 10) {
          count
          rows { drug { id name } mechanismOfAction phase status
            disease { id name } }
        }
      }
    }'''
    return query_opentargets(query, {"ensemblId": ensembl_id})

# 5. Search diseases
def search_disease(disease_name):
    query = '''
    query searchDisease($name: String!) {
      search(queryString: $name, entityNames: ["disease"], page: {index: 0, size: 5}) {
        hits { id name description entity }
      }
    }'''
    return query_opentargets(query, {"name": disease_name})

# Example: Find top drug targets for Alzheimer's
result = search_disease("Alzheimer")
hits = result.get("data", {}).get("search", {}).get("hits", [])
if hits:
    disease_id = hits[0]["id"]
    targets = disease_targets(disease_id, size=5)
    disease = targets.get("data", {}).get("disease", {})
    print(f"Disease: {disease.get('name')} ({disease.get('id')})")
    for row in disease.get("associatedTargets", {}).get("rows", []):
        t = row["target"]
        print(f"  {t['approvedSymbol']} ({t['approvedName']}) — score: {row['score']:.3f}")

Common Disease IDs (EFO)

  • Alzheimer's: EFO_0000249
  • Breast cancer: EFO_0000305
  • Type 2 diabetes: EFO_0001360
  • Parkinson's: EFO_0002508

Follow-up Suggestions

  • "Want me to check what drugs are in clinical trials for this target?"
  • "Should I look at the evidence breakdown by data source?"
  • "Want me to find the top genetic associations?"

Other skills for the same job

different authors, same section of the catalogue
Biorxiv Database
by christophacham
×4

Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.

9k tokens scripts
Brenda Database
by christophacham
×4

Access BRENDA enzyme database via SOAP API. Retrieve kinetic parameters (Km, kcat), reaction equations, organism data, and substrate-specific enzyme information for biochemical research and metabolic pathway analysis.

36k tokens scripts
Clinpgx Database
by christophacham
×4

Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.

13k tokens scripts
Clinvar Database
by christophacham
×4

Query NCBI ClinVar for variant clinical significance. Search by gene/position, interpret pathogenicity classifications, access via E-utilities API or FTP, annotate VCFs, for genomic medicine.

10k tokens
Cosmic Database
by christophacham
×4

Access COSMIC cancer mutation database. Query somatic mutations, Cancer Gene Census, mutational signatures, gene fusions, for cancer research and precision oncology. Requires authentication.

6k tokens scripts
Ensembl Database
by christophacham
×4

Query Ensembl genome database REST API for 250+ species. Gene lookups, sequence retrieval, variant analysis, comparative genomics, orthologs, VEP predictions, for genomic research.

8k tokens scripts
Fda Database
by christophacham
×4

Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.

32k tokens scripts
Gene Database
by christophacham
×4

Query NCBI Gene via E-utilities/Datasets API. Search by symbol/ID, retrieve gene info (RefSeqs, GO, locations, phenotypes), batch lookups, for gene annotation and functional analysis.

13k tokens scripts

How to use it

Copy the folder

Take biotender-max/query-opentarget from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.