← Back to all apps

Open Targets

Databy OpenTargets

This MCP provides a purpose-built interface and instructions to access and interpret the data and analyses in the Open Targets Platform. The Open Targets Platform is a comprehensive tool that supports systematic identification and prioritisation of potential therapeutic drug targets, integrating publicly available datasets to build and score target-disease associations. It also integrates relevant annotation information about targets, diseases/phenotypes, drugs, variants, GWAS and molecular QTL studies, and credible sets, as well as their most relevant relationships.

4Claude Tools
OpenTargetsDeveloper
DataCategory

Use Cases

datalife-sciences

Available Tools

Open Targets provides 4 tools on Claude.

Batch Query Open Targets Graphql

batch_query_open_targets_graphql
Full Description

Execute the same GraphQL query multiple times with different variable sets.

Use this tool instead of the regular query tool when you need to run the same query repeatedly with different arguments (e.g., querying multiple drugs, targets, or diseases).

WORKFLOW

  • Follow these steps in order:

Step 1: RESOLVE IDENTIFIERS If user provides common names (gene symbols, disease names, drug names), use search_entity tool FIRST to convert them to standardized IDs:

  • Targets/Genes: "BRCA1", "BRCA2" -> ENSEMBL IDs "ENSG00000012048", "ENSG00000139618"
  • Diseases: "breast cancer" -> EFO/MONDO ID "MONDO_0007254"
  • Drugs: "aspirin", "ibuprofen" -> ChEMBL IDs "CHEMBL1201583", "CHEMBL521"
  • Variants: Use "chr_pos_ref_alt" format or rsIDs

Example: search_entity(query_string="BRCA1 BRCA2", entity_names=["target"])

Step 2: LEARN QUERY STRUCTURE Call get_open_targets_graphql_schema to retrieve the full API schema. Study the schema to understand available types, fields, and their relationships, then construct a GraphQL query that fetches the information the user needs.

Step 3: CONSTRUCT AND EXECUTE BATCH QUERY Build GraphQL query and variables_list using:

  • Standardized IDs from Step 1 (REQUIRED)
  • Query patterns from Step 2

Call this tool with query_string, variables_list, and key_field.

REQUIRED IDENTIFIER FORMATS:

  • Targets/Genes: ENSEMBL IDs (e.g., "ENSG00000139618")
  • Diseases: EFO IDs (e.g., "EFO_0000305") or MONDO IDs (e.g., "MONDO_0007254")
  • Drugs: ChEMBL IDs (e.g., "CHEMBL1201583")
  • Variants: "chr_pos_ref_alt" format (e.g., "19_44908822_C_T") or rsIDs (e.g., "rs7412")
  • Studies: Study IDs (e.g., "GCST90002357")
  • Credible Sets: Study Locus IDs (e.g., "7d68cc9c70351c9dbd2a2c0c145e555d")

Args: query_string: The GraphQL query string to execute for all variable sets variables_list: List of variable dictionaries, one per query execution key_field: Variable field name to use as key in results mapping (e.g., "chemblId")

Returns: dict: Results keyed by the specified field value, with execution summary: { "status": "success", "results": { "<key_value>": {"status": "success", "data": ...}, ... }, "summary": {"total": <int>, "successful": <int>, "failed": <int>} }

Parameters (3 required)
Required
key_fieldstring

Variable field to use as result key

query_stringstring

GraphQL query string

variables_listarray

List of variables for each query execution

Get Open Targets Graphql Schema

get_open_targets_graphql_schema
Full Description

Retrieve the Open Targets Platform GraphQL schema.

Fetches the latest schema dynamically from the API using the gql client's built-in schema fetching. Results are cached for 1 hour to reduce API calls.

Returns: str: the schema text in SDL (Schema Definition Language) format.

Query Open Targets Graphql

query_open_targets_graphql
Full Description

Execute GraphQL queries against the Open Targets Platform API.

WORKFLOW

  • Follow these steps in order:

Step 1: RESOLVE IDENTIFIERS If user provides common names (gene symbols, disease names, drug names), use search_entity tool FIRST to convert them to standardized IDs:

  • Targets/Genes: "BRCA2" -> ENSEMBL ID "ENSG00000139618"
  • Diseases: "breast cancer" -> EFO/MONDO ID "MONDO_0007254"
  • Drugs: "aspirin" -> ChEMBL ID "CHEMBL1201583"
  • Variants: Use "chr_pos_ref_alt" format or rsIDs

Example: search_entity(query_string="BRCA2", entity_names=["target"])

Step 2: LEARN QUERY STRUCTURE Call get_open_targets_graphql_schema to retrieve the full API schema. Study the schema to understand available types, fields, and their relationships, then construct a GraphQL query that fetches the information the user needs.

Step 3: CONSTRUCT AND EXECUTE QUERY Build GraphQL query using:

  • Standardized IDs from Step 1 (REQUIRED)
  • Query structure from Step 2

Call this tool with query_string and variables.

REQUIRED IDENTIFIER FORMATS:

  • Targets/Genes: ENSEMBL IDs (e.g., "ENSG00000139618")
  • Diseases: EFO IDs (e.g., "EFO_0000305") or MONDO IDs (e.g., "MONDO_0007254")
  • Drugs: ChEMBL IDs (e.g., "CHEMBL1201583")
  • Variants: "chr_pos_ref_alt" format (e.g., "19_44908822_C_T") or rsIDs (e.g., "rs7412")
  • Studies: Study IDs (e.g., "GCST90002357")
  • Credible Sets: Study Locus IDs (e.g., "7d68cc9c70351c9dbd2a2c0c145e555d")

Args: query_string: GraphQL query starting with 'query' keyword variables: Optional dict or JSON string with query variables

Returns: dict: GraphQL response with data field containing targets, diseases, drugs, variants, studies or error message.

Parameters (1 required, 1 optional)
Required
query_stringstring

GraphQL query string starting with 'query' keyword

Optional
variables

Optional variables for the GraphQL query

Search Entities

search_entities
Full Description

Search for entities across multiple types using the Open Targets Platform search API.

This tool performs a streamlined entity search that returns the id and entity type for up to 3 matching entities across targets, diseases, drugs, variants, and studies.

Supports multiple query strings in a single call - each query is executed independently and results are returned in a dictionary keyed by the query string.

Args: query_strings: List of search queries (e.g., ["BRCA1", "breast cancer", "aspirin"])

Returns: dict: Dictionary mapping each query string to its results (array of up to 3 entities with id and entity fields), or error message if any query fails.

Example: Input: ["BRCA1", "aspirin"] Output: { "BRCA1": [ {"id": "ENSG00000012048", "entity": "target"}, {"id": "EFO_0000305", "entity": "disease"} ], "aspirin": [ {"id": "CHEMBL25", "entity": "drug"} ] }

Parameters (1 required)
Required
query_stringsarray

List of search query strings to find entities (e.g., ['BRCA1', 'breast cancer', 'aspirin'])