ClinicalTrials MCP Server

ClinicalTrials MCP Server

clinicaltrials-mcp-server•byjackkuo666

An MCP server that lets AI assistants search and access ClinicalTrials.gov clinical trial data programmatically.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Searches clinical trials using custom search expressions or keywords and can save results to CSV files.
  • •Retrieves detailed metadata for a specific trial by NCT ID.
  • •Saves trial data locally and manages CSV files with load and list tools.
  • •Provides statistics about clinical trials, optionally filtered by condition.

BEST FOR

  • •Health sciences researchers who want to search and analyze clinical trial data via AI assistants.
  • •Users who want to look up details of a specific trial by its NCT ID.
  • •Exporting clinical trial search results to CSV for local storage and review.

ABOUT CLINICALTRIALS-MCP-SERVER

ClinicalTrials MCP Server is cataloged as an MCP server attributed to jackkuo666. An MCP server that lets AI assistants search and access ClinicalTrials.gov clinical trial data programmatically. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for ClinicalTrials MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What data source does the server use?

It connects AI assistants to ClinicalTrials.gov's clinical trial repository.

Can it save search results to a file?

Yes, it can save search results to CSV files, and also load and list saved CSV files.

What is the server built with?

The main server implementation uses FastMCP.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 2f9e1dce94f3 · 采集于 2026-11-13 12:29:40 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

ClinicalTrials MCP Server

smithery badge

🔍 Enable AI assistants to search and access ClinicalTrials.gov data through a simple MCP interface.

The ClinicalTrials MCP Server provides a bridge between AI assistants and ClinicalTrials.gov's clinical trial repository through the Model Context Protocol (MCP). It allows AI models to search for clinical trials and access their content in a programmatic way.

🤝 Contribute • 📝 Report Bug

✨ Core Features

  • 🔎 Trial Search: Query clinical trials with custom search strings or advanced search parameters ✅
  • 🚀 Efficient Retrieval: Fast access to trial metadata ✅
  • 📊 Metadata Access: Retrieve detailed metadata for specific trials using NCT ID ✅
  • 📊 Research Support: Facilitate health sciences research and analysis ✅
  • 📋 CSV Management: Save, load, and list CSV files with trial data ✅
  • 🗃️ Local Storage: Trials are saved locally for faster access ✅
  • 📊 Statistics: Get statistics about clinical trials ✅

🚀 Quick Start

Installing via Smithery

To install ClinicalTrials Server for Claude Desktop automatically via Smithery:

Claude

npx -y @smithery/cli@latest install ClinicalTrials-mcp-server --client claude --config "{}"

Cursor

Paste the following into Settings → Cursor Settings → MCP → Add new server:

  • Mac/Linux
npx -y @smithery/cli@latest run ClinicalTrials-mcp-server --client cursor --config "{}" 

Windsurf

npx -y @smithery/cli@latest install ClinicalTrials-mcp-server --client windsurf --config "{}"

CLine

npx -y @smithery/cli@latest install ClinicalTrials-mcp-server --client cline --config "{}"

Installing Manually

Install using uv:

uv tool install ClinicalTrials-mcp-server

For development:

# Clone and set up development environment
git clone https://github.com/JackKuo666/ClinicalTrials-MCP-Server.git
cd ClinicalTrials-MCP-Server

# Create and activate virtual environment
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

📊 Usage

Start the MCP server:

python clinical_trials_server.py

Once the server is running, you can use the provided MCP tools in your AI assistant or application. Here are some examples of how to use the tools:

Example 1: Search for clinical trials using a search expression and save to CSV

result = await mcp.use_tool("search_clinical_trials_and_save_studies_to_csv", {
    "search_expr": "COVID-19 vaccine efficacy",
    "max_studies": 5
})
print(result)

Example 2: Get studies by keyword

result = await mcp.use_tool("get_studies_by_keyword", {
    "keyword": "diabetes",
    "max_studies": 10
})
print(result)

Example 3: Get full study details for a specific trial

result = await mcp.use_tool("get_full_study_details", {
    "nct_id": "NCT04280705"
})
print(result)

Example 4: Search and save studies with custom fields

result = await mcp.use_tool("search_clinical_trials_and_save_studies_to_csv", {
    "search_expr": "alzheimer",
    "max_studies": 20,
    "filename": "alzheimer_studies.csv",
    "fields": ["NCT Number", "Study Title", "Brief Summary", "Conditions"]
})
print(result)

These examples demonstrate how to use the main tools provided by the ClinicalTrials MCP Server. Adjust the parameters as needed for your specific use case.

🛠 MCP Tools

The ClinicalTrials MCP Server provides the following tools:

search_clinical_trials_and_save_studies_to_csv

Search for clinical trials using a search expression and save the results to a CSV file.

Parameters:

  • search_expr (str): Search expression (e.g., "Coronavirus+COVID")
  • max_studies (int, optional): Maximum number of studies to return (default: 10)
  • save_csv (bool, optional): Whether to save the results as a CSV file (default: True)
  • filename (str, optional): Name of the CSV file to save (default: corona_fields.csv)
  • fields (list, optional): List of fields to include (default: NCT Number, Conditions, Study Title, Brief Summary)

Returns: String representation of the search results

get_full_study_details

Get detailed information about a specific clinical trial.

Parameters:

  • nct_id (str): The NCT ID of the clinical trial

Returns: String representation of the study details

get_studies_by_keyword

Get studies related to a specific keyword.

Parameters:

  • keyword (str): Keyword to search for
  • max_studies (int, optional): Maximum number of studies to return (default: 20)
  • save_csv (bool, optional): Whether to save the results as a CSV file (default: True)
  • filename (str, optional): Name of the CSV file to save (default: keyword_results_{keyword}.csv)

Returns: String representation of the studies

get_study_statistics

Get statistics about clinical trials.

Parameters:

  • condition (str, optional): Optional condition to filter by

Returns: String representation of the statistics

get_full_studies_and_save

Get full studies data and save to CSV.

Parameters:

  • search_expr (str): Search expression (e.g., "Coronavirus+COVID")
  • max_studies (int, optional): Maximum number of studies to return (default: 20)
  • filename (str, optional): Name of the CSV file to save (default: full_studies.csv)

Returns: Message indicating the results were saved

load_csv_data

Load and display data from a CSV file.

Parameters:

  • filename (str): Name of the CSV file to load

Returns: String representation of the CSV data

list_saved_csv_files

List all available CSV files in the current directory.

Returns: String representation of the available CSV files

🔍 MCP Resources

The ClinicalTrials MCP Server also provides the following resources:

clinicaltrials://corona_fields

Get the corona fields data as a resource.

clinicaltrials://full_studies

Get the full studies data as a resource.

clinicaltrials://csv/{filename}

Get data from a specific CSV file.

Parameters:

  • filename (str): Name of the CSV file

clinicaltrials://available_files

Get a list of all available CSV files.

clinicaltrials://study/{nct_id}

Get a specific study by NCT ID.

Parameters:

  • nct_id (str): The NCT ID of the clinical trial

clinicaltrials://condition/{condition}

Get studies related to a specific condition.

Parameters:

  • condition (str): The condition to search for

Usage with Claude Desktop

Add this configuration to your claude_desktop_config.json:

(Mac OS)

{
  "mcpServers": {
    "ClinicalTrials": {
      "command": "python",
      "args": ["-m", "ClinicalTrials-mcp-server"]
      }
  }
}

(Windows version):

{
  "mcpServers": {
    "ClinicalTrials": {
      "command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
      "args": [
        "-m",
        "ClinicalTrials-mcp-server"
      ]
    }
  }
}

Using with Cline

{
  "mcpServers": {
    "ClinicalTrials": {
      "command": "bash",
      "args": [
        "-c",
        "source /home/YOUR/PATH/ClinicalTrials-MCP-Server/.venv/bin/activate && python /home/YOUR/PATH/ClinicalTrials-MCP-Server/clinical_trials_server.py"
      ],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

After restarting Claude Desktop, the following capabilities will be available:

Searching Clinical Trials

You can ask Claude to search for clinical trials using queries like:

Can you search for recent clinical trials about diabetes?

The search will return basic information about matching trials including:

• Trial title

• NCT Number

• Conditions

• Brief Summary

Getting Trial Details

Once you have an NCT ID, you can ask for more details:

Can you show me the details for trial NCT04280705?

This will return:

• Full trial title

• Conditions

• Brief Summary

• Other available details

📁 Project Structure

  • clinical_trials_server.py: The main MCP server implementation using FastMCP
  • clinical_trials.py: Contains helper functions for interacting with the ClinicalTrials.gov API

🔧 Dependencies

  • Python 3.10+
  • FastMCP
  • pytrials
  • pandas

You can install the required dependencies using:

pip install FastMCP pytrials pandas

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License.

⚠️ Disclaimer

This tool is for research purposes only. Please respect ClinicalTrials.gov's terms of service and use this tool responsibly.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for ClinicalTrials MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/clinicaltrials-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research