opentargets-mcp
An MCP server that exposes the Open Targets Platform GraphQL API as 68 tools for querying biomedical target, disease, drug, variant, and study data from AI clients like Claude Desktop.
Target analysis (20 tools) — profile genes/proteins by Ensembl ID: identity, class, synonyms, associated diseases, known drugs, expression, pathways/GO terms, homologues, subcellular locations, genetic constraint, mouse phenotypes, cancer hallmarks, DepMap essentiality, interactions, safety, tractability, chemical probes, TEPs, and prioritization scores.
Disease analytics (8 tools) — query diseases by ontology ID (mostly MONDO): core metadata, associated targets, HPO phenotypes, OTAR projects, known drugs, ontology structure, literature, and semantically similar diseases.
Drug profiling (10 tools) — query drugs by ChEMBL ID: identity/mechanism, cross-references, linked diseases and targets, adverse events, pharmacovigilance, regulatory warnings, pharmacogenomics, literature, and similar drugs.
Evidence synthesis (2 tools) — mine scored target–disease evidence strings across genetics, expression, and literature, plus biomarker annotations.
Variant interpretation (6 tools) — variant metadata, credible sets, pharmacogenomics, evidence, E2G intervals, and protein-level coordinates.
Study exploration (6 tools) — GWAS study metadata, studies by disease, study credible sets, credible-set lookup, colocalisation, and filtered credible-set queries.
Search & discovery (4 tools) — unified entity search with synonym resolution, autocomplete suggestions, similar targets, and faceted search counts.
Metadata & utilities (5 tools) — API release metadata, association datasources, GO term resolution, interaction resources, and free-text-to-ID mapping.
Workflow tool (1) —
get_drug_repurposing_candidateschains disease → target → drug evidence to prioritize repurposing candidates.Batch lookups (3 tools) — retrieve many targets, diseases, or drugs in one request.
Raw GraphQL power tools (3) — inspect the schema, run single or batch raw queries for edge cases.
Practical extras — optional
fieldsfilters to trim responses, pagination guardrails, strict ID resolution with clear errors, retry behavior, and stdio/SSE/HTTP transports with configurable rate limiting.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@opentargets-mcp What are the targets for type 2 diabetes?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Open Targets MCP Server
A read-only MCP server for exploring targets, diseases, drugs and genetic evidence through the Open Targets Platform. Use names or IDs, retrieve supporting evidence, and explore drug-repurposing candidates. No Open Targets API key required.
Install
Requires uv.
Claude Code
claude mcp add opentargets -- uvx opentargets-mcpClaude Desktop and Cursor: add this to claude_desktop_config.json (Settings → Developer → Edit Config) or ~/.cursor/mcp.json, then restart:
{
"mcpServers": {
"opentargets": {
"command": "uvx",
"args": ["opentargets-mcp"]
}
}
}VS Code
code --add-mcp '{"name":"opentargets","command":"uvx","args":["opentargets-mcp"]}'Codex
codex mcp add opentargets -- uvx opentargets-mcpAny other stdio MCP client works the same way: command uvx, argument opentargets-mcp.
Tips:
If the client reports
spawn uvx ENOENT, use the full path fromwhich uvx.Use
opentargets-mcp@latestas the argument to pick up new releases.On Apple Silicon, a
cryptographybuild error can indicate uv picked an Intel (Rosetta) Python.uv python findis a first clue; cached tool environments and desktop clients may use a different interpreter.
Related MCP server: OpenTargets MCP Server
What you can ask
"Which drugs target EGFR, and how far along are they?"
"Which genes are most strongly associated with asthma?"
"Show the evidence linking BRAF to melanoma."
"Suggest drug repurposing candidates for type 2 diabetes."
Use names or IDs: gene symbols, disease and drug names, rsIDs, or Ensembl, MONDO and ChEMBL IDs. If a name matches several entities, the tool lists the candidates so you can pick one.
Tools
68 tools. Run uvx opentargets-mcp --list-tools for the full list.
Area | Examples |
Targets |
|
Diseases |
|
Drugs |
|
Evidence |
|
Variants and studies |
|
Search and lookup |
|
Workflow |
|
Raw GraphQL |
|
Many tools accept fields (dot-paths such as ["target.approvedSymbol"]) to return only what you need. For anything the curated tools don't cover, use graphql_query.
Evidence results include datasource IDs and PubMed references where available. Use get_api_metadata to record the Open Targets API and data release with your analysis. clinicalReportCount counts report records, not unique trials; use graphql_query for full reports.
How it works
flowchart LR
A(["AI agent<br/>Claude · Codex · VS Code · Cursor"])
subgraph S["opentargets-mcp"]
direction TB
S1["1. Resolve names to IDs"]
S2["2. Run read-only queries"]
S3["3. Return structured JSON"]
S1 --> S2 --> S3
end
subgraph O["Open Targets Platform"]
direction TB
API["GraphQL API"]
DB[("ChEMBL · GWAS Catalog<br/>ClinVar · Europe PMC · more")]
API --- DB
end
A <-->|MCP| S
S <-->|GraphQL| O
classDef client fill:#e8f0fe,stroke:#4285f4,color:#1f2328
classDef step fill:#ffffff,stroke:#34a853,color:#1f2328
classDef data fill:#ffffff,stroke:#f9ab00,color:#1f2328
class A client
class S1,S2,S3 step
class API,DB data
style S fill:#e6f4ea,stroke:#34a853,color:#1f2328
style O fill:#fef7e0,stroke:#f9ab00,color:#1f2328Ask in plain language; the server turns names into Open Targets IDs, runs read-only queries and returns structured results. No API key needed.
Configuration
The defaults work for local use. To change them, set environment variables or pass flags (uvx opentargets-mcp --help):
Variable | Flag | Default |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Proxies are read from HTTPS_PROXY, HTTP_PROXY and NO_PROXY.
Self-host
From source:
git clone https://github.com/nickzren/opentargets-mcp
cd opentargets-mcp
uv run opentargets-mcpWith Docker (HTTP on port 8000), from the clone:
docker compose up -d --buildConnect your MCP client to http://localhost:8000/mcp.
Development
uv sync --extra dev
uv run ruff check src tests
uv run pytest -m "not live" # offline
uv run pytest -m live # calls the Open Targets APIExample scripts are in examples/.
License
Available Tools
68 toolsget_api_metadataARead-only
Return Open Targets Platform release metadata.
Inputs: no named parameters. Returns: object
get_association_datasourcesARead-only
List sources contributing target–disease association evidence.
Inputs: no named parameters. Returns: object
get_credible_set_by_idBRead-only
Fetch detailed information for a specific study locus credible set.
Inputs: study_locus_id (required). Returns: object
get_credible_set_colocalisationBRead-only
Retrieve colocalisation results for a credible set.
Inputs: study_locus_id (required), page_size, page_index. Returns: object
get_credible_setsCRead-only
Query credible sets with flexible filtering options.
Inputs: fields, regions, page_size, study_ids, +4 more. Returns: object
get_disease_associated_targetsBRead-only
List targets associated with a disease, including evidence scores.
Inputs: efo_id (required), fields, page_size, page_index. Returns: object
get_disease_infoBRead-only
Retrieve core metadata for an Open Targets disease entity.
Inputs: efo_id (required), fields. Returns: object
get_disease_known_drugsARead-only
Retrieve drugs with investigational or approved indications for a disease.
Inputs: efo_id (required), size, cursor, free_text_query. Returns: object
get_disease_literature_occurrencesCRead-only
Return literature co-occurrence records mentioning a disease.
Inputs: efo_id (required), size, cursor, end_year, +4 more. Returns: object
get_disease_ontologyARead-only
Retrieve ontology structure for a disease including parents, children, and ancestors.
Inputs: efo_id (required). Returns: object
get_disease_otar_projectsARead-only
List Open Targets Associated Research (OTAR) projects linked to a disease.
Inputs: efo_id (required). Returns: object
get_disease_phenotypesBRead-only
Fetch HPO phenotype annotations linked to a disease.
Inputs: efo_id (required), page_size, page_index. Returns: object
get_diseases_batchCRead-only
Retrieve multiple diseases in a single request.
Inputs: efo_ids (required). Returns: object
get_disease_similar_entitiesARead-only
Find semantically similar diseases based on PubMed embeddings.
Inputs: efo_id (required), size, threshold, entity_names, +1 more. Returns: object
get_drug_adverse_eventsCRead-only
Retrieve adverse event signals associated with a drug.
Inputs: chembl_id (required), page_size, page_index. Returns: object
get_drug_cross_referencesBRead-only
Retrieve cross-database identifiers related to a drug.
Inputs: chembl_id (required). Returns: object
get_drug_infoBRead-only
Fetch identity, indication, and mechanism data for a drug.
Inputs: chembl_id (required), fields. Returns: object
get_drug_linked_diseasesARead-only
List diseases connected to a drug across indications and mechanisms.
Inputs: chembl_id (required), fields. Returns: object
get_drug_linked_targetsARead-only
Return targets linked to a drug via mechanism-of-action data.
Inputs: chembl_id (required), fields. Returns: object
get_drug_literature_occurrencesCRead-only
Return literature co-occurrence records mentioning a drug.
Inputs: chembl_id (required), size, cursor, end_year, +4 more. Returns: object
get_drug_pharmacogenomicsBRead-only
Retrieve pharmacogenomics data linking genetic variants to drug response.
Inputs: chembl_id (required), page_size, page_index. Returns: object
get_drug_pharmacovigilanceBRead-only
Summarise high-level pharmacovigilance data for a drug.
Inputs: chembl_id (required). Returns: object
get_drug_repurposing_candidatesBRead-only
Find repurposing candidates by chaining disease, target, and drug evidence.
Inputs: efo_id (required), max_targets, approved_only, max_candidates, +4 more. Returns: object
get_drugs_batchARead-only
Retrieve multiple drugs in a single request.
Inputs: chembl_ids (required). Returns: object
get_drug_similar_entitiesBRead-only
Find semantically similar drugs based on PubMed embeddings.
Inputs: chembl_id (required), size, threshold, entity_names, +1 more. Returns: object
get_drug_warningsBRead-only
Fetch detailed regulatory warnings, including withdrawals and boxed labels.
Inputs: chembl_id (required). Returns: object
get_gene_ontology_termsARead-only
Resolve Gene Ontology identifiers to human-readable labels.
Inputs: go_ids (required). Returns: object
get_interaction_resourcesARead-only
Enumerate interaction databases integrated into Open Targets.
Inputs: no named parameters. Returns: object
get_similar_targetsARead-only
Identify targets with similar association profiles to the seed target.
Inputs: entity_id (required), size, threshold. Returns: object
get_studies_by_diseaseCRead-only
List studies linked to one or more diseases.
Inputs: disease_ids (required), fields, study_id, page_size, +2 more. Returns: object
get_study_credible_setsBRead-only
Retrieve fine-mapped credible sets for a study.
Inputs: study_id (required), fields, page_size, page_index. Returns: object
get_study_infoBRead-only
Retrieve metadata and cohort details for a GWAS study.
Inputs: study_id (required), fields. Returns: object
get_target_alternative_genesARead-only
List alternate gene symbols and database cross-references for a target.
Inputs: ensembl_id (required). Returns: object
get_target_associated_diseasesBRead-only
List diseases linked to a target with association scores.
Inputs: ensembl_id (required), fields, page_size, page_index. Returns: object
get_target_chemical_probesBRead-only
List available chemical probes and their quality metrics.
Inputs: ensembl_id (required). Returns: object
get_target_classARead-only
Return ChEMBL target class annotations for a gene.
Inputs: ensembl_id (required). Returns: object
get_target_depmap_essentialityBRead-only
Fetch DepMap CRISPR essentiality scores across cell lines.
Inputs: ensembl_id (required). Returns: object
get_target_disease_biomarkersBRead-only
Inspect evidence for biomarker annotations linking a target and disease.
Inputs: efo_id (required), ensembl_id (required), size, cursor, +1 more. Returns: object
get_target_disease_evidenceBRead-only
Retrieve evidence strings linking a target to a disease.
Inputs: efo_id (required), ensembl_id (required), size, cursor, +2 more. Returns: object
get_target_expressionARead-only
Return RNA and protein expression profiles for a target across tissues.
Inputs: ensembl_id (required), fields. Returns: object
get_target_genetic_constraintARead-only
Fetch genetic constraint metrics (gnomAD) for a target.
Inputs: ensembl_id (required). Returns: object
get_target_hallmarksARead-only
Return cancer hallmark annotations associated with a target.
Inputs: ensembl_id (required). Returns: object
get_target_homologuesBRead-only
Retrieve cross-species homologues for a target gene.
Inputs: ensembl_id (required). Returns: object
get_target_infoCRead-only
Retrieve core identity details for a target gene.
Inputs: ensembl_id (required), fields. Returns: object
get_target_interactionsARead-only
Retrieve protein interaction partners for a target from curated databases.
Inputs: ensembl_id (required), fields, page_size, page_index, +2 more. Returns: object
get_target_known_drugsCRead-only
Return compounds with known activity on the target.
Inputs: ensembl_id (required), fields, page_size, page_index. Returns: object
get_target_literature_occurrencesCRead-only
Return literature co-occurrence records for a target.
Inputs: ensembl_id (required), size, cursor, end_year, +4 more. Returns: object
get_target_mouse_phenotypesBRead-only
Retrieve mouse knockout phenotypes associated with a target.
Inputs: ensembl_id (required), page_size, page_index. Returns: object
get_target_pathways_and_go_termsBRead-only
List pathway memberships and Gene Ontology annotations for a target.
Inputs: ensembl_id (required), page_size, page_index. Returns: object
get_target_prioritizationBRead-only
Return target prioritisation scores compiled across data sources.
Inputs: ensembl_id (required). Returns: object
get_target_safety_informationARead-only
Retrieve documented safety liabilities for a target.
Inputs: ensembl_id (required). Returns: object
get_targets_batchBRead-only
Retrieve multiple targets in a single request.
Inputs: ensembl_ids (required). Returns: object
get_target_subcellular_locationsARead-only
Return subcellular localisation annotations for a target.
Inputs: ensembl_id (required). Returns: object
get_target_tepBRead-only
Fetch Target Enabling Package (TEP) information for a gene.
Inputs: ensembl_id (required). Returns: object
get_target_tractabilityBRead-only
Return tractability assessments across modalities for a target.
Inputs: ensembl_id (required). Returns: object
get_variant_credible_setsARead-only
List credible sets that include a specific variant.
Inputs: variant_id (required), page_size, page_index, study_types. Returns: object
get_variant_evidencesARead-only
Retrieve evidence strings linking a variant to targets or diseases.
Inputs: variant_id (required), size, cursor, fields, +1 more. Returns: object
get_variant_infoARead-only
Retrieve core metadata and functional annotations for a variant.
Inputs: variant_id (required), fields. Returns: object
get_variant_intervalsBRead-only
Retrieve enhancer-to-gene (E2G) predictions overlapping a variant.
Inputs: variant_id (required), page_size, page_index. Returns: object
get_variant_pharmacogenomicsCRead-only
Retrieve pharmacogenomic annotations for a variant.
Inputs: variant_id (required), page_size, page_index. Returns: object
get_variant_protein_coordinatesBRead-only
Retrieve protein-level consequences for a variant.
Inputs: variant_id (required), page_size, page_index. Returns: object
graphql_batch_queryBRead-only
Execute one GraphQL query against many variable sets.
Inputs: query_string (required), variables_list (required), key_field, operation_name, +1 more. Returns: object
graphql_queryARead-only
ADVANCED: Execute a raw GraphQL query against Open Targets.
Inputs: query_string (required), variables, operation_name. Returns: object
graphql_schemaARead-only
ADVANCED: Return the GraphQL schema in SDL format.
Inputs: no named parameters. Returns: result
map_idsBRead-only
Map free-text terms to canonical Open Targets identifiers.
Inputs: query_terms (required), entity_names. Returns: object
search_entitiesARead-only
Search Open Targets entities and resolve synonyms to canonical IDs.
Inputs: query_string (required), page_size, page_index, entity_names. Returns: object
search_facetsBRead-only
Return facet counts to help filter search results.
Inputs: page_size, page_index, category_id, entity_names, +1 more. Returns: object
search_suggestionsCRead-only
Return autocomplete suggestions for partially typed queries.
Inputs: query_prefix (required), entity_names, max_suggestions. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 68 tools
Tools are systematically organized by entity type (disease, drug, target, variant, study) and data category, which makes most purposes clear. However, some inverse relationships like get_disease_known_drugs vs get_drug_linked_diseases and get_disease_associated_targets vs get_target_associated_diseases could initially confuse an agent, though descriptions clarify them.
All tool names use snake_case with a consistent verb_noun pattern (get_*, search_*, map_*, graphql_*). Entity prefixes are uniform, making it predictable to infer a tool's function from its name even without reading the description.
With 68 tools, the set far exceeds the 25+ threshold, making navigation and selection challenging for an agent. While the Open Targets domain is broad, this many tools likely bundles what could be a smaller set of higher-level operations or requires aggressive grouping.
The toolset covers the full spectrum of Open Targets data access: entity metadata, associations, evidence, literature, phenotypes, expression, safety, and advanced GraphQL. Search and batch utilities address bulk needs, and no major query need appears missing, making the surface extremely thorough.
Maintenance
Related MCP Connectors
Open Targets MCP — disease/target/drug knowledge graph.
MCP gateway federating 30 biomedical MCP servers behind one endpoint: gnomAD, ClinVar, HPO, VEP.
gnomAD MCP — Broad Institute Genome Aggregation Database (GraphQL).
Public MCP endpoint for collaborative research and knowledge discovery.
Related MCP Servers
- AlicenseAqualityDmaintenanceGraphQL MCP Server that acts as a bridge allowing MCP clients (like Cursor or Claude Desktop) to interact with target GraphQL APIs through standard tools for schema introspection and operation execution.23MIT
- AlicenseBqualityDmaintenanceUnofficial Model Context Protocol server for accessing Open Targets platform data for gene-drug-disease associations research.611MIT
- FlicenseNot gradedqualityDmaintenanceThis MCP server exposes approved GraphQL operations from an Apollo GraphQL API as AI-accessible tools. It sits between MCP clients and the GraphQL API, translating tool calls into GraphQL queries and returning results in MCP format.-
- AlicenseAqualityBmaintenanceA high-performance MCP server that gives LLMs access to 25 biomedical tools federated across 50+ upstream APIs for genes, variants, drugs, diseases, literature, clinical trials, and structural biology.43138 npm12Apache 2.0