# Clinicaltrialsgov MCP Server (MCP server)

> Clinicaltrialsgov MCP Server is an MCP server that adds tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Search ClinicalTrials.gov: find studies, retrieve results, match patients to candidate trials. It has 101 GitHub stars, is released under the Apache-2.0 license and runs locally with npx -y clinicaltrialsgov-mcp-server.

clinicaltrialsgov-mcp-server Search ClinicalTrials.gov trials, retrieve study details and results, and match patients to candidate trials via MCP. STDIO or Streamable HTTP. 7 Tools • 1 Resource • 1 Prompt • 1 Skill

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/cyanheads/clinicaltrialsgov-mcp-server |
| GitHub stars | 101 |
| License | Apache-2.0 |
| Language | TypeScript |
| Transport | stdio, streamable-http |
| Packages | npm: clinicaltrialsgov-mcp-server |
| Remote URL | https://clinicaltrials.caseyjhand.com/mcp |
| Needs API key | no |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code, Claude.ai, ChatGPT |
| Category | Other |
| Latest release | v2.11.3 (Nov 13, 2026) |
| Last commit | Nov 13, 2026 |
| MCP registry name | io.github.cyanheads/clinicaltrialsgov-mcp-server |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "clinicaltrialsgov-mcp-server"
      ],
      "env": {
        "CT_API_BASE_URL": "your-value",
        "CT_REQUEST_TIMEOUT_MS": "your-value",
        "CT_MAX_PAGE_SIZE": "your-value",
        "MCP_LOG_LEVEL": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env CT_API_BASE_URL=your-value --env CT_REQUEST_TIMEOUT_MS=your-value --env CT_MAX_PAGE_SIZE=your-value --env MCP_LOG_LEVEL=your-value --transport stdio clinicaltrialsgov-mcp-server -- npx -y clinicaltrialsgov-mcp-server
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "clinicaltrialsgov-mcp-server"
      ],
      "env": {
        "CT_API_BASE_URL": "your-value",
        "CT_REQUEST_TIMEOUT_MS": "your-value",
        "CT_MAX_PAGE_SIZE": "your-value",
        "MCP_LOG_LEVEL": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "clinicaltrialsgov-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "clinicaltrialsgov-mcp-server"
      ],
      "env": {
        "CT_API_BASE_URL": "your-value",
        "CT_REQUEST_TIMEOUT_MS": "your-value",
        "CT_MAX_PAGE_SIZE": "your-value",
        "MCP_LOG_LEVEL": "your-value"
      }
    }
  }
}
```

### Claude Code (remote)

```sh
claude mcp add --transport http clinicaltrialsgov-mcp-server "https://clinicaltrials.caseyjhand.com/mcp"
```

The same server is also hosted as a remote MCP endpoint, so nothing runs on your machine.

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `CT_API_BASE_URL`: ClinicalTrials.gov API base URL.
- `CT_REQUEST_TIMEOUT_MS`: Timeout in milliseconds for each attempt at a ClinicalTrials.gov request; a positive integer. An attempt ends sooner when its tool call or resource read runs…
- `CT_MAX_PAGE_SIZE`: Most studies one clinicaltrialssearchstudies page returns; an integer of at least 1, values above 1000 clamp to 1000.
- `MCP_LOG_LEVEL`: Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

## Tools

- `clinicaltrials_search_studies`: Search studies with full-text and field-specific queries, status/phase/geographic filters, pagination, sorting, and…
- `clinicaltrials_get_study_record`: Fetch a single study by NCT ID — full protocol record with optional location/outcome/reference caps
- `clinicaltrials_get_study_count`: Fast total study count for a query, without fetching data
- `clinicaltrials_get_field_values`: Discover valid values for API fields, with per-value study counts
- `clinicaltrials_get_field_definitions`: Resolve valid field names — keyword search, path drill-down, or top-level overview
- `clinicaltrials_get_study_results`: Fetch posted results — outcomes, adverse events, participant flow, baseline — for completed studies
- `clinicaltrials_find_eligible`: Match patient demographics and conditions to candidate recruiting trials, without checking inclusion/exclusion criteria

## Similar MCP servers

- [Timepicker UI MCP](https://appsgit.com/mcp-servers/timepicker-ui-mcp): MCP server for timepicker-ui: options, events, themes, public API, snippets and time validation. (102 stars, MIT)
- [熔岩 Lava · A股机构/大V消息面热度监测](https://appsgit.com/mcp-servers/lava-a-v): 查A股个股/概念最近被多少机构/大V提及、热度高不高。只读数据，机构/大V用匿名ID。量化交易必备。. (100 stars, MIT, needs API key)
- [Open Library](https://appsgit.com/mcp-servers/open-library): Search books and authors on the Internet Archive's Open Library. (102 stars, MIT)
- [Korea Tax Calculator](https://appsgit.com/mcp-servers/korea-tax-calculator): Korean tax calculator (140 tools, statute-cited): CIT, VAT, withholding, expats, transfer pricing. (98 stars, MIT, official)
- [SolidWorks MCP](https://appsgit.com/mcp-servers/solidworks-mcp): Drive SolidWorks from AI agents: parts, assemblies, drawings and export over the COM API. (103 stars, MIT)
- [Arm MCP Server](https://appsgit.com/mcp-servers/arm-mcp-server): Official Arm MCP server for code migration, optimization, and Arm architecture guidance. (95 stars, Apache-2.0, official)

---

Canonical page: https://appsgit.com/mcp-servers/clinicaltrialsgov-mcp-server
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed daily.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
