
Clinicaltrialsgov Mcp Server
Connects Claude to the ClinicalTrials.gov v2 REST API with seven tools covering the full research workflow: search studies with complex queries and filters, pull full protocol records by NCT ID, extract posted results from completed trials, and match patient profiles to recruiting studies based on demographics and eligibility criteria. The find_eligible tool is especially practical if you're building patient navigation flows or referral systems. Results can run large (70KB per study), so field selection and the summary mode for outcomes data help keep token usage reasonable. Includes field discovery tools to explore valid values and the API's data model. Public hosted instance available at clinicaltrials.caseyjhand.com/mcp if you want to try it without installing anything locally.
- GitHub stars
- 100
- tools
- 7
- transport
- STDIO, HTTP
- env vars
- 9
- last updated
- Nov 9, 2026
Install
From registry metadata$ npx add-mcp https://clinicaltrials.caseyjhand.com/mcp --name clinicaltrialsgovRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http clinicaltrialsgov https://clinicaltrials.caseyjhand.com/mcpRun in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 7 toolsVerified live against the running server on Nov 13, 2026.
clinicaltrials_search_studiesSearch 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 a...18 params
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 a...
advancedFilterstringconditionQuerystringcountTotalbooleanfieldsarraygeoFilterstringincludeUnknownEnrollmentbooleaninterventionQuerystringlocationQuerystringnctIdsvalueoutcomeQuerystringpageSizeintegerpageTokenstringphaseFiltervaluequerystringsortstringsponsorQuerystringstatusFiltervaluetitleQuerystringclinicaltrials_get_study_recordFetch 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...5 params
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...
locationLimitintegernctId*stringnearLocationobjectoutcomeLimitintegerreferenceLimitintegerclinicaltrials_get_study_countGet 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 recr...11 params
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 recr...
advancedFilterstringconditionQuerystringincludeUnknownEnrollmentbooleaninterventionQuerystringlocationQuerystringoutcomeQuerystringphaseFiltervaluequerystringsponsorQuerystringstatusFiltervaluetitleQuerystringclinicaltrials_get_field_valuesDiscover 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.1 params
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.
fields*valueclinicaltrials_get_field_definitionsResolve valid field names from the ClinicalTrials.gov data model — the canonical PascalCase identifiers (OverallStatus, EnrollmentCount, LeadSponsorName) the other tools take. Every piece works in clinicaltrials_search_studies `fields`; a leaf piece (sourceType other than STRU...5 params
Resolve valid field names from the ClinicalTrials.gov data model — the canonical PascalCase identifiers (OverallStatus, EnrollmentCount, LeadSponsorName) the other tools take. Every piece works in clinicaltrials_search_studies `fields`; a leaf piece (sourceType other than STRU...
includeIndexedOnlybooleanlimitintegermode*stringsearch · drill · overviewpathstringquerystringclinicaltrials_get_study_resultsFetch 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...8 params
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...
adverseEventLimitintegernctIds*valueotherEventOffsetintegeroutcomeLimitintegeroutcomeOffsetintegersectionsvalueseriousEventOffsetintegersummarybooleanclinicaltrials_find_eligibleFind candidate clinical trials for a patient profile. Provide age, sex, conditions, and location to get studies with their demographic limits, contact information, and recruiting locations. Candidates are matched on age, sex, location, recruitment status, and ClinicalTrials.go...9 params
Find candidate clinical trials for a patient profile. Provide age, sex, conditions, and location to get studies with their demographic limits, contact information, and recruiting locations. Candidates are matched on age, sex, location, recruitment status, and ClinicalTrials.go...
age*integerageUnitstringyears · months · weeks · daysconditions*arrayhealthyVolunteerbooleanlocation*objectlocationLimitintegermaxResultsintegerrecruitingOnlybooleansex*stringFEMALE · MALE · ALLSponsors
Configuration
CT_API_BASE_URLdefault: https://clinicaltrials.gov/api/v2ClinicalTrials.gov API base URL.
CT_REQUEST_TIMEOUT_MSdefault: 30000Timeout in milliseconds for each attempt at a ClinicalTrials.gov request; a positive integer. An attempt ends sooner when its tool call or resource read runs out of its 50-second budget, which covers every request, retry, and wait the call makes.
CT_MAX_PAGE_SIZEdefault: 200Most studies one clinicaltrials_search_studies page returns; an integer of at least 1, values above 1000 clamp to 1000.
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_TRANSPORT_TYPEdefault: httpSelects the HTTP transport.
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.
Readme
clinicaltrialsgov-mcp-server
Search ClinicalTrials.gov trials, retrieve study details and results, and match patients to candidate trials via MCP. STDIO or Streamable HTTP.
Details
- Repository
- github.com/cyanheads/clinicaltrialsgov-mcp-server
- Category
- Search & Web Crawling
- Package
clinicaltrialsgov-mcp-server- Transport
- STDIO, HTTP
- Registry
- MCP registry, active
- Resources
- 1
- Prompts
- 1
- Tools verified
- Nov 13, 2026
More from cyanheads
- Openalex Mcp Server17
- Faostat Mcp Server3
- National Parks Mcp Server3
- Federal Regulations Mcp Server2
- Calculator Mcp Server3
- Congressgov Mcp Server2
- Nws Weather Mcp Server2
- Obsidian Mcp Server705
- Toolkit Mcp Server20
- Nhtsa Vehicle Safety Mcp Server3
- Eur Lex Mcp Server12
- Hn Mcp Server7
- Git Mcp Server245
- Secedgar Mcp Server11
- Gdelt Mcp Server10
- Eurostat Mcp Server9
- Open Meteo Mcp Server13
- Pubchem Mcp Server13
- Gutenberg Mcp Server6
- Libofcongress Mcp Server6
- Orcid Mcp Server6
- Protein Mcp Server6
- Wikipedia Mcp Server6
- Cdc Health Mcp Server5