Clinical Trial Design

io.github.wei-ai-labPublished by GitHub account wei-ai-labv0.0.12Updated Oct 25, 2026

Phase 2/3 clinical trial design via gsDesign / gsDesign2: sample size, GS boundaries, multiplicity

The publisher's own server: [PREPROD] Clinical.ly Research Suite

VerifiedSTDIODesktop onlyData & AnalyticsAI & ML

Overview

AI-generated overview

A local MCP server that runs the ClinicalTrialDesign R package to compute Phase 2/3 trial designs: sample size, group-sequential boundaries and multiplicity.

What you can do
Run endpoint designs for binary, continuous and survival outcomes, including sample size calculation and group-sequential boundaries via gsDesign/gsDesign2. Set up multi-hypothesis designs with co-primary endpoints, multiple populations and graphical multiplicity control. Validate and benchmark designs and verify computed designs against expectations. Generate design reports from the computed results. Each tool call spawns an Rscript subprocess and exchanges JSON, taking roughly 300 ms plus R compute time.
When to use it
Useful when a statistician or clinical researcher wants an assistant to draft and check Phase 2 or Phase 3 confirmatory trial designs, sample sizes, sequential monitoring boundaries and multiplicity adjustments without leaving the chat.
Requirements
Runs locally over stdio as an npm package (clinical-trial-design) and needs Node.js plus a working R installation with Rscript on the PATH. DESIGNR_RSCRIPT can point to a specific Rscript binary and DESIGNR_LAUNCHER can override the bundled launcher.R. No authentication or API keys are declared.
Before you install
Designs are statistical computations, not regulatory advice; results should be reviewed by a qualified statistician before use. The server spawns local R processes with a 60-second timeout, and the two environment variables let you redirect which R script and launcher are executed, so only point them at trusted files.

Installation

In SourceWeft

  1. Open Clinical Trial Design in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

clinical-trial-design MCP server

TypeScript MCP server that exposes the ClinicalTrialDesign R package as 9 trial-design tools over stdio (3 endpoint + 3 multi-hypothesis + 3 meta). One Rscript subprocess per tool call, JSON roundtrip, ~300 ms per call + R compute. Covers Phase 2 and Phase 3 confirmatory designs.

Published to npm as clinical-trial-design and to the official MCP registry as io.github.wei-ai-lab/clinical-trial-design.

Tools

See the top-level README for the full tool surface, SMOKE.md for the 18-prompt smoke matrix, and PUBLISH.md for the npm + registry publish steps.

Build

bash
npm install                  # pulls dev dependencies (esbuild, typescript)npm run build                # esbuild bundle → dist/index.js (the publish artifact)npm run build:dev            # tsc → build/*.js per-file (used by the smoke script)

The server is wired from the top-level .claude-plugin/plugin.json:

json
"mcpServers": { "clinical-trial-design": { "command": "node", "args": ["mcp-server/dist/index.js"] } }

Smoke pass

bash
npm run build:dev            # required: smoke imports from build/r-bridge.jsnode scripts/smoke.mjs

Expected: 18 pass / 0 fail / 18 total. The R sources are loaded directly by r/inst/launcher.R (or ../r-package/ClinicalTrialDesign/inst/launcher.R in dev); no remotes::install_local step required.

Environment

  • DESIGNR_RSCRIPT — full path to Rscript if not on PATH.
  • DESIGNR_LAUNCHER — full path to launcher.R if you need to override the default. Wire-format identifier preserved as a stability commitment (see API_STABILITY.md).

Layout

src/  index.ts                         # McpServer + stdio transport; registers 9 tools  r-bridge.ts                      # spawns Rscript, JSON roundtrip, 60s timeout  tools/    common-schemas.ts              # shared zod fragments + ReasoningChainSchema    design-binary.ts               # endpoint design (3 tools)    design-continuous.ts    design-survival.ts    design-co-primary.ts           # multi-hypothesis (3 tools)    design-multi-population.ts    design-graphical-multiplicity.ts    validate-benchmark.ts          # meta (3 tools)    verify-design.ts    design-report.tsscripts/  smoke.mjs                        # programmatic 18-prompt smoke passr/                                 # R sources staged for the npm tarball  R/*.R  inst/launcher.R  DESCRIPTION  NAMESPACE

Source: mcp-server/README.md at commit 9d1e7c9

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.0.12LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Clinical integrations