[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Open Targets target-disease associations](https://spiral.ai/integrations/opencode/open-targets-target-disease-associations)

# How to Use Open Targets target-disease associations in opencode

Returns ranked gene-disease links with overall and evidence-type association scores from Open Targets. Use it to shortlist targets for a disease, explore diseases linked to a gene, or assess one pair before reviewing its underlying evidence.

|  |  |
| --- | --- |
| Model | Open Targets target-disease associations |
| Available through | Alexandria |
| Category | Health |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Open Targets target-disease associations in opencode

- Use Open Targets target-disease associations to fetch the top 20 asthma targets and add a table of their overall and genetic evidence scores to this project.
- Use Open Targets target-disease associations for IL6R and write a CSV of the top 20 associated diseases with their scores.
- Use Open Targets target-disease associations to compare overall and genetic rankings for rheumatoid arthritis, then add a rank comparison chart to the app.
- Use Open Targets target-disease associations to retrieve the CFTR and cystic fibrosis scores and add the result to our research notebook.
- Use Open Targets target-disease associations for NOD2 and inflammatory bowel disease, compare direct-only and expanded disease evidence, and save both results in the project.

## How to set up Open Targets target-disease associations in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Open Targets target-disease associations**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "platform-opentargets-org/associations/list_associations",
    "input": {
      "limit": 25
    }
  }'
```

Then paste one of the prompts above: opencode finds Open Targets target-disease associations on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## Open Targets target-disease associations tools and prices

- [Open Targets Platform · List associations](https://spiral.ai/tools/alexandria/platform-opentargets-org/associations/list_associations) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| limit | 1 to 100 | 25 | Rows per page, 1 to 100. |
| cursor |  | — | `next_cursor` from the previous page. Repeat the same inputs and `limit` with it. Pattern: ^[0-9]+$. |
| target |  | — | Target: an HGNC symbol (`BRAF`), Ensembl gene ID (`ENSG00000157764`), UniProt accession (`P15056`), previous symbol, synonym (`HER2`, `p53`), approved name, or a platform.opentargets.org target page URL. Ambiguous synonyms fail as invalid_input naming the candidates. |
| disease |  | — | Disease or phenotype: an ontology ID (`MONDO_0004979`, `EFO_0000270`, `EFO:0000270`, `HP_0002099`, `Orphanet_558`), an exact name or exact synonym (`asthma`, `T2DM`), or a platform.opentargets.org disease page URL. Retired EFO IDs follow to their replacement with a `disease_replaced` warning; other names fail as not_found listing the closest matches (use `search_diseases` to browse). |
| indirect |  | — | Include indirect evidence, which propagates evidence on a disease's descendants up to it (e.g. Crohn's disease evidence counts for inflammatory bowel disease). Defaults to false for a target's diseases and true when a disease is given, as on the Open Targets pages. |
| order_by | score, genetic_association, genetic_literature, somatic_mutation, clinical, affected_pathway, rna_expression, literature, animal_model | score | Rank by the overall score or by one evidence type's score, descending. |

## What can you do with Open Targets target-disease associations in opencode?

Build an asthma target comparison table in your research app from Open Targets association scores. A coding agent can join the returned genes to a project shortlist and show how evidence priorities affect the ranking.

### Build a disease target shortlist

Rank targets associated with asthma and select candidates for a research review using their overall and genetic evidence scores.

### Explore indications for a gene

List diseases associated with IL6R to identify indications worth investigating in an early drug discovery program.

### Compare evidence priorities

Compare a rheumatoid arthritis shortlist ranked by overall support with one ranked by genetic support to see which targets change position.

### Check disease scope

Compare NOD2 associations with inflammatory bowel disease using direct evidence alone and then including narrower diagnoses.

### Review a proposed gene-disease link

Retrieve the CFTR and cystic fibrosis association scores to prepare a focused review of the evidence behind that pair.

### Monitor changes across releases

Compare saved psoriasis target rankings after quarterly Platform updates and flag changes for a scientific review.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## Open Targets target-disease associations in other agents

- [Amp](https://spiral.ai/integrations/amp/open-targets-target-disease-associations)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/open-targets-target-disease-associations)
- [Claude](https://spiral.ai/integrations/claude-desktop/open-targets-target-disease-associations)
- [Claude Code](https://spiral.ai/integrations/claude-code/open-targets-target-disease-associations)
- [Cline](https://spiral.ai/integrations/cline/open-targets-target-disease-associations)
- [Codex](https://spiral.ai/integrations/codex/open-targets-target-disease-associations)
- [Cursor](https://spiral.ai/integrations/cursor/open-targets-target-disease-associations)
- [Devin](https://spiral.ai/integrations/devin/open-targets-target-disease-associations)
- [dots](https://spiral.ai/integrations/dots/open-targets-target-disease-associations)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/open-targets-target-disease-associations)
- [Gemini](https://spiral.ai/integrations/gemini/open-targets-target-disease-associations)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/open-targets-target-disease-associations)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/open-targets-target-disease-associations)
- [goose](https://spiral.ai/integrations/goose/open-targets-target-disease-associations)
- [Grok](https://spiral.ai/integrations/grok/open-targets-target-disease-associations)
- [Grok Build](https://spiral.ai/integrations/grok-build/open-targets-target-disease-associations)
- [Hermes](https://spiral.ai/integrations/hermes/open-targets-target-disease-associations)
- [Instinct](https://spiral.ai/integrations/instinct/open-targets-target-disease-associations)
- [Manus](https://spiral.ai/integrations/manus/open-targets-target-disease-associations)
- [Muse](https://spiral.ai/integrations/muse/open-targets-target-disease-associations)
- [Muse Code](https://spiral.ai/integrations/muse-code/open-targets-target-disease-associations)
- [n8n](https://spiral.ai/integrations/n8n/open-targets-target-disease-associations)
- [Notion](https://spiral.ai/integrations/notion/open-targets-target-disease-associations)
- [OpenClaw](https://spiral.ai/integrations/openclaw/open-targets-target-disease-associations)
- [Perplexity](https://spiral.ai/integrations/perplexity/open-targets-target-disease-associations)
- [Raycast](https://spiral.ai/integrations/raycast/open-targets-target-disease-associations)
- [VS Code](https://spiral.ai/integrations/vscode/open-targets-target-disease-associations)
- [Windsurf](https://spiral.ai/integrations/windsurf/open-targets-target-disease-associations)
- [Zapier](https://spiral.ai/integrations/zapier/open-targets-target-disease-associations)

## More opencode guides

- [Open Targets target profile](https://spiral.ai/integrations/opencode/open-targets-target-profile)
- [Open Targets target-disease evidence](https://spiral.ai/integrations/opencode/open-targets-target-disease-evidence)
- [Open Targets drugs](https://spiral.ai/integrations/opencode/open-targets-drugs)
- [Orphanet rare disease epidemiology](https://spiral.ai/integrations/opencode/orphanet-rare-disease-epidemiology)
- [Open Targets disease search](https://spiral.ai/integrations/opencode/open-targets-disease-search)
- [Orphanet rare disease genes](https://spiral.ai/integrations/opencode/orphanet-rare-disease-genes)

## Questions about Open Targets target-disease associations in opencode

**Can opencode use Open Targets target-disease associations?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Open Targets target-disease associations like any built-in tool.

**How much does Open Targets target-disease associations cost in opencode?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use Open Targets target-disease associations in opencode?**

No. Spiral runs Open Targets target-disease associations on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Open Targets target-disease associations in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while Open Targets target-disease associations runs?**

Open Targets target-disease associations runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**How fresh are Open Targets associations?**

Open Targets maintains the Platform with quarterly updates. Association rankings follow those releases rather than a continuous feed of newly published studies.

**Does a score of 0.8 mean an 80% chance that a gene causes a disease?**

No. Overall association scores range from 0 to 1 and summarize available evidence; they are not probabilities of causality.

**Can a broad disease include evidence from narrower diagnoses?**

Yes. Indirect associations include evidence from ontology descendants, so inflammatory bowel disease can include evidence annotated to Crohn's disease.

**Does Open Targets cover only protein-coding genes?**

No. Human target coverage includes RNAs and pseudogenes, while gene fusions and protein complexes are not represented as target entities.

**Are all disease-side results diagnoses?**

No. Open Targets also includes phenotypes, biological processes, and measurements, using the Experimental Factor Ontology to organize them.

