Clinical Trials MCP Server
Enables searching and querying clinical trials from ClinicalTrials.gov with intelligent filtering for recruiting studies, geographic search, and detailed trial information including contacts and eligibility criteria.
README
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:
npx xiaoyibao-clinical-trials
MCP Client Configuration
Add to your MCP client settings:
Using npx (Recommended)
{
"mcpServers": {
"clinical-trials": {
"command": "npx",
"args": ["-y", "xiaoyibao-clinical-trials"]
}
}
}
Using local installation
npm install -g xiaoyibao-clinical-trials
{
"mcpServers": {
"clinical-trials": {
"command": "xiaoyibao-clinical-trials"
}
}
}
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:
{
"keywords": "KRAS G12D",
"condition": "Pancreatic Cancer",
"country": "China"
}
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:
{
"nctId": "NCT04852770"
}
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:
{
"latitude": 39.9042,
"longitude": 116.4074,
"radius": 50,
"condition": "Lung Cancer"
}
Output Format
All responses are in JSON format, optimized for LLM processing.
Search Results
{
"totalCount": 13,
"count": 13,
"studies": [
{
"nctId": "NCT06218914",
"title": "Phase 1 Study to Investigate TCRTs KRAS Mutation...",
"status": "RECRUITING",
"conditions": ["Pancreatic Cancer", "KRAS G12D"],
"interventions": [{"type": "Drug", "name": "NT-112"}],
"sponsor": "AstraZeneca",
"studyType": "INTERVENTIONAL",
"phase": ["PHASE1"],
"lastUpdate": "2024-10-15"
}
]
}
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
API Reference
Development
# Clone repository
git clone git@github.com:PancrePal-xiaoyibao/xiaoyibao-clinical-trials-mcp-server.git
cd xiaoyibao-clinical-trials-mcp-server
# Install dependencies
npm install
# Run tests
npm test
# Start server
npm start
Publishing to npm
# Login to npm
npm login
# Publish package
npm publish
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!
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.