Skip to content
appsgit

Clinicaltrialsgov MCP Server

Clinicaltrialsgov MCP Server is an MCP server that adds tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Search ClinicalTrials.gov: find studies, retrieve results, match patients to candidate trials. It has 101 GitHub stars, is released under the Apache-2.0 license and runs locally with npx -y clinicaltrialsgov-mcp-server.

github.com/cyanheads/clinicaltrialsgov-mcp-server (opens in a new tab)

Data as of from the GitHub API and the official MCP registry; description from the project's repository. Report an error

Install Clinicaltrialsgov MCP Server

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "clinicaltrialsgov-mcp-server"
      ],
      "env": {
        "CT_API_BASE_URL": "your-value",
        "CT_REQUEST_TIMEOUT_MS": "your-value",
        "CT_MAX_PAGE_SIZE": "your-value",
        "MCP_LOG_LEVEL": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env CT_API_BASE_URL=your-value --env CT_REQUEST_TIMEOUT_MS=your-value --env CT_MAX_PAGE_SIZE=your-value --env MCP_LOG_LEVEL=your-value --transport stdio clinicaltrialsgov-mcp-server -- npx -y clinicaltrialsgov-mcp-server

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "clinicaltrialsgov-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "clinicaltrialsgov-mcp-server"
      ],
      "env": {
        "CT_API_BASE_URL": "your-value",
        "CT_REQUEST_TIMEOUT_MS": "your-value",
        "CT_MAX_PAGE_SIZE": "your-value",
        "MCP_LOG_LEVEL": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "servers": {
    "clinicaltrialsgov-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "clinicaltrialsgov-mcp-server"
      ],
      "env": {
        "CT_API_BASE_URL": "your-value",
        "CT_REQUEST_TIMEOUT_MS": "your-value",
        "CT_MAX_PAGE_SIZE": "your-value",
        "MCP_LOG_LEVEL": "your-value"
      }
    }
  }
}

Claude Code (remote)

claude mcp add --transport http clinicaltrialsgov-mcp-server "https://clinicaltrials.caseyjhand.com/mcp"

The same server is also hosted as a remote MCP endpoint, so nothing runs on your machine.

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
CT_API_BASE_URLNoClinicalTrials.gov API base URL.
CT_REQUEST_TIMEOUT_MSNoTimeout 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…
CT_MAX_PAGE_SIZENoMost studies one clinicaltrialssearchstudies page returns; an integer of at least 1, values above 1000 clamp to 1000.
MCP_LOG_LEVELNoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').

Tools (7)

Parsed from the Tools section of the README; check the repository for the current list.

  • clinicaltrials_search_studies

    Search studies with full-text and field-specific queries, status/phase/geographic filters, pagination, sorting, and…

  • clinicaltrials_get_study_record

    Fetch a single study by NCT ID — full protocol record with optional location/outcome/reference caps

  • clinicaltrials_get_study_count

    Fast total study count for a query, without fetching data

  • clinicaltrials_get_field_values

    Discover valid values for API fields, with per-value study counts

  • clinicaltrials_get_field_definitions

    Resolve valid field names — keyword search, path drill-down, or top-level overview

  • clinicaltrials_get_study_results

    Fetch posted results — outcomes, adverse events, participant flow, baseline — for completed studies

  • clinicaltrials_find_eligible

    Match patient demographics and conditions to candidate recruiting trials, without checking inclusion/exclusion criteria

About Clinicaltrialsgov MCP Server

clinicaltrialsgov-mcp-server Search ClinicalTrials.gov trials, retrieve study details and results, and match patients to candidate trials via MCP. STDIO or Streamable HTTP. 7 Tools • 1 Resource • 1 Prompt • 1 Skill

  • mcp
  • mcp-server
  • ai-agent
  • clinical-trials
  • eligibility-criteria
  • health-tech
  • model-context-protocol
  • patient-matching
  • typescript
  • clinicaltrials-gov

FAQ

Clinicaltrialsgov MCP Server FAQ

Still curious? Email info@appsgit.com.

How do I install the Clinicaltrialsgov MCP Server MCP server?

Add the command npx -y clinicaltrialsgov-mcp-server to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Clinicaltrialsgov MCP Server free?

The server is open source under the Apache-2.0 license, so running it is free. It does not declare any required API key.

Is Clinicaltrialsgov MCP Server actively maintained?

The most recent commit was on Nov 13, 2026. The latest release is v2.11.3, published Nov 13, 2026. appsgit only lists MCP servers with a commit in the last six months.