# clinicaltrialsgov-mcp-server MCP server

Search ClinicalTrials.gov — find studies, retrieve results, match patients to eligible trials.

## Links
- Registry page: https://www.getdrio.com/mcp/io-github-cyanheads-clinicaltrialsgov-mcp-server
- Repository: https://github.com/cyanheads/clinicaltrialsgov-mcp-server

## Install
- Command: `npx -y clinicaltrialsgov-mcp-server`
- Endpoint: https://clinicaltrials.caseyjhand.com/mcp
- Auth: Not captured

## Setup notes
- Package: Npm clinicaltrialsgov-mcp-server v2.6.4
- Environment variable: CT_API_BASE_URL (default https://clinicaltrials.gov/api/v2)
- Environment variable: CT_REQUEST_TIMEOUT_MS (default 30000)
- Environment variable: CT_MAX_PAGE_SIZE (default 200)
- Environment variable: MCP_LOG_LEVEL (default info)
- Package: Npm clinicaltrialsgov-mcp-server v2.6.4
- Environment variable: CT_API_BASE_URL (default https://clinicaltrials.gov/api/v2)
- Environment variable: CT_REQUEST_TIMEOUT_MS (default 30000)
- Environment variable: CT_MAX_PAGE_SIZE (default 200)
- Environment variable: MCP_HTTP_HOST (default 127.0.0.1)
- Environment variable: MCP_HTTP_PORT (default 3010)
- Environment variable: MCP_HTTP_ENDPOINT_PATH (default /mcp)
- Environment variable: MCP_AUTH_MODE (default none)
- Environment variable: MCP_LOG_LEVEL (default info)
- Remote endpoint: https://clinicaltrials.caseyjhand.com/mcp

## Tools
- clinicaltrials_search_studies (Clinicaltrials Search Studies) - Search for clinical trial studies from ClinicalTrials.gov. Supports full-text and field-specific queries, status/phase/geographic filters, pagination, sorting, and field selection. Returns a compact per-study index by default; pass the fields parameter to get specific leaves at full fidelity — full study records are ~70KB each. Endpoint: https://clinicaltrials.caseyjhand.com/mcp
- clinicaltrials_get_study_record (Clinicaltrials Get Study Record) - Fetch a single clinical trial study by NCT ID from ClinicalTrials.gov. Returns the full study record including protocol details, eligibility criteria, outcomes, arms, interventions, contacts, and locations. Optional locationLimit / outcomeLimit / referenceLimit / nearLocation parameters trim locations, outcomes, and references — original totals are preserved in `filtersApplied` only when a cap actually trims the set. Endpoint: https://clinicaltrials.caseyjhand.com/mcp
- clinicaltrials_get_study_count (Clinicaltrials Get Study Count) - Get total clinical trial study count from ClinicalTrials.gov matching a query, without fetching study data. Fast and lightweight. Use for quick statistics or to build breakdowns by calling multiple times with different filters (e.g., count by phase, count by status, count recruiting vs completed for a condition). Endpoint: https://clinicaltrials.caseyjhand.com/mcp
- clinicaltrials_get_field_values (Clinicaltrials Get Field Values) - Discover valid values for ClinicalTrials.gov fields with study counts per value. Use to explore available filter options before building a search — e.g., valid OverallStatus, Phase, InterventionType, StudyType, or LeadSponsorClass values. Endpoint: https://clinicaltrials.caseyjhand.com/mcp
- clinicaltrials_get_field_definitions (Clinicaltrials Get Field Definitions) - Resolve valid field names from the ClinicalTrials.gov data model — the canonical PascalCase identifiers (OverallStatus, EnrollmentCount, LeadSponsorName) accepted by the `fields`, `advancedFilter`, and `sort` parameters of other tools, and as input to clinicaltrials_get_field_values. Select a mode: `"search"` — keyword search returning ranked matches (pass `query`, e.g. "enrollment", "sponsor", "adverse events"); `"drill"` — drill into a specific section by dot-notation path (pass `path`, e.g. "protocolSection.designModule"); `"overview"` — top-level summary of all sections (no additional args). Endpoint: https://clinicaltrials.caseyjhand.com/mcp
- clinicaltrials_get_study_results (Clinicaltrials Get Study Results) - Fetch clinical trial results data from ClinicalTrials.gov for completed studies — outcome measures with statistics, adverse events, participant flow, baseline characteristics, and results metadata (limitations & caveats, certain-agreement disclosure restrictions, results point of contact). Only available for studies where hasResults is true. Use clinicaltrials_search_studies first to find studies with results. Endpoint: https://clinicaltrials.caseyjhand.com/mcp
- clinicaltrials_find_eligible (Clinicaltrials Find Eligible) - Match patient demographics and conditions to eligible recruiting clinical trials. Provide age, sex, conditions, and location to find studies with matching eligibility criteria, contact information, and recruiting locations. Results are re-ranked so studies whose own condition matches a requested condition surface above tangential matches from ClinicalTrials.gov's fuzzy condition search. Endpoint: https://clinicaltrials.caseyjhand.com/mcp

## Resources
Not captured

## Prompts
- analyze_trial_landscape - Guides analysis of a clinical trial landscape using the ClinicalTrials.gov MCP tools. Adaptable workflow for breakdowns by status, phase, sponsor, geography, etc. Arguments: topic, focusAreas

## Metadata
- Owner: io.github.cyanheads
- Version: 2.6.4
- Runtime: Npm
- Transports: STDIO, HTTP
- License: Not captured
- Language: Not captured
- Stars: Not captured
- Updated: Jun 5, 2026
- Source: https://registry.modelcontextprotocol.io
