← Back to directory
C

ClinicalTrials.gov MCP Server

Community
Search ClinicalTrials.gov trials, retrieve study details and results, and match patients to eligible trials via MCP.
Category
Other #71 of 230
Stars
★ 99 Popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Bun 1.3.0+ · Node.js 24+ · Hosted (no local runtime)
Credentials
No credential needed
License
Apache-2.0
Last commit
Tools
7
60FMRS · C

This server provides a comprehensive set of tools to query ClinicalTrials.gov, including advanced search, patient matching, and study results extraction. It is well-designed with clear documentation and supports both transports, making it versatile for various MCP clients.

Strongest · Documentation 15/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
12/20
Maintenance
12/20
Documentation
15/20
Setup experience
13/20
Why each score
Reliability 8/20
The server manifest is well-formed: it declares 7 tools, 1 resource, and 1 prompt matching the README inventory, with separate stdio and streamable-http package entries and default environment variables. However, only the README and manifest were available for review — no source files, CI workflows, or tests — so the init/tool-list handshake and runtime behavior cannot be verified. Per static calibration, reliability cannot exceed 12 without verifiable execution evidence. Minor inconsistencies (the README's stdio example sets MCP_TRANSPORT_TYPE, which is absent from the manifest's stdio env list) and 2 open issues add uncertainty. Score: 8.
Security and permissions 12/20
No red lines triggered: no malware, credential theft, covert exfiltration, or destructive defaults; install examples contain no real tokens. The server only queries the public ClinicalTrials.gov API, needs no API keys, and follows least privilege. Deductions: HTTP transport defaults to MCP_AUTH_MODE=none with no warning; find_eligible sends patient health data (age, sex, conditions, location) to a third-party public API and to the public hosted instance without any PHI/privacy disclosure or confirmation step; data-flow disclosure is incomplete. Score: 12.
Maintenance 12/20
Evidence includes an Apache-2.0 license, an explicit version (2.8.5) with a CHANGELOG link, npm and Docker distribution channels, an unarchived repository, and only 2 open issues — indicating versioning and release paths exist. Deductions: no commit history, issue-response timeliness, or dependency-update evidence is verifiable from the supplied material; no security policy or security-response channel is documented; per the rules, star counts are discovery signals only and add no points. Score: 12.
Documentation 15/20
The README is layered: a tool/resource/prompt overview table, detailed per-tool descriptions, a config table with defaults, public-hosted and self-hosted stdio/HTTP setup examples, Docker instructions, project structure, and a development guide. Deductions: no dedicated troubleshooting/FAQ section; no formal limitations/cost disclosure (rate limiting and the 5KB summary mode are only mentioned in passing); minor inconsistencies (MCP_TRANSPORT_TYPE missing from the manifest's stdio env list; the Node.js>=24 claim vs. hardcoded Bun package arguments); no privacy/PHI documentation. Score: 15.
Setup experience 13/20
Multiple setup paths are provided: one-click mcpb install, Cursor/VS Code deep links, a public hosted endpoint with a ready-made config JSON, self-hosted stdio/HTTP instructions, and Docker; steps are few and client config examples are included. Deductions: the manifest hardcodes Bun as the runtime (runtimeHint=bun with "run start:stdio" arguments), so the README's "or Node.js >= 24.0.0" path may fail in a plain Node environment; MCP_TRANSPORT_TYPE is not listed in the manifest's env vars; and static calibration caps setup at 15 without CI+test evidence. Score: 13.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

Best for

  • Clinical researchers
  • Healthcare professionals
  • Patient navigators
  • AI agents needing access to clinical trial data

Not for

  • Not an official source for clinical trials; it's a wrapper for ClinicalTrials.gov
  • Does not provide medical advice
  • Not suitable for use with data sources other than ClinicalTrials.gov API

Required permissions

  • No API keys required; uses the public API
  • May require network access to reach the hosted instance or install packages
  • If self-hosting, may require permissions to execute and run on your system

Risks and side effects

  • Reliance on the ClinicalTrials.gov API, which may change or become unavailable
  • Data fetched from the API may be incomplete or outdated
  • Fuzzy matching in search may return irrelevant trials
  • Public hosted instance may be rate-limited or have privacy concerns

Setup

Before you start

Runtime:Bun 1.3.0+ · Node.js 24+ · Hosted (no local runtime)

Other optional settings (11)
CT_API_BASE_URL optional Base URL of the ClinicalTrials.gov API; defaults to https://clinicaltrials.gov/api/v2, usually no change needed.
CT_REQUEST_TIMEOUT_MS optional Per-request timeout in milliseconds; default 30000.
CT_MAX_PAGE_SIZE optional Maximum page size cap; default 200.
MCP_TRANSPORT_TYPE optional Transport type: stdio or http; default stdio.
MCP_HTTP_HOST optional HTTP server hostname; default 127.0.0.1.
MCP_HTTP_PORT optional HTTP server port; default 3010.
MCP_HTTP_ENDPOINT_PATH optional MCP endpoint path; default /mcp.
MCP_AUTH_MODE optional HTTP auth mode: none, jwt, or oauth; default none.
MCP_LOG_LEVEL optional Minimum log level (RFC 5424), e.g. debug, info, warn; default info.
LOGS_DIR optional Directory for log files (Node.js only); defaults to <project-root>/logs.
OTEL_ENABLED optional Enable OpenTelemetry tracing; default false.
  1. Clone the repository: git clone https://github.com/cyanheads/clinicaltrialsgov-mcp-server.git.
  2. Navigate into the directory: cd clinicaltrialsgov-mcp-server.
  3. Install dependencies: bun install. Then build and run: bun run build && bun run start:stdio (or start:http). Alternatively, use the public hosted instance: https://clinicaltrials.caseyjhand.com/mcp.
claude_desktop_config.json
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": [
        "clinicaltrialsgov-mcp-server@latest"
      ],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio"
      }
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "clinicaltrialsgov-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": [
        "clinicaltrialsgov-mcp-server@latest"
      ],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add clinicaltrialsgov-mcp-server -e MCP_TRANSPORT_TYPE=stdio -- bunx clinicaltrialsgov-mcp-server@latest

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After connecting the client, confirm the seven tools including clinicaltrials_search_studies appear in the tool list; then ask something like 'search for recruiting diabetes trials' — a returned study list confirms the connection works.

Troubleshooting

  1. Ensure you are running the latest version and use bunx to run
  2. Check environment variables like CT_API_BASE_URL (default https://clinicaltrials.gov/api/v2)
  3. Confirm network connectivity; the API should not require authentication
  4. If queries fail, check for rate limiting and retry logic with exponential backoff

Things to try

Once connected, you can ask your AI assistant things like:

  • Search ClinicalTrials.gov for recruiting trials on type 2 diabetes and list the first 10 studies.
  • Fetch the full record for trial NCT04356530.
  • Given a 45-year-old female patient with breast cancer, find recruiting trials she may be eligible for.
  • How many clinical trials are registered for Alzheimer's disease?

Tools 7

clinicaltrials_search_studies read-only
Search studies with full-text queries, filters, pagination, sorting, and field selection.
clinicaltrials_get_study_record read-only
Fetch a single study by NCT ID, returning the full record including protocol, eligibility, outcomes, arms, interventions, contacts, and locations.
clinicaltrials_get_study_count read-only
Get the total study count for a query without fetching data, providing fast statistics and breakdowns.
clinicaltrials_get_field_values read-only
Discover valid values for API fields (status, phase, study type, etc.) with per-value counts.
clinicaltrials_get_field_definitions read-only
Browse the study data model field tree — piece names, types, nesting, with subtree navigation and keyword search.
clinicaltrials_get_study_results read-only
Extract outcomes, adverse events, participant flow, and baseline from completed studies. Optional summary mode reduces ~200KB payloads to ~5KB per study.
clinicaltrials_find_eligible read-only
Match patient demographics and conditions to eligible recruiting trials. Provide age, sex, conditions, and location to find studies with matching eligibility criteria, contacts, and recruiting locations.

Use cases

Search clinical trials for specific conditions or interventions
Fetch full study records including eligibility criteria and locations
Match patient profiles to eligible recruiting trials
Analyze trial landscape with statistics
Extract results data from completed studies

Supported clients

Claude Desktop
Cursor
VS Code

Listed from the project's documentation, not tested by this site.

Overview

clinicaltrialsgov-mcp-server is an MCP server that provides seven tools for searching clinical trials on ClinicalTrials.gov, fetching study records and results, getting study counts, exploring field values, browsing the data model, and matching patients to recruiting trials based on demographics and conditions. It supports both stdio and Streamable HTTP transports and requires no API keys. The server is built on @cyanheads/mcp-ts-core, offering declarative tool definitions, unified error handling, structured logging, and optional observability.

Similar servers

BioMCP 75 · B

One binary. One grammar. Evidence from the biomedical sources you already trust.

★ 659 · Tools 11 Compare with this →

Source revision 974b6cccacb8 Data synced 2026-10-19 Read the FMRS scoring method