home / mcp / clinical trials mcp server

Clinical Trials MCP Server

Provides up-to-date access to ClinicalTrials.gov data via MCP tools for searching, detailing, and analyzing clinical trials.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bach-ai-tools-clinicaltrials-mcp-server": {
      "command": "node",
      "args": [
        "path/to/clinical-trials-server/build/index.js"
      ]
    }
  }
}

You run a dedicated MCP server that exposes ClinicalTrials.gov data through a structured, programmable interface. This server lets you search, filter, and retrieve clinical trial information in real time, directly from your MCP-enabled environment, enabling researchers, clinicians, and developers to build powerful workflows and analytics on top of the Clinical Trials registry.

How to use

You connect to the Clinical Trials MCP server via your MCP client. Start by ensuring the server is running in your environment, then issue the available MCP tools to search for studies, fetch detailed records by NCT ID, filter by condition or location, and retrieve ongoing, recruiting, or completed trials. Use the tools to analyze timelines, compare similar studies, and extract statistics across conditions or phases. Each tool returns structured data including metadata, locations with coordinates, eligibility criteria, contact information, and key dates so you can drive downstream applications, dashboards, and research workflows.

How to install

Prerequisites you need before installing the server:

- Node.js 16+ must be installed on your system.

Follow these concrete steps to set up the Clinical Trials MCP server locally.

1. Create or navigate to your MCP directory.

2. Obtain the server files in the expected directory structure that includes build/ and src/ folders and a package.json.

3. Build and run the server using the provided runtime command that points to the built executable.

Additional content

Configuration you will use to connect the server to your MCP client is shown in the following stdio-based setup. It uses node to run the compiled server and exposes a default set of tools for automated use within your client.

{
  "mcpServers": {
    "clinical-trials": {
      "command": "node",
      "args": ["path/to/clinical-trials-server/build/index.js"],
      "autoApprove": [
        "search_studies",
        "get_study_details",
        "search_by_condition",
        "search_by_location",
        "get_recruiting_studies",
        "search_by_sponsor",
        "search_by_intervention",
        "get_trial_statistics"
      ]
    }
  }
}

If you prefer to use npm to drive the server lifecycle, install dependencies and build before starting the server. The development flow includes running npm install, building with npm run build, and optionally watching with npm run watch.

Notes for operators: - The server provides real-time data access with daily updates on weekdays. - NCT IDs must follow the standard format NCT########. - Expect structured JSON responses that include study metadata, location coordinates, eligibility criteria, and timelines.

Available tools

search_studies

General search across trials with filters like condition, intervention, location, phase, status, age, and sex.

get_study_details

Retrieve complete metadata and details for a specific study by its NCT ID.

search_by_condition

Condition-focused search with optional eligibility criteria.

search_by_location

Geographic search with optional distance radius filtering.

search_by_sponsor

Search by sponsor or organization with sponsor-type filtering.

search_by_intervention

Search focused on treatments, drugs, and interventions.

get_recruiting_studies

Return currently recruiting trials with active contact information.

search_by_date_range

Temporal search based on study start and completion dates.

get_studies_with_results

Retrieve completed trials that have published results.

search_rare_diseases

Specialized search for rare diseases and orphan conditions.

get_pediatric_studies

Pediatric-focused trials for children and adolescents.

search_international_studies

Multi-country international trial searches.

get_similar_studies

Find studies similar to a reference NCT ID by condition, sponsor, or phase.

search_by_primary_outcome

Search by primary outcome measures and endpoints.

search_by_eligibility_criteria

Advanced filtering with inclusion and exclusion keywords.

get_study_timeline

Timeline analysis of studies by current, completed, and upcoming status.

get_trial_statistics

Aggregate statistics and analytics with grouping options.