cyanheads/clinicaltrialsgov-mcp-server

View on GitHub ↗

Search ClinicalTrials.gov trials, retrieve study details and results, and match patients to eligible trials via MCP. STDIO or Streamable HTTP.

87 ★23 forksTypeScriptUpdated 1mo ago

What you need to know

MCP server for the ClinicalTrials.gov API exposing 7 tools to search trials, fetch study details and results, and match patients to eligible trials, with a free public hosted instance.

Install

bunx clinicaltrialsgov-mcp-server@latest
docker run -p 3010:3010 clinicaltrialsgov-mcp-server
git clone https://github.com/cyanheads/clinicaltrialsgov-mcp-server.git && cd clinicaltrialsgov-mcp-server && bun install

Usage

  • Point any MCP client at the public hosted instance https://clinicaltrials.caseyjhand.com/mcp
  • MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 for self-hosted Streamable HTTP
  • clinicaltrials_search_studies and clinicaltrials_find_eligible for trial matching

Key features

  • Search studies with full-text queries, filters, pagination, sorting, and field selection
  • Fetch full study records, counts, field values, and field definitions
  • Study results extraction (outcomes, adverse events, participant flow, baselines) with summary mode
  • Patient-to-trial eligibility matching (clinicaltrials_find_eligible)
  • No API key required; public ClinicalTrials.gov REST v2
  • Dual transport (stdio + Streamable HTTP) and pluggable auth (none/jwt/oauth)
  • OpenTelemetry tracing and structured logging

Best for

Researchers, clinicians, and patients who want clinical-trial search and eligibility matching through an AI assistant

Caveats

  • No authentication or API keys required — it queries the public ClinicalTrials.gov API
  • Requires Bun v1.3.0+ or Node.js >= 24.0.0 for self-hosted install
  • A full single study record is ~70KB, so prefer compact index results
  • Rate-limited to roughly 1 request/sec with 3 retry attempts
Platforms: macOS · Linux · WindowsClients: Claude Desktop · Cursor · VS Code
Documentation ↗

Reviewed 2026-08-11

Topics

ai-agentbioinformaticsclinical-trialsclinicaltrials-govcyanheadseligibility-criteriahealth-techmcpmcp-servermodel-context-protocolpatient-matchingresearch-toolstrial-findertypescript
Stars
87★
Forks
23
Language
TypeScript
License
Apache-2.0
Created
2025-06-17
Last push
2026-07-26