npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

clinical-trials-mcp

v1.0.0

Published

MCP server for querying clinical trials from ClinicalTrials.gov API v2. Supports searching by keywords, disease, location with intelligent defaults (recruiting trials from past 3 months).

Downloads

89

Readme

Clinical Trials MCP Server

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 clinical-trials-mcp

MCP Client Configuration

Add to your MCP client settings:

Using npx (Recommended)

{
  "mcpServers": {
    "clinical-trials": {
      "command": "npx",
      "args": ["-y", "clinical-trials-mcp"]
    }
  }
}

Using local installation

npm install -g clinical-trials-mcp
{
  "mcpServers": {
    "clinical-trials": {
      "command": "clinical-trials-mcp"
    }
  }
}

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): Latitude
  • longitude (number, required): Longitude
  • radius (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 team
  • overallOfficials[] - Study officials
  • centralContacts[] - Global contact info (phone, email)
  • locations[] - All hospital sites with local contacts
  • locationsSummary - Statistics (countries, cities, total sites)
  • eligibility - Detailed inclusion/exclusion criteria
  • primaryOutcomes[], secondaryOutcomes[] - Study endpoints
  • briefSummary, detailedDescription - Full study description

API Reference

Development

# Clone repository
git clone https://github.com/yourusername/clinical-trials-mcp.git
cd clinical-trials-mcp

# 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.