Skip to main content
Glama
opentargets

Open Targets Platform MCP

Official
by opentargets

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OTP_MCP_HTTP_HOSTNoHTTP server host (only used with http transport)localhost
OTP_MCP_HTTP_PORTNoHTTP server port (only used with http transport)8000
OTP_MCP_TRANSPORTNoTransport type: stdio or httphttp
OTP_MCP_JQ_ENABLEDNoEnable jq filtering supportfalse
OTP_MCP_SERVER_NAMENoServer name displayed in MCPModel Context Protocol server for Open Targets Platform
OTP_MCP_API_ENDPOINTNoOpen Targets Platform API endpoint URLhttps://api.platform.opentargets.org/api/v4/graphql
OTP_MCP_API_CALL_TIMEOUTNoRequest timeout in seconds for API calls30
OTP_MCP_RATE_LIMITING_ENABLEDNoEnable rate limitingfalse

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_open_targets_graphql_schemaA

Retrieve the Open Targets Platform GraphQL schema filtered by category.

You MUST specify one or more categories to retrieve the relevant schema subset. Categories group related GraphQL types into coherent subschemas (e.g., 'drug-mechanisms', 'genetic-associations', 'target-safety').

The returned schema includes types from the specified categories plus their dependencies expanded.

Available categories:

  • cancer-genomics: Cancer-specific genomic evidence from Cancer Gene Census, IntOGen, cancer biomarkers databases, and cancer hallmarks. Identifies cancer driver genes and somatic mutations.

  • clinical-genetics: Clinical genetics databases and rare disease evidence from ClinGen, ClinVar, Genomics England PanelApp, Orphanet, and Gene2Phenotype. Provides clinical validity of gene-disease relationships, pathogenic variants, and clinical genomics panels.

  • comparative-genomics: Cross-species comparative genomics and orthology relationships for leveraging model organism data. Shows evolutionary conservation and functional predictions based on homology.

  • disease-associations: Target-disease association evidence and target prioritisation, integrating evidence across multiple data types. Shows the strength of association between genes/targets and diseases and the target prioritisation factors that can be used to prioritise targets for further investigation.

  • disease-phenotypes: Disease phenotypes, symptoms, and ontology for understanding clinical manifestations, disease classifications, and relationships between different conditions.

  • drug-indications: Approved and investigational drug indications, clinical trial phases, mechanism-based predictions for drug repurposing, and known drug-disease relationships.

  • drug-mechanisms: Drug mechanisms of action and target interactions from ChEMBL, including drug-target relationships, polypharmacology profiles, and molecular mechanisms of therapeutic effects.

  • drug-safety: Post-market drug safety and pharmacovigilance data from FDA FAERS, including adverse events, drug warnings, and safety alerts for approved medications.

  • entity-search: Cross-entity search and entity discovery across all entity types with keyword search capabilities. Enables finding targets, diseases, drugs, variants, and studies by name or identifier.

  • experimental-models: Experimental model organism data including CRISPR knockout screens, mouse phenotypes from IMPC, cancer cell line dependency from DepMap, and chemical probes. Provides functional validation data from laboratory experiments.

  • functional-genomics: Gene expression, biological pathways, and systems biology data from Expression Atlas, Reactome, Gene Ontology. Provides context on gene function, regulation, and pathway involvement.

  • genetic-associations: Genome-wide association studies (GWAS) and molecular QTL associations. Returns GWAS summary statistics, shared trait studies, and disease-associated genetic variants from population-scale studies. Fine-mapping results and credible set analysis from GWAS and QTL studies. Includes locus-to-gene predictions, colocalization analyses, and probabilistic identification of causal variants.

  • genetic-constraint: Genetic constraint metrics. Measures selection pressure on genes including loss-of-function intolerance, showing which genes are essential for survival.

  • literature-evidence: Scientific literature and bibliographic data, including disease and drug bibliographies. Supports text-mined evidence and citation networks.

  • molecular-interactions: Protein-protein interactions and molecular networks for understanding biological context, cellular pathways, and functional relationships between biomolecules.

  • pharmacogenomics: Genetic variation affecting drug response, including gene-drug interactions, genotype-dependent efficacy or toxicity, and personalized medicine applications.

  • platform-metadata: Platform metadata including version information, data release prefix, and metadata on all downloadable datasets. Also includes metadata on Open Targets (OTAR) projects (if available).

  • protein-information: Protein abundances and subcellular localization data.

  • target-safety: Target safety liabilities and toxicity predictions based on adverse events, animal toxicology, and clinical safety flags. Assesses potential risks of modulating a therapeutic target.

  • target-tractability: Target druggability and tractability assessments, including small molecule and antibody tractability predictions. Evaluates the likelihood of successfully developing drugs against a target.

  • variant-annotation: Variant functional annotation and population genetics. Includes variant effect predictions (VEP), European Variation Archive data, UniProt variant annotations, and predicted functional consequences of genetic variation.

Args: categories (list[str]): List of category names to filter the schema. Returns only types relevant to the specified categories. (examples: ['drug-mechanisms'], ['target-safety', 'drug-safety'])

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

get_type_dependenciesA

Get schema subsets for types, separated by specific and shared deps.

Given a list of type names, returns SDL (Schema Definition Language) organized into type-specific dependencies and shared dependencies.

Args: type_names (list[str]): List of GraphQL type names to start exploration from. (examples: ['Target', 'Drug'])

Returns: (dict[str, str]): Dictionary with one key per input type: SDL for types ONLY reachable from that type and 'shared' key: SDL for types reachable from multiple input types.

search_entitiesA

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[str]): List of search queries. (examples: ['BRCA1', 'aspirin'])

Returns: (dict[str, list[SearchEntitiesFoundEntity]]): Top 3 hits for each query string, with entity ID and type.

query_open_targets_graphqlA

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 with relevant categories to retrieve the schema subset needed for your query. Select categories that cover the data domains you need - BE INCLUSIVE (it's better to include extra categories than to miss required types).

Example: For a query about drug mechanisms and safety:
get_open_targets_graphql_schema(categories=["drug-mechanisms", "drug-safety"])

Study the returned schema to understand available types, fields, and their
relationships, then construct a GraphQL query that fetches the information
the user needs.

FALLBACK: If you encounter errors or need detailed information about specific
types, use `get_type_dependencies` sparingly to explore type relationships.
This tool provides exhaustive type dependency information but should only be
used when category-based retrieval is insufficient.

Step 3: CONSTRUCT AND EXECUTE QUERY Build GraphQL query using: - Standardized IDs from Step 1 (REQUIRED) - Query structure from Step 2 - Follow the "COMMON MISTAKES TO AVOID" guidance in the schema output

Call this tool with query_string and optional 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 (str): GraphQL query string starting with 'query' keyword. variables (UnionType[dict[str, Any], None]): Optional dict or JSON string with query variables.

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

batch_query_open_targets_graphqlA

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 with relevant categories to retrieve the schema subset needed for your query. Select categories that cover the data domains you need - BE INCLUSIVE (it's better to include extra categories than to miss required types).

Example: For a query about drug mechanisms and safety:
get_open_targets_graphql_schema(categories=["drug-mechanisms", "drug-safety"])

Study the returned schema to understand available types, fields, and their
relationships, then construct a GraphQL query that fetches the information
the user needs.

FALLBACK: If you encounter errors or need detailed information about specific
types, use `get_type_dependencies` sparingly to explore type relationships.
This tool provides exhaustive type dependency information but should only be
used when category-based retrieval is insufficient.

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 - Follow the "COMMON MISTAKES TO AVOID" guidance in the schema output

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 (str): The GraphQL query string to execute for all variable sets. variables_list (list[dict[str, Any]]): List of variable dictionaries, one per query execution. key_field (str): Variable field name to use as key in results mapping.

Returns: (BatchQueryResult): Results keyed by the specified field value, with execution summary.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 5 tools

Disambiguation4/5

The two schema-discovery tools (get_open_targets_graphql_schema and get_type_dependencies) overlap somewhat, but their category-based versus type-based approaches are clearly described. The search, query, and batch-query tools have distinct purposes and are unlikely to be confused.

Naming Consistency4/5

Tool names are consistently snake_case and mostly verb-first, but the convention mixes get_, search_, query_, and batch_query_ prefixes, and the long open_targets_graphql descriptor appears inconsistently. The docs also reference search_entity while the actual tool is search_entities.

Tool Count5/5

Five tools is well-scoped for a read-only GraphQL data platform: schema discovery, type dependency exploration, entity search, single query execution, and batch query execution each serve a necessary role without redundancy or bloat.

Completeness5/5

The toolset covers the full workflow: search to resolve identifiers, schema introspection to learn query structure, single-query execution, and batch execution for repeated queries. There are no obvious missing operations for the stated purpose of interacting with the Open Targets Platform API.

Maintenance

ActivityInactive
ResponsivenessWithin a week