Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ClinicalTrials.gov MCP Serverfind recruiting trials for breast cancer in New York"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ClinicalTrials.gov MCP Server
A Model Context Protocol (MCP) server that provides access to the ClinicalTrials.gov database, enabling Claude and other AI assistants to search and retrieve information about clinical trials.
Overview
This MCP server implements the ClinicalTrials.gov API v2, providing comprehensive access to information about clinical studies registered in the United States and internationally. The database contains over 400,000 clinical trials from 220+ countries.
Features
Comprehensive Search: Search clinical trials by:
Medical conditions/diseases
Interventions/treatments
Sponsors and investigators
Geographic location
Study status (recruiting, completed, etc.)
NCT identifiers
Detailed Study Information: Retrieve complete study records including:
Protocol information
Eligibility criteria
Intervention details
Outcome measures
Contact information and locations
Study design and methodology
Results (when available)
Aggregate Statistics: Get summary statistics and trends across clinical trials
Installation
Prerequisites
Python 3.10 or higher
pip
Install from source
Configuration
For Claude Desktop
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
For other MCP clients
Use the stdio transport to connect:
Tools
1. search_clinical_trials
Search for clinical trials using various criteria.
Parameters:
query_cond(string): Search by condition/disease (e.g., "Depression", "Breast Cancer")query_term(string): General keyword search across all fieldsquery_intr(string): Search by intervention/treatment (e.g., "Pembrolizumab", "CBT")query_titles(string): Search in study titlesquery_outc(string): Search in outcome measuresquery_spons(string): Search by sponsor namequery_lead(string): Search by lead sponsorquery_id(string): Search by NCT IDquery_patient(string): Search using patient-friendly languagequery_locn(string): Search by location (e.g., "New York", "Mayo Clinic")filter_overallStatus(array): Filter by recruitment statusValid values: RECRUITING, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, SUSPENDED, TERMINATED, WITHDRAWN, ENROLLING_BY_INVITATION, AVAILABLE, NO_LONGER_AVAILABLE, APPROVED_FOR_MARKETING, WITHHELD, TEMPORARILY_NOT_AVAILABLE
filter_geo(string): Geographic filter (e.g., "distance(40.7,-74,50mi)")filter_advanced(string): Advanced filter expressionpage_size(integer): Results per page (default 20, max 1000)page_token(string): Token for paginationcount_total(boolean): Include total count of resultssort(array): Sort order (e.g., ["@relevance"])
Example Usage:
2. get_clinical_trial
Retrieve detailed information about a specific clinical trial by its NCT ID.
Parameters:
nct_id(string, required): The NCT ID of the study (e.g., "NCT04267848")fields(array, optional): Specific fields to return (returns all if not specified)
Example Usage:
3. get_trial_statistics
Get aggregate statistics about clinical trials.
Parameters:
filter_overallStatus(array): Filter statistics by recruitment statusfilter_geo(string): Geographic filter for statisticsagg_filters(string): Aggregation filter expression
Example Usage:
Common Use Cases
1. Finding trials for a specific condition
2. Finding trials by a specific sponsor
3. Finding trials in a specific location
4. Finding trials with specific interventions
5. Getting detailed information about a trial
API Details
This server uses the ClinicalTrials.gov API v2, which is a REST API with OpenAPI 3.0 specification.
Base URL: https://clinicaltrials.gov/api/v2
Key Endpoints:
/studies- Search and list studies/studies/{nctId}- Get specific study details/stats- Get aggregate statistics
Rate Limits: The API does not publish specific rate limits, but reasonable use is expected. The server implements timeout handling (30 seconds per request).
Data Structure
Study records contain multiple modules:
protocolSection: Core study information
identificationModule: NCT ID, title, org info
statusModule: Recruitment status, dates
descriptionModule: Brief and detailed descriptions
conditionsModule: Conditions being studied
designModule: Study design details
armsInterventionsModule: Study arms and interventions
outcomesModule: Primary and secondary outcomes
eligibilityModule: Inclusion/exclusion criteria
contactsLocationsModule: Contact info and study sites
referencesModule: Related publications
resultsSection: Study results (when available)
derivedSection: Computed/derived information
documentSection: Supporting documents
Troubleshooting
Connection Issues
If you encounter connection errors:
Verify internet connectivity
Check that the ClinicalTrials.gov API is accessible
Review proxy settings if behind a corporate firewall
No Results Found
If searches return no results:
Try broader search terms
Remove filters to see all results
Check spelling of medical terms
Try alternative terminology (e.g., "MI" vs "Myocardial Infarction")
Pagination
For large result sets:
Use
page_sizeto control results per page (max 1000)Use
page_tokenfrom response to fetch next pageSet
count_total: trueto see total matching studies
References
License
This MCP server is provided as-is for accessing public data from ClinicalTrials.gov. Users must comply with ClinicalTrials.gov Terms and Conditions.
Support
For issues with:
This MCP server: Create an issue in the repository
ClinicalTrials.gov API: Contact register@clinicaltrials.gov
Study data questions: Contact the study sponsor or principal investigator
Version History
1.0.0 (2025-12-02)
Initial release
Support for ClinicalTrials.gov API v2
Search, retrieve, and statistics tools
Comprehensive field support
Pagination support