Skip to main content

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.

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.

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

Metadata

Release files for opentargets-mcp 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentargets-mcp 0.7.0
File Size Uploaded
opentargets_mcp-0.7.0.tar.gz 101.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opentargets-mcp 0.7.0
File Interpreter ABI Platform
opentargets_mcp-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 177.5 kB

Release files / opentargets_mcp-0.7.0.tar.gz

Download URL opentargets_mcp-0.7.0.tar.gz
Size 101.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7a1d7b1133f22f07bdb6b31c1123765056359bff59f4c874ed81c08da9e8f615
BLAKE2b-256 checksum
How to use checksums
6826e2a5bd03966b6167848cdf6471f0249bffba27a51f37c8a17388a1e6f600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / opentargets_mcp-0.7.0-py3-none-any.whl

Download URL opentargets_mcp-0.7.0-py3-none-any.whl
Size 75.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72cf3e56ad63feefc0147d596d146ca2d21b87b97a902f4ed0479f60e843bce2
BLAKE2b-256 checksum
How to use checksums
2f7fd88eadb58c6e33a5761d59dec3b3d56917137b5be9e19f6a7d4a89439a6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page