OP

Open Targets MCP Server: Target-Disease and Drug Discovery

Explore the Open Targets MCP server to access target-disease associations, drug discovery data, and generate therapeutic hypotheses for biomedical research.

Quick Install
npx -y @QuentinCody/open-targets-mcp-server

Overview

The Open Targets MCP Server implements a Model Context Protocol (MCP) endpoint tailored for biomedical discovery workflows. It provides programmatic access to target-disease associations, drug-related information, and supporting evidence so developers and researchers can integrate these insights into analysis pipelines, visualization tools, or machine learning models. By exposing a consistent API surface for context-aware model queries, the server helps translate complex evidence into actionable hypotheses.

This server is useful for teams working on target prioritization, drug repurposing, or hypothesis generation. It centralizes heterogeneous evidence (genetics, functional genomics, literature, clinical data) behind query primitives and delivers structured results suitable for automated pipelines or interactive applications. Typical consumers include data scientists, bioinformaticians, and application developers building search or ranking layers around biomedical entities.

Features

  • Exposes MCP-compatible HTTP API for model context queries
  • Search and lookup for targets, diseases, and compounds
  • Retrieval of target-disease associations with supporting evidence
  • Drug discovery data: approved drugs, clinical candidates, mechanism annotations
  • Batch queries and pagination for large-scale workflows
  • Pluggable backends (databases, search engines) via configuration
  • JSON responses that are easy to consume from scripts and clients
  • Example client snippets and OpenAPI/Swagger spec for integration

Installation / Configuration

Clone the repository and choose a deployment mode: Docker (recommended) or local Python venv.

Docker (quickstart)

git clone https://github.com/QuentinCody/open-targets-mcp-server.git
cd open-targets-mcp-server

# Run with Docker Compose (example)
docker-compose up -d

Local Python install

git clone https://github.com/QuentinCody/open-targets-mcp-server.git
cd open-targets-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# Configure environment variables (example)
export MCP_PORT=8080
export DATABASE_URL=postgresql://user:pass@localhost:5432/mcp
export ELASTICSEARCH_URL=http://localhost:9200

# Start the server
python -m server.app

Configuration

  • The server reads configuration from environment variables and a YAML file (config.yml). Typical keys:
    • DATABASE_URL — connection string for the evidence database
    • ELASTICSEARCH_URL — optional search backend
    • MCP_PORT — HTTP port to bind
    • AUTH_TOKEN — optional bearer token for protected endpoints
  • Provide indexes or ingestion scripts to populate evidence backends (see repository scripts/ or docs/ for ingestion examples).

Available Resources

Common endpoints and their purpose:

EndpointMethodDescription
/searchGETFree-text search for targets, diseases, compounds
/associationsGETRetrieve target-disease associations with evidence
/evidenceGETFetch evidence items supporting an association
/drugsGETQuery drug information and mechanism-of-action data
/hypothesesPOSTGenerate or score therapeutic hypotheses (MCP-style)
/openapi.jsonGETOpenAPI specification for automated client generation

Example curl queries

# Search for a target
curl "http://localhost:8080/search?q=TP53"

# Get associations (paginated)
curl "http://localhost:8080/associations?target=ENSG00000141510&disease=EFO_0000311"

# Get supporting evidence
curl "http://localhost:8080/evidence?association_id=assoc_12345"

Use Cases

  1. Target prioritization pipeline

    • Use /search to resolve gene targets from user input.
    • Query /associations to retrieve and rank target-disease links by evidence strength.
    • Feed results into a machine learning model or ranking UI to prioritize targets for experimental follow-up.
  2. Drug repurposing screen

    • For a disease of interest, fetch known drug-target pairs via /drugs and /associations.
    • Cross-reference safety and clinical stage metadata returned by the server to shortlist repurposing candidates.
    • Run batch hypotheses creation using /hypotheses for candidate scoring.
  3. Evidence-driven literature triage

    • Retrieve associations and their supporting evidence snippets (/evidence).
    • Surface primary literature identifiers and confidence metrics for curators to review.
    • Integrate with annotation tools to accelerate manual curation or training-data generation.

Example response (simplified)

{
  "association_id": "assoc_12345",
  "target": { "id": "ENSG00000141510", "symbol": "TP53" },
  "disease": { "id": "EFO_0000311", "label": "breast carcinoma" },
  "score": 0.87,
  "evidence_count": 12,
  "evidence": [
    { "type": "genetic", "source": "GWAS Catalog", "pmid": "12345678" },
    { "type": "expression", "source": "GTEx", "dataset": "breast_tissue" }
  ]
}

Getting help and next steps

  • Review the repository README and example configuration files for ingestion scripts.
  • Use the OpenAPI spec (/openapi.json) to generate client libraries (Swagger Codegen or OpenAPI Generator).
  • For production deployments, run behind a reverse proxy, enable HTTPS, and configure authentication tokens or OAuth for protected endpoints.

This MCP server is designed to be a modular, API-first component for biomedical discovery systems—connect it to your data backends and client apps to accelerate hypothesis-driven research.

Tags:search