ClinicalTrials.gov

SSE

by cyanheads

4.9k downloads Not rated yet

About

Search and retrieve clinical trial data from the official ClinicalTrials.gov API.

Details

Transport
SSE

Explore

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name ClinicalTrials.gov
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

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.

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.

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).

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.

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…

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.

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.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "clinicaltrials.gov": {
            "server": {
                "command": "npx",
                "args": [
                    "-y",
                    "clinicaltrialsgov-mcp-server",
                    "run",
                    "start:stdio"
                ],
                "env": {
                    "CT_API_BASE_URL": "",
                    "CT_REQUEST_TIMEOUT_MS": "",
                    "CT_MAX_PAGE_SIZE": "",
                    "MCP_LOG_LEVEL": ""
                }
            }
        }
    }
}

McpServers

{
    "server": {
        "command": "npx",
        "args": [
            "-y",
            "clinicaltrialsgov-mcp-server",
            "run",
            "start:stdio"
        ],
        "env": {
            "CT_API_BASE_URL": "",
            "CT_REQUEST_TIMEOUT_MS": "",
            "CT_MAX_PAGE_SIZE": "",
            "MCP_LOG_LEVEL": ""
        }
    }
}

Transport

"stdio"

Package

"clinicaltrialsgov-mcp-server"

Registry

"npm"

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

Public Hosted Server:https://clinicaltrials.caseyjhand.com/mcp

Seven tools for searching, discovering, analyzing, and matching clinical trials:

Primary search tool with full ClinicalTrials.gov query capabilities.

- Full-text and field-specific queries (condition, intervention, sponsor, location, title, outcome)
- Status and phase filters with typed enum values
- Geographic proximity filtering by coordinates and distance
- Advanced AREA
[] Essie expression support for complex queries
- Compact index results by default; passfieldsfor a full-fidelity projection of specific leaves (a full single record is ~70KB — fetch one withget_study_record)
- Pagination with cursor tokens, sorting by any field

Fetch posted results data for completed studies.

- Outcome measures with statistics, adverse events, participant flow, baseline characteristics
- Section-level filtering (request only the data you need)
- Optional summary mode condenses full results (~200KB) to essential metadata (~5KB per study)
- Batch multiple NCT IDs per call with partial-success reporting
- Separate tracking of studies without results and fetch errors

Match a patient profile to eligible recruiting trials.

- Takes age, sex, conditions, and location as patient demographics
- Builds optimized API queries with demographic filters (age range, sex, healthy volunteers)
- Re-ranks results so studies whose own condition matches a requested condition surface above tangential matches from the upstream fuzzy condition search
- Returns studies with eligibility and location fields for the caller to evaluate
- Bounds each candidate to the sites matching the requested location (capped bylocationLimit) rather than every site the study registers worldwide, adds the nearest recruiting site when none of the matched ones is open, and discloses what was omitted
- Provides actionable hints when no studies match (broaden conditions, adjust filters)

- Declarative tool/resource/prompt definitions with Zod schemas and format functions
- Unified error handling — handlers throw, framework catches and classifies
- Dual transport: stdio and Streamable HTTP from the same codebase
- Pluggable auth (none,jwt,oauth) for HTTP transport
- Structured logging with optional OpenTelemetry tracing

- Type-safe client for theClinicalTrials.gov REST API v2
- Public API — no authentication or API keys required
- Retry with exponential backoff (3 attempts) and rate limiting (~1 req/sec)
- HTML error detection and structured error factories

A public instance is available athttps://clinicaltrials.caseyjhand.com/mcp— no installation required. Point any MCP client at it via Streamable HTTP:

{ "mcpServers": { "clinicaltrialsgov-mcp-server": { "type": "streamable-http", "url": "https://clinicaltrials.caseyjhand.com/mcp" } } }

Add to your MCP client config (e.g.,claude_desktop_config.json):

{ "mcpServers": { "clinicaltrialsgov-mcp-server": { "type": "stdio", "command": "bunx", "args": ["clinicaltrialsgov-mcp-server@latest"], "env": { "MCP_TRANSPORT_TYPE": "stdio" } } } }
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010

- Bun v1.3.0or higher (or Node.js >= 24.0.0)

git clone https://github.com/cyanheads/clinicaltrialsgov-mcp-server.git

All configuration is optional — the server works with defaults and no API keys.

bun run build bun run start:http # or start:stdio
bun run devcheck # Lints, formats, type-checks bun run test # Runs test suite
docker build -t clinicaltrialsgov-mcp-server . docker run -p 3010:3010 clinicaltrialsgov-mcp-server

SeeCLAUDE.mdfor development guidelines and architectural rules. The short version:

- Handlers throw, framework catches — notry/catchin tool logic
- Usectx.logfor request-scoped logging, noconsolecalls
- Register new tools and resources in theindex.tsbarrel files

Issues and pull requests are welcome. Run checks before submitting:

Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.

Fetch, convert, and search AWS documentation pages, with recommendations for related content.

Search campgrounds around the world on campertunity, check availability, and provide booking links.

The Ferryhopper MCP Server exposes ferry routes, schedules and booking redirects so an AI assistant can discover connections across Europe and the Mediterranean and send users to Ferryhopper to complete bookings.

All-in-One SEO & Web Intelligence Toolkit API from FetchSERP.

MCP server that provides read-only access to HyperKitty, the web-based email archive component of Mailman 3.

At Sunrise Apps, we believe AI agents should be limitless, especially when it comes to visual data. We created ImageSorcery to bridge the critical gap in AI's ability to interact with and manipulate images directly, all while upholding the highest standards of privacy and security.

Just Domain is the domain registrar for businesses built with AI. Its remote MCP server checks availability and returns first-year and renewal pricing, plus a link to register on justdomain.ai, with DNS and WHOIS privacy in the same place. No account, no API key, read only. Endpoint: https://mcp.justdomain.ai/

Research tools, including a Sqlite-backed document stash

Semantic search over 9 free-license stock photo sources. Hosted remote server with OAuth — no API key to paste.

SerpApi MCP Server for Google and other search engine results

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.