This MCP server enables intelligent querying of clinical trials from ClinicalTrials.gov with optimized defaults for finding relevant, currently recruiting trials.
Key Capabilities:
Smart Clinical Trial Search - Search using keywords (e.g., "KRAS G12D"), disease/condition (e.g., "Pancreatic Cancer"), country, or city with automatic filtering for recruiting status and past 3 months
Geographic Search - Find trials near specific coordinates (latitude/longitude) with customizable radius in miles
Comprehensive Trial Details - Retrieve full information using NCT ID including:
Principal investigators and research team
Hospital locations organized by city
Contact information (phone and email)
Eligibility criteria (inclusion/exclusion requirements)
Study descriptions, protocols, and outcome measures
Flexible Filtering - Customize by recruitment status (RECRUITING, COMPLETED, NOT_YET_RECRUITING, etc.), time range (default 3 months), and pagination (up to 100 results per page)
Bilingual Support - Handle queries in both English and Chinese
Structured Output - All responses in JSON format optimized for LLM processing
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., "@Clinical Trials MCP Serverfind recruiting lung cancer trials in New York from the past 3 months"
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.
Clinical Trials MCP Server
English | 简体中文
MCP server for querying clinical trials from ClinicalTrials.gov API v2. Provides intelligent search with defaults optimized for finding relevant, currently recruiting trials.
功能特性 Features
🔍 Smart Search: Keywords, disease type, location-based search
📍 Geographic: Search by country, city, or coordinates
⏰ Time Filters: Default to past 3 months (recruiting trials)
📊 Detailed Info: Complete trial details including PI, contacts, eligibility
🌐 Bilingual: Supports Chinese and English queries
Quick Start with npx
No installation required! Run directly:
MCP Client Configuration
Add to your MCP client settings:
Using npx (Recommended)
Using local installation
Available Tools
1. search_clinical_trials
Search for clinical trials with intelligent defaults.
Default Behavior:
Status:
RECRUITING(currently recruiting)Time: Past 3 months (trials more likely to be open)
Results: 30 most relevant trials, sorted by recent updates
Parameters:
keywords(string): Keywords like "KRAS G12D", "PD-1", "Pembrolizumab"condition(string): Disease/condition like "Pancreatic Cancer", "肠癌"country(string): Country name like "China", "United States", "中国"city(string): City name like "Beijing", "上海", "New York"months(number): Time range in months (default: 3)status(string): Recruitment status (default: "RECRUITING")pageSize(number): Results per page (default: 30, max: 100)pageToken(string): Pagination token
Example:
2. get_trial_details
Get comprehensive trial details including:
Principal Investigators (PI) information
Hospital locations by city
Contact details (phone, email)
Detailed study description
Eligibility criteria (inclusion/exclusion)
Primary/secondary outcomes
Parameters:
nctId(string, required): NCT number like "NCT04852770"
Example:
3. search_by_location
Search trials by geographic coordinates.
Parameters:
latitude(number, required): Latitudelongitude(number, required): Longituderadius(number): Search radius in miles (default: 50)condition(string): Disease/condition (optional)keywords(string): Keywords (optional)status(string): Recruitment status (default: "RECRUITING")months(number): Time range (default: 3)pageSize(number): Results per page (default: 30)
Example:
Output Format
All responses are in JSON format, optimized for LLM processing.
Search Results
Trial Details
Includes all search fields plus:
investigators[]- PI and research teamoverallOfficials[]- Study officialscentralContacts[]- Global contact info (phone, email)locations[]- All hospital sites with local contactslocationsSummary- Statistics (countries, cities, total sites)eligibility- Detailed inclusion/exclusion criteriaprimaryOutcomes[],secondaryOutcomes[]- Study endpointsbriefSummary,detailedDescription- Full study description
Toolchain Prompt Guidance
To ensure stability, accuracy, and user experience when calling this MCP service, we provide dedicated toolchain prompt documentation. These prompts are not just optional references—they are essential foundations for using this service effectively.
Why Toolchain Prompts Matter
Stability: Prompts standardize tool-calling sequences (search → details → structured output), preventing LLM from making arbitrary calls that result in low efficiency or messy results.
Accuracy: Clear parameter-selection rules and location-filtering logic ensure search results match patient questions precisely (e.g., drug name + province like GFH276 + Zhejiang hospitals).
User Experience: A unified four-part output structure (conclusion first → evidence & explanation → key tips → risks & channel reminders) helps patients/families understand quickly, avoid risks, and find next-step support.
Prompt Files & Usage Methods
1. Compact Version (Recommended for Production)
Purpose: Use directly as the system prompt / developer prompt for MCP clients (e.g., Claude Desktop).
Benefits: Concise and powerful; contains all core rules and scenarios; minimizes token waste.
How to use:
Copy or reference the file content into your LLM's system prompt.
LLM will automatically call
search_clinical_trialsandget_trial_detailsfollowing the toolchain rules.Output will auto-organize into the four-part structure, optimized for patient/family reading.
2. Full Version (Reference & Documentation)
Purpose: Detailed explanations and additional scenarios for developers to understand or customize.
When to use:
Need to understand the full toolchain design philosophy.
Adding new clinical query scenarios.
Team training or documentation reference.
Typical Usage Scenarios
Scenario 1: Query GFH276 + Zhejiang Hospitals
Scenario 2: Find Trials Near Patient
Integration Recommendations
Claude Desktop Users: Paste
CLINICAL_TRIALS_PROMPT_REFERENCE_COMPACT.mdcontent into your Claude Desktop custom system prompt, or reference the file at conversation start.Other MCP Clients: Based on your client's system prompt / instruction configuration, integrate the prompt content accordingly.
API Callers: If using this MCP via API, include the compact prompt version in your system prompt parameter to ensure every call follows the standard.
Commitment to Stability
We commit to long-term stability of toolchain prompts. When updating:
Backward compatibility of core rules is maintained.
Breaking changes (if any) are clearly marked in git commits.
Migration guides and version cross-reference docs are provided.
Welcome feedback or improvement suggestions! Contact us via GitHub issue or the "XiaoYiBao Assistant" WeChat official account.
API Reference
Development
Publishing to npm
License
MIT
Contributing
Contributions welcome! Please open an issue or submit a pull request.
Speical thanks to the contribution & development of Xiaoyibao-Pancrepal & xiao-x-bao community to support cancer/rare disease patients and their families with ❤️ & AI!