---
title: "Clinical trials API and MCP server"
description: "Search the public clinical trials we show on clareohealth.com/clinical-trials, from code or from an AI agent. It is read-only, needs no key or sign-in, and returns ClinicalTrials.gov registry data only, never anyone's health record. Trial information is not medical advice."
url: "https://www.clareohealth.com/developers"
---

# Clinical trials API and MCP server

Search the public clinical trials we show on [clareohealth.com/clinical-trials](https://www.clareohealth.com/clinical-trials), from code or from an AI agent. It is read-only, needs no key or sign-in, and returns ClinicalTrials.gov registry data only, never anyone's health record. Trial information is not medical advice.

## REST API

The full description is in the [OpenAPI 3.1 spec](https://www.clareohealth.com/developers/openapi.json). Both endpoints are `GET` and answer JSON.

### Search trials

The `q` parameter takes a condition, treatment or sponsor, and a city, state or country in it narrows by location. Results are paged with `page` and `limit` (up to 100).

Request

```
GET /api/clinical-trials/search?q=asthma+in+Boston&status=RECRUITING&limit=10
```

```sh
curl "https://www.clareohealth.com/api/clinical-trials/search?q=asthma+in+Boston&limit=5"
```

### Get one trial

`GET /api/clinical-trials/NCT01234567` returns one trial with eligibility, locations and a ClinicalTrials.gov link.

```sh
curl "https://www.clareohealth.com/api/clinical-trials/NCT01234567"
```

### Limits and errors

Each IP may make 60 requests every 60 seconds. A refused request gets a `429` with `Retry-After` and `RateLimit-*` headers. Errors are JSON: `{"error": "…", "code": "…"}`.

- `400` `invalid_request`: A parameter is malformed or out of range, such as limit=500 or an NCT ID that isn't NCT plus 8 digits.
- `404` `not_found`: The registry has no trial with that NCT ID.
- `429` `rate_limited`: More than 60 requests in a minute from one IP. Wait for Retry-After seconds.
- `500` `upstream_unavailable`: ClinicalTrials.gov didn't answer. Retry later.

## MCP server

Agents that speak the Model Context Protocol can connect to `https://www.clareohealth.com/mcp` (Streamable HTTP, no auth). It has 6 read-only tools and 3 prompts, plus an MCP Apps view that shows results in the conversation. The server card is at [/.well-known/mcp/server-card.json](https://www.clareohealth.com/.well-known/mcp/server-card.json), and the REST API is described in the [OpenAPI spec](https://www.clareohealth.com/developers/openapi.json). It is free to use, needs no sign-in, and reads public ClinicalTrials.gov data only.

### Set it up

Pick your client. Each one needs only the URL.

#### Claude

- Claude Code: run the command below once.
- Claude on the web or desktop: open Settings, then Connectors, choose Add custom connector, and paste https://www.clareohealth.com/mcp as the URL. Leave the authentication fields empty.

Claude Code

```
claude mcp add --transport http clareo-clinical-trials https://www.clareohealth.com/mcp
```

#### ChatGPT

- Turn on developer mode in ChatGPT's Settings, under Connectors, then Advanced.
- Create a connector, name it Clareo clinical trials, paste https://www.clareohealth.com/mcp as the MCP server URL, and choose No authentication.
- Start a chat, add the connector from the tools menu, and ask about a condition and a place.

MCP server URL

```
https://www.clareohealth.com/mcp
```

#### Cursor

- Add this to .cursor/mcp.json in a project, or ~/.cursor/mcp.json for every project.

mcp.json

```
{
  "mcpServers": {
    "clareo-clinical-trials": {
      "url": "https://www.clareohealth.com/mcp"
    }
  }
}
```

#### VS Code

- Add this to .vscode/mcp.json, then start the server from the file or the MCP: List Servers command.

.vscode/mcp.json

```
{
  "servers": {
    "clareo-clinical-trials": {
      "type": "http",
      "url": "https://www.clareohealth.com/mcp"
    }
  }
}
```

#### Any other client

- Any client that supports remote MCP over Streamable HTTP takes the URL alone. There is no sign-in and no key.

Generic JSON

```
{
  "mcpServers": {
    "clareo-clinical-trials": {
      "type": "http",
      "url": "https://www.clareohealth.com/mcp"
    }
  }
}
```

### Tools

Every tool is read-only. Send a `tools/call` request, or ask your agent in plain words.

#### `search_clinical_trials`

Search public trials by condition, treatment or sponsor, with optional filters. Each result carries public registry fields and a clareohealth.com link.

- `query` (required): Condition, treatment or sponsor, up to 200 characters. A city, state or country in it narrows by place.
- `recruitingOnly` (optional): Only trials that are recruiting or enrolling by invitation.
- `page` (optional): Page of results, starting at 1.
- `limit` (optional): Results per page, up to 20.
- `phase` (optional): List of phases to keep: EARLY_PHASE1, PHASE1, PHASE2, PHASE3 or PHASE4.
- `status` (optional): List of registry statuses to keep, such as RECRUITING or NOT_YET_RECRUITING. Overrides recruitingOnly.
- `sex` (optional): all, male or female.
- `minAge` (optional): In whole years. With maxAge, keeps trials whose eligible ages overlap the range; use the same number for both to match one age.
- `maxAge` (optional): In whole years. See minAge.
- `city` (optional): City to look in, for example Boston.
- `state` (optional): State or region to look in, for example Massachusetts.
- `country` (optional): Country to look in, for example United States.
- `zip` (optional): A 5-digit US ZIP code, to find trials with a site near it. Send one only if the person chooses to give it for this search; it is turned into coordinates on our server and not stored.
- `radiusMiles` (optional): Radius in miles around zip (default 50, up to 200), or around a US city when city and state are given.
- `sortBy` (optional): relevance (default), distance, lastUpdated or startDate. distance needs zip, or city with state and radiusMiles.
- `sortOrder` (optional): asc or desc (default), used with lastUpdated or startDate.

Example call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_clinical_trials",
    "arguments": {
      "query": "type 1 diabetes",
      "recruitingOnly": true,
      "phase": [
        "PHASE3"
      ],
      "zip": "02115",
      "radiusMiles": 25,
      "sortBy": "distance",
      "limit": 5
    }
  }
}
```

Example prompt: “Find recruiting phase 3 trials for type 1 diabetes within 25 miles of ZIP 02115, nearest first.”

#### `get_clinical_trial`

Read one trial by its NCT ID: title, status, phase, summary, conditions, interventions, sponsor and a ClinicalTrials.gov link.

- `nctId` (required): NCT followed by 8 digits.

Example call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_clinical_trial",
    "arguments": {
      "nctId": "NCT01234567"
    }
  }
}
```

Example prompt: “Look up trial NCT01234567 and tell me what it is testing.”

#### `compare_clinical_trials`

Read 2 to 5 trials in one call on the same public fields (status, phase, conditions, sponsor, ages, sex, enrollment, dates and site count). IDs the registry does not know come back in notFound.

- `nctIds` (required): Between 2 and 5 NCT IDs.

Example call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "compare_clinical_trials",
    "arguments": {
      "nctIds": [
        "NCT01234567",
        "NCT07654321"
      ]
    }
  }
}
```

Example prompt: “Compare NCT01234567 and NCT07654321.”

#### `get_trial_sites`

List where a trial runs, with each site's facility, city, state and country, filtered by city or state and paged. Registry contacts are not returned.

- `nctId` (required): NCT followed by 8 digits.
- `city` (optional): Only sites in this city.
- `state` (optional): Only sites in this state or province.
- `page` (optional): Page of sites, starting at 1.
- `limit` (optional): Sites per page, up to 100 (default 20).

Example call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_trial_sites",
    "arguments": {
      "nctId": "NCT01234567",
      "state": "Massachusetts"
    }
  }
}
```

Example prompt: “Which sites in Massachusetts are running NCT01234567?”

#### `get_trial_eligibility`

The trial's inclusion and exclusion criteria split into lists, plus age limits and sex, in the registry's own words. Nothing is generated or rephrased, so it never says whether a person qualifies; the full text is returned too.

- `nctId` (required): NCT followed by 8 digits.

Example call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_trial_eligibility",
    "arguments": {
      "nctId": "NCT01234567"
    }
  }
}
```

Example prompt: “Show the eligibility criteria for NCT01234567 exactly as the registry has them.”

#### `get_recent_trial_changes`

Trials the registry updated since a date, for a condition or for one NCT ID. It reads lastUpdatePostDate only: it tells you a record changed, not which field. It is not a field-by-field diff.

- `query` (optional): Condition, treatment or sponsor to look at. Give this or nctId.
- `nctId` (optional): One trial to check. Give this or query.
- `since` (required): Date in YYYY-MM-DD form. Records the registry updated on or after it are returned.

Example call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_recent_trial_changes",
    "arguments": {
      "query": "type 1 diabetes",
      "since": "2026-01-01"
    }
  }
}
```

Example prompt: “Which type 1 diabetes trials were updated in the registry since the start of 2026?”

### Prompts

- `find_trials_near_me` (condition, place): Searches for recruiting trials for a condition near a place.
- `explain_trial` (nctId): Reads one trial and explains it in plain language, with its limits and no advice.
- `compare_trials` (nctIds): Compares several trials and lays out the differences.

### Limits

- 60 requests a minute per IP address. Each POST counts once, and a refused request gets a 429 with Retry-After and RateLimit-* headers.
- Read-only: no tool signs anyone up, applies to a trial, writes anything or starts a summary.
- Public ClinicalTrials.gov data only. No sign-in, and registry contacts are not returned.
- Search takes up to 200 characters and returns at most 20 trials a page.

### Privacy

- Never send personal health details. Search by condition and place only, for example "asthma in Boston", not a diagnosis history, a medication list or a name.
- The server cannot see your visits, notes, account or health record, and it sets no cookie.
- We count how the server is used: which tool was called, how long it took, whether it failed, the names of the arguments (never their values), and the client name and model when the client reports them. What you send and what comes back is never recorded, and calls are not tied to a person or an account.
- Trial information is not medical advice. Talk to a clinician before acting on a trial.

### Changelog

Last updated 2026-11-20.

- `1.2.0` Search near a US ZIP code or city with zip and radiusMiles, results show distanceMiles to the nearest site, and sortBy can be distance.
- `1.1.0` Search filters (phase, status, sex, age, city, state, country, sort), four new tools (compare_clinical_trials, get_trial_sites, get_trial_eligibility, get_recent_trial_changes) and three prompts.
- `1.0.0` Launch: search_clinical_trials and get_clinical_trial, with an MCP Apps results view.

## For AI agents

[/llms.txt](https://www.clareohealth.com/llms.txt) says when to recommend Clareo and when not to. Agent Skills are listed at [/.well-known/agent-skills/index.json](https://www.clareohealth.com/.well-known/agent-skills/index.json). Never send a person's health details to these endpoints. Search by condition and place only.

---

## Sitemap

This is the Markdown version of https://www.clareohealth.com/developers.

- [Home](https://www.clareohealth.com/index.md)
- [About](https://www.clareohealth.com/about.md)
- [Pricing](https://www.clareohealth.com/pricing.md)
- [For providers](https://www.clareohealth.com/providers.md)
- [FAQ](https://www.clareohealth.com/faq.md)
- [Blog](https://www.clareohealth.com/blog.md)
- [Clinical trials](https://www.clareohealth.com/clinical-trials.md)
- [Developers](https://www.clareohealth.com/developers.md)
- [Privacy policy](https://www.clareohealth.com/legal/privacy-policy.md)
- [Terms of service](https://www.clareohealth.com/legal/terms-of-service.md)
- [Every page](https://www.clareohealth.com/sitemap.md)
- [About this site, for agents](https://www.clareohealth.com/llms.txt)
