# clinicaltrialsgov-mcp-server [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/cyanheads/clinicaltrialsgov-mcp-server  
**GitHub Stars:** 100  
**npm Downloads (last month):** 6151  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/clinicaltrialsgov-mcp-server

## Description
Provides rich tools to search, retrieve, and analyze data from ClinicalTrials.gov API v2.

## Tools
Capabilities this server exposes over MCP:

- **clinicaltrials_search_studies** — Search studies with full-text and field-specific queries, status/phase/geographic filters, pagination, sorting, and field selection
- **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

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "clinicaltrialsgov-mcp-server": {
    "command": "npx",
    "args": ["-y","clinicaltrialsgov-mcp-server"]
  }
}
```

## Documentation

## What clinicaltrialsgov-mcp-server does

clinicaltrialsgov-mcp-server exposes ClinicalTrials.gov data through the Model Context Protocol. It can search the registry, retrieve complete protocol records by NCT ID, count matching studies, inspect valid API fields and values, obtain posted study results, and identify candidate recruiting trials from a patient profile.

The server targets ClinicalTrials.gov API v2 and requires no API key. It can run locally over STDIO or be accessed through a hosted Streamable HTTP endpoint. A resource addressed as `clinicaltrials://{nctId}` returns a JSON study record with server-side caps, and the `analyze_trial_landscape` prompt structures an analysis using count and search operations.

## How it works

Search requests accept free-text queries alongside condition, intervention, location, sponsor, title, and outcome fields. Status, phase, geographic, advanced, sorting, pagination, and field-selection options allow callers to narrow or shape results. Compact study indexes are returned by default; selected fields can request a fuller projection.

NCT-specific retrieval returns protocol data and can cap locations, outcomes, and references. Location-aware retrieval can order sites around a latitude and longitude. Results requests support multiple NCT IDs, selected sections, summaries, limits, and offsets. Batch responses report individual fetch failures and studies without posted results rather than failing the entire request.

The eligibility matcher filters by age, sex, conditions, location, recruitment status, and healthy-volunteer status. Its response includes filter-stage counts and can disclose truncated results with replayable search criteria. It does not inspect inclusion or exclusion criteria, so candidate matches require follow-up review.

## Setup and configuration

The package can be installed in MCP clients using the published `clinicaltrialsgov-mcp-server` package and an `npx` command. The repository provides install links for Claude Desktop, Cursor, and VS Code. The server also publishes a hosted MCP endpoint at `https://clinicaltrials.caseyjhand.com/mcp`, and supports local STDIO or Streamable HTTP operation.

No API key is required. Client configuration should select the transport appropriate to the deployment: a local command for STDIO or the hosted MCP URL for Streamable HTTP.

## Tools and capabilities

- `clinicaltrials_search_studies`: Query studies with text, field, status, phase, geographic, pagination, sorting, and selected-field controls.
- `clinicaltrials_get_study_record`: Fetch a protocol by NCT ID with optional list caps and nearby-location ordering.
- `clinicaltrials_get_study_count`: Return only the total matching-study count.
- `clinicaltrials_get_field_values`: Inspect common field values and their study counts, plus statistics for numeric, date, and boolean fields.
- `clinicaltrials_get_field_definitions`: Find valid field names through keyword search, path drill-down, or an overview.
- `clinicaltrials_get_study_results`: Retrieve outcomes, adverse events, participant flow, baseline data, or additional result information.
- `clinicaltrials_find_eligible`: Produce candidate recruiting trials from demographic, condition, and location inputs.

## Limitations and notes

Search pages are subject to a server-side cap, and eligibility calls return at most 50 results per call even when a larger maximum is requested. Full records and result sections can be large, so caps, summaries, and offsets are available. The NCT resource applies fixed caps to locations, secondary or other outcomes, and references, and replaces result data with counts. API rate limits and typed validation errors can affect requests. Eligibility output is candidate matching, not a determination that a patient meets a trial's full criteria.

_Full upstream README: https://allmcps.com/mcp/clinicaltrialsgov-mcp-server/readme_

