Clinicaltrialsgov MCP Server logo

Clinicaltrialsgov MCP Server

Search ClinicalTrials.gov, retrieve protocols and results, inspect API fields, and find candidate recruiting trials.

Install Clinicaltrialsgov MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "clinicaltrialsgov-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

clinicaltrialsgov-mcp-server connects MCP clients to the ClinicalTrials.gov API v2 for study search, protocol retrieval, results access, field discovery, and candidate-trial matching. Its seven tools support full-text and structured queries, pagination, geographic filters, counts, study projections, and bounded result retrieval. The server also exposes an NCT ID resource and a prompt for clinical-trial landscape analysis. Use it for research workflows that need registry data without an API key, while reviewing eligibility criteria manually because matching does not evaluate inclusion or exclusion text.

Use cases

  • Search recruiting studies by condition, phase, status, or location
  • Retrieve protocol records and posted results for selected NCT IDs
  • Count studies before downloading detailed records
  • Inspect valid ClinicalTrials.gov fields and values
  • Match patient profiles to candidate recruiting trials

Key features

  • ClinicalTrials.gov API v2 search and retrieval
  • Field discovery with value counts and definitions
  • Protocol and posted-results access
  • Patient-to-trial candidate matching
  • STDIO and Streamable HTTP transports
  • NCT ID JSON resource and analysis prompt

Tools7

What Clinicaltrialsgov MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~217 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

12/12 checks healthy over the last 47d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · clinicaltrialsgov-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars99Stargazers on the source repository.
npm downloads5.9kPackage downloads in the last 30 days.
Last commit9d agoMost recent push to the default branch.
Tools exposed7Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Clinicaltrialsgov MCP Server works

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.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Clinicaltrialsgov MCP Server

clinicaltrialsgov-mcp-server is an MCP server that connects AI clients to the ClinicalTrials.gov API v2. Its main tools search studies, retrieve protocol records and posted results, count matches, inspect fields and values, and find candidate recruiting trials from patient demographics and conditions.

Install it through an MCP client using the published package and an `npx` command. The project provides installation links for Claude Desktop, Cursor, and VS Code. You can also use the hosted Streamable HTTP endpoint at `https://clinicaltrials.caseyjhand.com/mcp`.

No, it does not require an API key. The server accesses ClinicalTrials.gov API v2 through its local STDIO or Streamable HTTP deployment.

No, it only finds candidate trials. `clinicaltrials_find_eligible` matches demographics, conditions, location, recruitment status, and healthy-volunteer status, but does not check inclusion or exclusion criteria; retrieve the study record for further review.

Call `clinicaltrials_get_study_results` with up to 20 NCT IDs and select sections such as outcomes, adverse events, participant flow, baseline, or more information. Summaries, limits, and offsets help manage large result sets, while additional IDs can be returned for later calls.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewClinicaltrialsgov MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/clinicaltrialsgov-mcp-server?style=directory)](https://allmcps.com/mcp/clinicaltrialsgov-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/clinicaltrialsgov-mcp-server"><img src="https://allmcps.com/api/badge/clinicaltrialsgov-mcp-server?style=directory" alt="Clinicaltrialsgov MCP Server on AllMCPs" /></a>