Skip to main content
Glama
opentargets-mcp

opentargets-mcp

by nickzren

Open Targets MCP Server

CI PyPI Python MCP Registry License: MIT

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-mcp

Claude 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-mcp

Any 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 from which uvx.

  • Use opentargets-mcp@latest as the argument to pick up new releases.

  • On Apple Silicon, a cryptography build error can indicate uv picked an Intel (Rosetta) Python. uv python find is 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

get_target_info, get_target_known_drugs

Diseases

get_disease_info, get_disease_associated_targets

Drugs

get_drug_info, get_drug_adverse_events

Evidence

get_target_disease_evidence

Variants and studies

get_variant_info, get_credible_sets

Search and lookup

search_entities, map_ids

Workflow

get_drug_repurposing_candidates

Raw GraphQL

graphql_query, graphql_schema

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:#1f2328

Ask 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

MCP_TRANSPORT

--transport

stdio (also http, sse)

FASTMCP_SERVER_HOST

--host

0.0.0.0

FASTMCP_SERVER_PORT

--port

8000

OPEN_TARGETS_API_URL

--api

https://api.platform.opentargets.org/api/v4/graphql

OPEN_TARGETS_RATE_LIMIT_RPS

--rate-limit-rps

0 (off); limits incoming MCP requests

OPEN_TARGETS_RATE_LIMIT_BURST

--rate-limit-burst

20

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-mcp

With Docker (HTTP on port 8000), from the clone:

docker compose up -d --build

Connect 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 API

Example scripts are in examples/.

License

MIT

Available Tools

68 tools
get_api_metadataA
Read-only

Return Open Targets Platform release metadata.

Inputs: no named parameters. Returns: object

get_association_datasourcesA
Read-only

List sources contributing target–disease association evidence.

Inputs: no named parameters. Returns: object

get_credible_set_by_idB
Read-only

Fetch detailed information for a specific study locus credible set.

Inputs: study_locus_id (required). Returns: object

get_credible_set_colocalisationB
Read-only

Retrieve colocalisation results for a credible set.

Inputs: study_locus_id (required), page_size, page_index. Returns: object

get_credible_setsC
Read-only

Query credible sets with flexible filtering options.

Inputs: fields, regions, page_size, study_ids, +4 more. Returns: object

get_disease_associated_targetsB
Read-only

List targets associated with a disease, including evidence scores.

Inputs: efo_id (required), fields, page_size, page_index. Returns: object

get_disease_infoB
Read-only

Retrieve core metadata for an Open Targets disease entity.

Inputs: efo_id (required), fields. Returns: object

get_disease_known_drugsA
Read-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_occurrencesC
Read-only

Return literature co-occurrence records mentioning a disease.

Inputs: efo_id (required), size, cursor, end_year, +4 more. Returns: object

get_disease_ontologyA
Read-only

Retrieve ontology structure for a disease including parents, children, and ancestors.

Inputs: efo_id (required). Returns: object

get_disease_otar_projectsA
Read-only

List Open Targets Associated Research (OTAR) projects linked to a disease.

Inputs: efo_id (required). Returns: object

get_disease_phenotypesB
Read-only

Fetch HPO phenotype annotations linked to a disease.

Inputs: efo_id (required), page_size, page_index. Returns: object

get_diseases_batchC
Read-only

Retrieve multiple diseases in a single request.

Inputs: efo_ids (required). Returns: object

get_disease_similar_entitiesA
Read-only

Find semantically similar diseases based on PubMed embeddings.

Inputs: efo_id (required), size, threshold, entity_names, +1 more. Returns: object

get_drug_adverse_eventsC
Read-only

Retrieve adverse event signals associated with a drug.

Inputs: chembl_id (required), page_size, page_index. Returns: object

get_drug_cross_referencesB
Read-only

Retrieve cross-database identifiers related to a drug.

Inputs: chembl_id (required). Returns: object

get_drug_infoB
Read-only

Fetch identity, indication, and mechanism data for a drug.

Inputs: chembl_id (required), fields. Returns: object

get_drug_linked_diseasesA
Read-only

List diseases connected to a drug across indications and mechanisms.

Inputs: chembl_id (required), fields. Returns: object

get_drug_linked_targetsA
Read-only

Return targets linked to a drug via mechanism-of-action data.

Inputs: chembl_id (required), fields. Returns: object

get_drug_literature_occurrencesC
Read-only

Return literature co-occurrence records mentioning a drug.

Inputs: chembl_id (required), size, cursor, end_year, +4 more. Returns: object

get_drug_pharmacogenomicsB
Read-only

Retrieve pharmacogenomics data linking genetic variants to drug response.

Inputs: chembl_id (required), page_size, page_index. Returns: object

get_drug_pharmacovigilanceB
Read-only

Summarise high-level pharmacovigilance data for a drug.

Inputs: chembl_id (required). Returns: object

get_drug_repurposing_candidatesB
Read-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_batchA
Read-only

Retrieve multiple drugs in a single request.

Inputs: chembl_ids (required). Returns: object

get_drug_similar_entitiesB
Read-only

Find semantically similar drugs based on PubMed embeddings.

Inputs: chembl_id (required), size, threshold, entity_names, +1 more. Returns: object

get_drug_warningsB
Read-only

Fetch detailed regulatory warnings, including withdrawals and boxed labels.

Inputs: chembl_id (required). Returns: object

get_gene_ontology_termsA
Read-only

Resolve Gene Ontology identifiers to human-readable labels.

Inputs: go_ids (required). Returns: object

get_interaction_resourcesA
Read-only

Enumerate interaction databases integrated into Open Targets.

Inputs: no named parameters. Returns: object

get_similar_targetsA
Read-only

Identify targets with similar association profiles to the seed target.

Inputs: entity_id (required), size, threshold. Returns: object

get_studies_by_diseaseC
Read-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_setsB
Read-only

Retrieve fine-mapped credible sets for a study.

Inputs: study_id (required), fields, page_size, page_index. Returns: object

get_study_infoB
Read-only

Retrieve metadata and cohort details for a GWAS study.

Inputs: study_id (required), fields. Returns: object

get_target_alternative_genesA
Read-only

List alternate gene symbols and database cross-references for a target.

Inputs: ensembl_id (required). Returns: object

get_target_associated_diseasesB
Read-only

List diseases linked to a target with association scores.

Inputs: ensembl_id (required), fields, page_size, page_index. Returns: object

get_target_chemical_probesB
Read-only

List available chemical probes and their quality metrics.

Inputs: ensembl_id (required). Returns: object

get_target_classA
Read-only

Return ChEMBL target class annotations for a gene.

Inputs: ensembl_id (required). Returns: object

get_target_depmap_essentialityB
Read-only

Fetch DepMap CRISPR essentiality scores across cell lines.

Inputs: ensembl_id (required). Returns: object

get_target_disease_biomarkersB
Read-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_evidenceB
Read-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_expressionA
Read-only

Return RNA and protein expression profiles for a target across tissues.

Inputs: ensembl_id (required), fields. Returns: object

get_target_genetic_constraintA
Read-only

Fetch genetic constraint metrics (gnomAD) for a target.

Inputs: ensembl_id (required). Returns: object

get_target_hallmarksA
Read-only

Return cancer hallmark annotations associated with a target.

Inputs: ensembl_id (required). Returns: object

get_target_homologuesB
Read-only

Retrieve cross-species homologues for a target gene.

Inputs: ensembl_id (required). Returns: object

get_target_infoC
Read-only

Retrieve core identity details for a target gene.

Inputs: ensembl_id (required), fields. Returns: object

get_target_interactionsA
Read-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_drugsC
Read-only

Return compounds with known activity on the target.

Inputs: ensembl_id (required), fields, page_size, page_index. Returns: object

get_target_literature_occurrencesC
Read-only

Return literature co-occurrence records for a target.

Inputs: ensembl_id (required), size, cursor, end_year, +4 more. Returns: object

get_target_mouse_phenotypesB
Read-only

Retrieve mouse knockout phenotypes associated with a target.

Inputs: ensembl_id (required), page_size, page_index. Returns: object

get_target_pathways_and_go_termsB
Read-only

List pathway memberships and Gene Ontology annotations for a target.

Inputs: ensembl_id (required), page_size, page_index. Returns: object

get_target_prioritizationB
Read-only

Return target prioritisation scores compiled across data sources.

Inputs: ensembl_id (required). Returns: object

get_target_safety_informationA
Read-only

Retrieve documented safety liabilities for a target.

Inputs: ensembl_id (required). Returns: object

get_targets_batchB
Read-only

Retrieve multiple targets in a single request.

Inputs: ensembl_ids (required). Returns: object

get_target_subcellular_locationsA
Read-only

Return subcellular localisation annotations for a target.

Inputs: ensembl_id (required). Returns: object

get_target_tepB
Read-only

Fetch Target Enabling Package (TEP) information for a gene.

Inputs: ensembl_id (required). Returns: object

get_target_tractabilityB
Read-only

Return tractability assessments across modalities for a target.

Inputs: ensembl_id (required). Returns: object

get_variant_credible_setsA
Read-only

List credible sets that include a specific variant.

Inputs: variant_id (required), page_size, page_index, study_types. Returns: object

get_variant_evidencesA
Read-only

Retrieve evidence strings linking a variant to targets or diseases.

Inputs: variant_id (required), size, cursor, fields, +1 more. Returns: object

get_variant_infoA
Read-only

Retrieve core metadata and functional annotations for a variant.

Inputs: variant_id (required), fields. Returns: object

get_variant_intervalsB
Read-only

Retrieve enhancer-to-gene (E2G) predictions overlapping a variant.

Inputs: variant_id (required), page_size, page_index. Returns: object

get_variant_pharmacogenomicsC
Read-only

Retrieve pharmacogenomic annotations for a variant.

Inputs: variant_id (required), page_size, page_index. Returns: object

get_variant_protein_coordinatesB
Read-only

Retrieve protein-level consequences for a variant.

Inputs: variant_id (required), page_size, page_index. Returns: object

graphql_batch_queryB
Read-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_queryA
Read-only

ADVANCED: Execute a raw GraphQL query against Open Targets.

Inputs: query_string (required), variables, operation_name. Returns: object

graphql_schemaA
Read-only

ADVANCED: Return the GraphQL schema in SDL format.

Inputs: no named parameters. Returns: result

map_idsB
Read-only

Map free-text terms to canonical Open Targets identifiers.

Inputs: query_terms (required), entity_names. Returns: object

search_entitiesA
Read-only

Search Open Targets entities and resolve synonyms to canonical IDs.

Inputs: query_string (required), page_size, page_index, entity_names. Returns: object

search_facetsB
Read-only

Return facet counts to help filter search results.

Inputs: page_size, page_index, category_id, entity_names, +1 more. Returns: object

search_suggestionsC
Read-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

    B3.2/5.0

    Scored across 68 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness5/5

    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

    ActivitySlowing
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      GraphQL 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.
      2
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      This 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.
      -
    • A
      license
      A
      quality
      B
      maintenance
      A 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.
      43
      138 npm
      12
      Apache 2.0