Opentargets

io.github.nickzren由 GitHub 账号 nickzren 发布v0.7.0更新于 Oct 24, 2026

Read-only Open Targets: targets, diseases, drugs and evidence by name or ID. No API key needed.

已验证STDIO仅桌面数据与分析AI 与机器学习

概览

AI 生成的概览

面向 Open Targets 平台的只读 MCP 服务器,让助手按名称或 ID 查询靶点、疾病、药物、变异及相关证据。

可以做什么
按名称或 ID 查询靶点、疾病和药物,包括药物的已知靶向药物与不良事件、疾病的相关靶点;名称有歧义时列出候选供选择。获取靶点-疾病证据、变异详情和可信集,并在可用时附带数据源 ID 和 PubMed 文献引用。搜索实体并在基因符号、rsID 以及 Ensembl、MONDO、ChEMBL ID 之间映射标识符。为某种疾病推荐药物重定位候选。对精选工具未覆盖的内容执行原始 GraphQL 查询并查看 schema,还可记录所用的 API 与数据版本。
适用场景
适合生物医学或药物研发类问题,例如某个基因有哪些在研药物、哪些基因与某种疾病相关、某基因与疾病之间有何证据,也适合在不手写 GraphQL 的情况下探索药物重定位思路。
运行要求
以 PyPI 包形式通过 uvx 在本地以 stdio 运行,需要安装 uv。无需 Open Targets API 密钥。需要能访问 Open Targets GraphQL API 的网络;代理从 HTTPS_PROXY、HTTP_PROXY 和 NO_PROXY 读取。可选的环境变量或命令行参数可调整传输方式、主机、端口、API 地址和速率限制。
安装前请注意
只读:仅查询 Open Targets 平台,不会向其写入数据。查询内容和你查找的实体都会发送到外部 Open Targets API。临床报告计数统计的是报告记录数而非唯一试验数,依赖前请核实。若改用 HTTP 传输,默认主机绑定所有网络接口,会把服务器暴露到本机之外。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Opentargets,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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

bash
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:

json
{  "mcpServers": {    "opentargets": {      "command": "uvx",      "args": ["opentargets-mcp"]    }  }}

VS Code

bash
code --add-mcp '{"name":"opentargets","command":"uvx","args":["opentargets-mcp"]}'

Codex

bash
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.

AreaExamples
Targetsget_target_info, get_target_known_drugs
Diseasesget_disease_info, get_disease_associated_targets
Drugsget_drug_info, get_drug_adverse_events
Evidenceget_target_disease_evidence
Variants and studiesget_variant_info, get_credible_sets
Search and lookupsearch_entities, map_ids
Workflowget_drug_repurposing_candidates
Raw GraphQLgraphql_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

mermaid
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):

VariableFlagDefault
MCP_TRANSPORT--transportstdio (also http, sse)
FASTMCP_SERVER_HOST--host0.0.0.0
FASTMCP_SERVER_PORT--port8000
OPEN_TARGETS_API_URL--apihttps://api.platform.opentargets.org/api/v4/graphql
OPEN_TARGETS_RATE_LIMIT_RPS--rate-limit-rps0 (off); limits incoming MCP requests
OPEN_TARGETS_RATE_LIMIT_BURST--rate-limit-burst20

Proxies are read from HTTPS_PROXY, HTTP_PROXY and NO_PROXY.

Self-host

From source:

bash
git clone https://github.com/nickzren/opentargets-mcpcd opentargets-mcpuv run opentargets-mcp

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

bash
docker compose up -d --build

Connect your MCP client to http://localhost:8000/mcp.

Development

bash
uv sync --extra devuv run ruff check src testsuv run pytest -m "not live"   # offlineuv run pytest -m live         # calls the Open Targets API

Example scripts are in examples/.

License

MIT

来源:README.md,提交 e0641af

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v0.7.0最新Oct 9, 2026
  2. v0.6.1Oct 9, 2026
  3. v0.6.0Sep 21, 2026
  4. v0.2.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分