clinicaltrialsgov-mcp-server

v2.9.2

Search ClinicalTrials.gov trials, retrieve study details and results, and match patients to eligible trials via MCP. STDIO or Streamable HTTP.

clinicaltrials.caseyjhand.com/mcp
claude mcp add --transport http clinicaltrialsgov-mcp-server https://clinicaltrials.caseyjhand.com/mcp
codex mcp add clinicaltrialsgov-mcp-server --url https://clinicaltrials.caseyjhand.com/mcp
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "url": "https://clinicaltrials.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http clinicaltrialsgov-mcp-server https://clinicaltrials.caseyjhand.com/mcp
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://clinicaltrials.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "type": "http",
      "url": "https://clinicaltrials.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://clinicaltrials.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2026-07-28" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2026-07-28","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

7

clinicaltrials_search_studies

open-world

Search for clinical trial studies from ClinicalTrials.gov. Supports full-text and field-specific queries, status/phase/geographic filters, pagination, sorting, and field selection. Returns a compact per-study index by default; pass the fields parameter to get specific leaves at full fidelity — full study records are ~70KB each.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "clinicaltrials_search_studies",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "General free-text search across all fields. Runs the 57-field relevance search ClinicalTrials.gov publishes for this parameter — NCTId, NCTIdAlias, OrgStudyId, SecondaryId, Acronym, BriefTitle, OfficialTitle, Condition, InterventionName, InterventionOtherName, Phase, StdAge, StudyType, BriefSummary, outcome measures and their descriptions, LeadSponsorName, CollaboratorName, the Location* fields, the Design* fields, and the ConditionAncestorTerm/InterventionAncestorTerm MeSH umbrellas — so a hit need not carry your term in the field you had in mind. Plain words plus AND, OR, NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression — those work here as well as in advancedFilter, so AREA[Phase]PHASE2 is accepted in this parameter; a stray bracket fails. `( )` group sub-expressions and work when matched; `,` acts as AND. The dedicated *Query parameters (conditionQuery, interventionQuery, etc.) scope a search to one field.",
      "type": "string"
    },
    "conditionQuery": {
      "description": "Condition/disease-specific search. E.g., \"Type 2 Diabetes\", \"non-small cell lung cancer\". Matches Condition, BriefTitle, OfficialTitle, ConditionMeshTerm, ConditionAncestorTerm, Keyword, and NCTId. ConditionAncestorTerm is the MeSH umbrella above the conditions a study itself lists, so results run broader than those lists — a study can match a parent term it never names. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "interventionQuery": {
      "description": "Intervention/treatment search. E.g., \"pembrolizumab\", \"cognitive behavioral therapy\". Matches InterventionName, InterventionType, ArmGroupType, InterventionOtherName, BriefTitle, OfficialTitle, ArmGroupLabel, InterventionMeshTerm, Keyword, InterventionAncestorTerm, InterventionDescription, and ArmGroupDescription. InterventionAncestorTerm is the MeSH umbrella above the interventions a study itself lists, so results run broader than those lists. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "locationQuery": {
      "description": "Location search — city, state, country, or facility name. Matches LocationCity, LocationState, LocationCountry, LocationFacility, and LocationZip; a study matches when any of its sites does. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "sponsorQuery": {
      "description": "Sponsor/collaborator name search. Matches LeadSponsorName, CollaboratorName, and OrgFullName. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "titleQuery": {
      "description": "Search within study titles and acronyms only. Matches Acronym, BriefTitle, and OfficialTitle. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "outcomeQuery": {
      "description": "Search within outcome measure fields. Matches PrimaryOutcomeMeasure, SecondaryOutcomeMeasure, OtherOutcomeMeasure, and OutcomeMeasureTitle, plus their description counterparts PrimaryOutcomeDescription, SecondaryOutcomeDescription, OtherOutcomeDescription, OutcomeMeasureDescription, and OutcomeMeasurePopulationDescription — so a term appearing only in outcome prose still matches. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "statusFilter": {
      "description": "Filter by study status. Omit to search all statuses — an empty list is rejected, not treated as \"no filter\". Values: RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING, NOT_YET_RECRUITING, ENROLLING_BY_INVITATION, SUSPENDED, TERMINATED, WITHDRAWN, UNKNOWN, WITHHELD, NO_LONGER_AVAILABLE, AVAILABLE, APPROVED_FOR_MARKETING, TEMPORARILY_NOT_AVAILABLE.",
      "anyOf": [
        {
          "type": "string",
          "description": "A single status value."
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Multiple status values (OR)."
        }
      ]
    },
    "phaseFilter": {
      "description": "Filter by trial phase. Omit to search all phases — an empty list is rejected, not treated as \"no filter\". Values: EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4, NA.",
      "anyOf": [
        {
          "type": "string",
          "description": "A single phase value."
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Multiple phase values (OR)."
        }
      ]
    },
    "advancedFilter": {
      "description": "Advanced filter using AREA[FieldName]value syntax. Examples: \"AREA[StudyType]INTERVENTIONAL\", \"AREA[EnrollmentCount]RANGE[100, 1000]\", \"AREA[Phase]PHASE2 AND AREA[StudyType]INTERVENTIONAL\", \"(AREA[Phase]PHASE3 OR AREA[Phase]PHASE4) AND AREA[StudyType]INTERVENTIONAL\". AND/OR/NOT join complete AREA[FieldName]value expressions; parentheses group them. Call clinicaltrials_get_field_definitions to find AREA[]-compatible field names.",
      "type": "string"
    },
    "geoFilter": {
      "description": "Geographic proximity filter. Format: distance(lat,lon,radius), where radius carries a `mi` or `km` suffix — e.g. \"distance(47.6062,-122.3321,50mi)\" for studies within 50 miles of Seattle. Always include the suffix: a bare radius is accepted upstream but interpreted as meters, which silently matches almost nothing. When set, each study's locations are re-sorted by proximity to the center so the nearest matched site leads, annotated with its distance in miles; the full location list is preserved.",
      "type": "string"
    },
    "nctIds": {
      "description": "Filter to specific NCT IDs for batch lookups. Omit to search every study — an empty list is rejected, not treated as \"no filter\". Supplying this lifts the default unknown-enrollment exclusion, so an ID you name is never filtered out of its own lookup.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^NCT\\d{8}$",
          "description": "A single NCT ID."
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^NCT\\d{8}$"
          },
          "description": "Multiple NCT IDs (OR)."
        }
      ]
    },
    "fields": {
      "description": "PascalCase leaf names to return; strongly recommended since full records are ~70KB. Omit for the compact index projection — an empty list is rejected, not treated as omission. Common leaves: NCTId, BriefTitle, BriefSummary, OverallStatus, Phase, LeadSponsorName, Condition. Call clinicaltrials_get_field_definitions with a concept query (e.g., \"adverse events\", \"eligibility\") to find the exact leaf for any concept.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sort": {
      "description": "Sort order. Format: FieldName:asc or FieldName:desc. E.g., \"LastUpdatePostDate:desc\", \"EnrollmentCount:desc\". Max 2 fields comma-separated. For \"largest trials\" queries, pair EnrollmentCount:desc with advancedFilter \"AREA[StudyType]INTERVENTIONAL\" — the top enrollment counts are observational registry/claims studies enrolling tens of millions. Enrollment counts are sponsor-reported and not validated upstream beyond the unknown-enrollment sentinel exclusion. Use clinicaltrials_get_field_definitions to find sortable field names.",
      "type": "string"
    },
    "pageSize": {
      "default": 10,
      "description": "Results per page, 1–200.",
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "pageToken": {
      "description": "Pagination cursor from a previous response.",
      "type": "string"
    },
    "countTotal": {
      "default": true,
      "description": "Include total study count in response. Only computed on the first page.",
      "type": "boolean"
    },
    "includeUnknownEnrollment": {
      "default": false,
      "description": "Include studies whose EnrollmentCount is the upstream \"unknown\" sentinel (99999999). Excluded by default — the sentinel pollutes RANGE[N, MAX] queries and EnrollmentCount:desc sorts. Set true for data-quality audits or when targeting unknown-enrollment studies specifically.",
      "type": "boolean"
    }
  },
  "required": [
    "pageSize",
    "countTotal",
    "includeUnknownEnrollment"
  ],
  "additionalProperties": false
}
view source ↗

clinicaltrials_get_study_record

open-world

Fetch a single clinical trial study by NCT ID from ClinicalTrials.gov. Returns the full study record including protocol details, eligibility criteria, outcomes, arms, interventions, contacts, and locations. Optional locationLimit / outcomeLimit / referenceLimit / nearLocation parameters trim locations, outcomes, and references — original totals are preserved in `filtersApplied` only when a cap actually trims the set.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "clinicaltrials_get_study_record",
    "arguments": {
      "nctId": "<nctId>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "nctId": {
      "type": "string",
      "pattern": "^NCT\\d{8}$",
      "description": "NCT identifier — format `NCT` followed by 8 digits (e.g., `NCT03722472`)."
    },
    "locationLimit": {
      "description": "Optional cap on the number of locations returned. Omit for no cap (full upstream list). Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations only when the cap trims the list.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "outcomeLimit": {
      "description": "Optional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists). Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes only when the cap trims a list.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "referenceLimit": {
      "description": "Optional cap on the number of references returned. Omit for no cap (full upstream list). Original total preserved in filtersApplied.totalReferences only when the cap trims the list. seeAlsoLinks are never capped.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "nearLocation": {
      "description": "Filter returned locations to those within radius of (lat, lon) and sort by distance. Adds distanceMi to each location. Locations without published coordinates are dropped — most US sites carry them; international sites less reliably so. Distances reflect ClinicalTrials.gov geocoding granularity — typically city-centroid, not facility-level — so multiple sites in the same city resolve to near-identical distances. For broader geographic filtering across studies, use clinicaltrials_search_studies with geoFilter.",
      "type": "object",
      "properties": {
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90,
          "description": "Latitude in decimal degrees."
        },
        "lon": {
          "type": "number",
          "minimum": -180,
          "maximum": 180,
          "description": "Longitude in decimal degrees."
        },
        "radiusMi": {
          "default": 50,
          "description": "Radius in miles. Default 50.",
          "type": "number",
          "minimum": 1,
          "maximum": 500
        }
      },
      "required": [
        "lat",
        "lon",
        "radiusMi"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "nctId"
  ],
  "additionalProperties": false
}
view source ↗

clinicaltrials_get_study_count

open-world

Get total clinical trial study count from ClinicalTrials.gov matching a query, without fetching study data. Fast and lightweight. Use for quick statistics or to build breakdowns by calling multiple times with different filters (e.g., count by phase, count by status, count recruiting vs completed for a condition).

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "clinicaltrials_get_study_count",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "General free-text search across all fields. Runs the 57-field relevance search ClinicalTrials.gov publishes for this parameter — NCTId, NCTIdAlias, OrgStudyId, SecondaryId, Acronym, BriefTitle, OfficialTitle, Condition, InterventionName, InterventionOtherName, Phase, StdAge, StudyType, BriefSummary, outcome measures and their descriptions, LeadSponsorName, CollaboratorName, the Location* fields, the Design* fields, and the ConditionAncestorTerm/InterventionAncestorTerm MeSH umbrellas — so a hit need not carry your term in the field you had in mind. Plain words plus AND, OR, NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression — those work here as well as in advancedFilter, so AREA[Phase]PHASE2 is accepted in this parameter; a stray bracket fails. `( )` group sub-expressions and work when matched; `,` acts as AND. The dedicated *Query parameters (conditionQuery, interventionQuery, etc.) scope a search to one field.",
      "type": "string"
    },
    "conditionQuery": {
      "description": "Condition/disease-specific search. E.g., \"Type 2 Diabetes\", \"non-small cell lung cancer\". Matches Condition, BriefTitle, OfficialTitle, ConditionMeshTerm, ConditionAncestorTerm, Keyword, and NCTId. ConditionAncestorTerm is the MeSH umbrella above the conditions a study itself lists, so results run broader than those lists — a study can match a parent term it never names. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "interventionQuery": {
      "description": "Intervention/treatment search. E.g., \"pembrolizumab\", \"cognitive behavioral therapy\". Matches InterventionName, InterventionType, ArmGroupType, InterventionOtherName, BriefTitle, OfficialTitle, ArmGroupLabel, InterventionMeshTerm, Keyword, InterventionAncestorTerm, InterventionDescription, and ArmGroupDescription. InterventionAncestorTerm is the MeSH umbrella above the interventions a study itself lists, so results run broader than those lists. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "locationQuery": {
      "description": "Location search — city, state, country, or facility name. Matches LocationCity, LocationState, LocationCountry, LocationFacility, and LocationZip; a study matches when any of its sites does. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "sponsorQuery": {
      "description": "Sponsor/collaborator name search. Matches LeadSponsorName, CollaboratorName, and OrgFullName. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "titleQuery": {
      "description": "Search within study titles and acronyms only. Matches Acronym, BriefTitle, and OfficialTitle. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "outcomeQuery": {
      "description": "Search within outcome measure fields. Matches PrimaryOutcomeMeasure, SecondaryOutcomeMeasure, OtherOutcomeMeasure, and OutcomeMeasureTitle, plus their description counterparts PrimaryOutcomeDescription, SecondaryOutcomeDescription, OtherOutcomeDescription, OutcomeMeasureDescription, and OutcomeMeasurePopulationDescription — so a term appearing only in outcome prose still matches. Plain words plus AND/OR/NOT. `[ ]` are valid only inside an AREA[FieldName]value or RANGE[min, max] expression, which this parameter accepts; a stray bracket fails. `( )` group sub-expressions when matched; `,` acts as AND.",
      "type": "string"
    },
    "statusFilter": {
      "description": "Filter by study status. Omit to count all statuses — an empty list is rejected, not treated as \"no filter\". Values: RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING, NOT_YET_RECRUITING, ENROLLING_BY_INVITATION, SUSPENDED, TERMINATED, WITHDRAWN, UNKNOWN, WITHHELD, NO_LONGER_AVAILABLE, AVAILABLE, APPROVED_FOR_MARKETING, TEMPORARILY_NOT_AVAILABLE.",
      "anyOf": [
        {
          "type": "string",
          "description": "A single status value."
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Multiple status values (OR)."
        }
      ]
    },
    "phaseFilter": {
      "description": "Filter by trial phase. Omit to count all phases — an empty list is rejected, not treated as \"no filter\". Values: EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4, NA.",
      "anyOf": [
        {
          "type": "string",
          "description": "A single phase value."
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Multiple phase values (OR)."
        }
      ]
    },
    "advancedFilter": {
      "description": "Advanced filter using AREA[FieldName]value syntax. Examples: \"AREA[StudyType]INTERVENTIONAL\", \"AREA[EnrollmentCount]RANGE[100, 1000]\", \"AREA[Phase]PHASE2 AND AREA[StudyType]INTERVENTIONAL\", \"(AREA[Phase]PHASE3 OR AREA[Phase]PHASE4) AND AREA[StudyType]INTERVENTIONAL\". AND/OR/NOT join complete AREA[FieldName]value expressions; parentheses group them. Call clinicaltrials_get_field_definitions to find AREA[]-compatible field names.",
      "type": "string"
    },
    "includeUnknownEnrollment": {
      "default": false,
      "description": "Include studies whose EnrollmentCount is the upstream \"unknown\" sentinel (99999999). Excluded by default — the sentinel pollutes RANGE[N, MAX] queries. Set true for data-quality audits.",
      "type": "boolean"
    }
  },
  "required": [
    "includeUnknownEnrollment"
  ],
  "additionalProperties": false
}
view source ↗

clinicaltrials_get_field_values

open-world

Discover valid values for ClinicalTrials.gov fields with study counts per value. Use to explore available filter options before building a search — e.g., valid OverallStatus, Phase, InterventionType, StudyType, or LeadSponsorClass values.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "clinicaltrials_get_field_values",
    "arguments": {
      "fields": "<fields>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "anyOf": [
        {
          "type": "string",
          "description": "A single PascalCase field name."
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Multiple PascalCase field names (at least one required)."
        }
      ],
      "description": "PascalCase field name(s) to get value statistics for — an empty list is rejected, not treated as \"every field\". Examples: OverallStatus, Phase, StudyType, Sex, LeadSponsorClass. Use clinicaltrials_get_field_definitions with a query to find more field names."
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
view source ↗

clinicaltrials_get_field_definitions

open-world

Resolve valid field names from the ClinicalTrials.gov data model — the canonical PascalCase identifiers (OverallStatus, EnrollmentCount, LeadSponsorName) accepted by the `fields`, `advancedFilter`, and `sort` parameters of other tools, and as input to clinicaltrials_get_field_values. Select a mode: `"search"` — keyword search returning ranked matches (pass `query`, e.g. "enrollment", "sponsor", "adverse events"); `"drill"` — drill into a specific section by dot-notation path (pass `path`, e.g. "protocolSection.designModule"); `"overview"` — top-level summary of all sections (no additional args).

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "clinicaltrials_get_field_definitions",
    "arguments": {
      "mode": "<mode>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "search",
        "drill",
        "overview"
      ],
      "description": "Operation mode. \"search\" — keyword search (requires `query`); \"drill\" — drill into a section by path (requires `path`); \"overview\" — list all top-level sections (no other args needed)."
    },
    "query": {
      "description": "search mode only. Keyword to search field names by — e.g., \"enrollment\", \"sponsor\", \"adverse events\". Returns matching field names ranked by relevance with their full paths and data types.",
      "type": "string"
    },
    "path": {
      "description": "drill mode only. Dot-notation path to drill into — e.g., \"protocolSection.designModule\", \"protocolSection.eligibilityModule\", \"resultsSection\". Returns the section's individual fields.",
      "type": "string"
    },
    "limit": {
      "default": 20,
      "description": "search mode only. Maximum results to return. Default: 20.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "includeIndexedOnly": {
      "description": "drill mode only. Only return indexed (searchable) fields. Default: false.",
      "type": "boolean"
    }
  },
  "required": [
    "mode",
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

clinicaltrials_get_study_results

open-world

Fetch clinical trial results data from ClinicalTrials.gov for completed studies — outcome measures with statistics, adverse events, participant flow, baseline characteristics, and results metadata (limitations & caveats, certain-agreement disclosure restrictions, results point of contact). Only available for studies where hasResults is true. Use clinicaltrials_search_studies first to find studies with results. A results-rich record can exceed 500KB per study in full mode — bound it with summary=true, narrower sections, or the outcomeLimit / adverseEventLimit caps, whose trims are reported per study in filtersApplied.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "clinicaltrials_get_study_results",
    "arguments": {
      "nctIds": "<nctIds>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "nctIds": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^NCT\\d{8}$",
          "description": "A single NCT ID."
        },
        {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^NCT\\d{8}$"
          },
          "description": "Multiple NCT IDs (max 20)."
        }
      ],
      "description": "One or more NCT IDs (max 20) — an empty list is rejected. E.g., \"NCT12345678\" or [\"NCT12345678\", \"NCT87654321\"]. Use summary=true for large batches to avoid large payloads."
    },
    "sections": {
      "description": "Filter which sections to return. Values: outcomes, adverseEvents, participantFlow, baseline, moreInfo. Omit for all sections — an empty list is rejected, not treated as omission.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "outcomes",
            "adverseEvents",
            "participantFlow",
            "baseline",
            "moreInfo"
          ],
          "description": "A single section name."
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "outcomes",
              "adverseEvents",
              "participantFlow",
              "baseline",
              "moreInfo"
            ]
          },
          "description": "Multiple section names."
        }
      ]
    },
    "summary": {
      "default": false,
      "description": "Return condensed summaries instead of full data. Full mode renders every row and field on both output channels, so a large results set can exceed 500KB per study; summary mode reduces that to ~5KB. Summaries include outcome titles, types, timeframes, group counts, and top-level stats — omitting individual measurements, analyses, and per-group data. For a middle ground, keep full mode and cap the two lists that carry the bulk with outcomeLimit / adverseEventLimit.",
      "type": "boolean"
    },
    "outcomeLimit": {
      "description": "Optional cap on the number of outcome measures returned per study, taken in the order ClinicalTrials.gov publishes them. Omit for no cap (every measure). Applies to full mode only — summary mode is already condensed. Each surviving measure keeps its complete groups/classes/measurements/analyses tree. Upstream total preserved in filtersApplied.totalOutcomes only when the cap trims the list.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "adverseEventLimit": {
      "description": "Optional cap on the number of serious and other adverse events returned per study, applied to each list separately in upstream order. Omit for no cap (every event). Applies to full mode only — summary mode already ranks the top 20 by participants affected. Event groups are never capped. Upstream totals preserved in filtersApplied.totalSeriousEvents / totalOtherEvents only when the cap trims a list.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    }
  },
  "required": [
    "nctIds",
    "summary"
  ],
  "additionalProperties": false
}
view source ↗

clinicaltrials_find_eligible

open-world

Match patient demographics and conditions to eligible recruiting clinical trials. Provide age, sex, conditions, and location to find studies with matching eligibility criteria, contact information, and recruiting locations. Results are re-ranked so studies whose own condition matches a requested condition surface above tangential matches from ClinicalTrials.gov's fuzzy condition search. Each candidate returns only the sites matching the requested location (capped by locationLimit), not the study's full registered site list — a large trial can register hundreds of sites worldwide. When none of a candidate's matched sites is recruiting, its nearest recruiting site is added, so an enrollable site is never hidden behind a closer closed one. Fetch a study's complete record with clinicaltrials_get_study_record.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "clinicaltrials_find_eligible",
    "arguments": {
      "age": "<age>",
      "sex": "<sex>",
      "conditions": "<conditions>",
      "location": "<location>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "age": {
      "type": "integer",
      "minimum": 0,
      "maximum": 120,
      "description": "Patient age in years."
    },
    "sex": {
      "type": "string",
      "enum": [
        "FEMALE",
        "MALE",
        "ALL"
      ],
      "description": "Patient's biological sex. Use 'ALL' to include studies regardless of sex restrictions."
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Medical conditions or diagnoses, e.g. [\"Type 2 Diabetes\", \"Hypertension\"]. Each entry is matched as a condition (multi-word entries match as a phrase); multiple entries are combined with OR, so studies for any listed condition qualify. Returned studies are re-ranked so those whose own condition list names a requested condition rank above tangential matches the upstream fuzzy search pulls in via the MeSH umbrella."
    },
    "location": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string",
          "description": "Country name. E.g., \"United States\"."
        },
        "state": {
          "description": "State or province.",
          "type": "string"
        },
        "city": {
          "description": "City name.",
          "type": "string"
        }
      },
      "required": [
        "country"
      ],
      "additionalProperties": false,
      "description": "Patient location as `{ country (required), state?, city? }`. Country is required; state/city narrow the match. For radius-based geographic search, use clinicaltrials_search_studies with geoFilter."
    },
    "healthyVolunteer": {
      "default": false,
      "description": "Whether the patient is a healthy volunteer. When true, only studies accepting healthy volunteers are queried.",
      "type": "boolean"
    },
    "recruitingOnly": {
      "default": true,
      "description": "Only include actively recruiting studies.",
      "type": "boolean"
    },
    "maxResults": {
      "default": 10,
      "description": "Maximum results to return.",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "locationLimit": {
      "default": 10,
      "description": "Cap on the sites returned per candidate. Each candidate keeps only the sites matching the requested location at the narrowest level that matched (city, else state, else country), capped at this many; the rest of the study's registered sites are omitted. The cap governs those matched sites — when none of them is recruiting, the candidate's nearest recruiting site is added on top of it, so a candidate can carry one site more than this. Raise it to see more nearby sites, or fetch the complete site list with clinicaltrials_get_study_record. Each candidate reports totalLocations / matchedLocations / locationsTruncated / nearestRecruitingSiteAdded in locationSummary only when the bound actually dropped sites.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    }
  },
  "required": [
    "age",
    "sex",
    "conditions",
    "location",
    "healthyVolunteer",
    "recruitingOnly",
    "maxResults",
    "locationLimit"
  ],
  "additionalProperties": false
}
view source ↗

Resources

1

Fetch a single clinical study by NCT ID as JSON. The protocol record comes back whole apart from three capped lists (locations, secondary/other outcomes, references — 50 each), and the results data, which reaches ~600KB on a large trial, is replaced by its counts. Anything omitted is reported in truncated, filtersApplied, and resultsSummary, with the tool that retrieves it named in retrieval.

uri clinicaltrials://{nctId} mime application/json

Prompts

1

Guides analysis of a clinical trial landscape using the ClinicalTrials.gov MCP tools. Adaptable workflow for breakdowns by status, phase, sponsor, geography, etc.

  • topicrequired — Disease, condition, or research area to analyze.
  • focusAreas — Comma-separated aspects to focus on, e.g.: "status, phases, sponsors, geography, timeline, interventions".