An MCP server built with Arcade.dev that monitors clinical trials from ClinicalTrials.gov, manages watchlists in Google Sheets, and delivers digest emails via Gmail.
Built with Arcade's three-layer pattern:
- Data Source — ClinicalTrials.gov API v2
- Memory Layer — Google Sheets via Arcade's
GoogleSheets.*integrations - Presentation Layer — Gmail via
Gmail.SendEmail+ Linear viaLinear.CreateIssue
- Search clinical trials by condition, status, and phase
- Track trials in a Google Sheets watchlist (auto-created or existing)
- Monitor watchlisted trials for status changes and new results
- Digest — generate HTML/text summaries of trial updates
- Email — send digests via Gmail through Arcade
- Pipeline — one-click end-to-end: read watchlist, check updates, generate digest, update sheet, send email
- Linear — create tickets for trials with new results
- Agent Team — designed for Claude Code multi-agent orchestration (Scout, Memory, Analyst, Dispatcher)
# Install dependencies
cd clinical_trials_tracker
uv sync
# Set up environment
cp src/clinical_trials_tracker/.env.example .env
# Edit .env and add your ARCADE_API_KEY
# Run the UI dashboard
uv run uvicorn ui_server:app --port 5555
# Open http://localhost:5555
# Or run as MCP server (for Claude Code)
uv run src/clinical_trials_tracker/server.pyThe browser UI at localhost:5555 has 7 tabs:
| Tab | Description |
|---|---|
| Search | Find trials by condition with card/JSON view |
| Details | Full trial info by NCT ID |
| Results | Outcome measures + adverse events for completed trials |
| Updates | Batch-check multiple trials for changes |
| Watchlist | Add/load/update a Google Sheets watchlist |
| Pipeline | Run the full monitoring pipeline (sheet + email) |
| Linear | Create tickets via Arcade |
10 tools available via the MCP server:
search_trials— search by condition, status, phaseget_trial_details— comprehensive trial data by NCT IDget_trial_results— outcome measures and adverse eventscheck_trials_for_updates— batch status/results check
save_trial_to_watchlist— add trial to a Google Sheets watchlistget_watchlist— read all tracked trialsupdate_watchlist— refresh watchlist against ClinicalTrials.gov
generate_digest— format updates as HTML or textsend_digest_email— send via Gmail through Arcade
run_monitoring_pipeline— full pipeline: read sheet, check CT.gov, generate digest, update sheet, send email
Designed for Claude Code's multi-agent orchestration:
Claude (team lead)
+-- Scout -> search_trials, check_trials_for_updates
+-- Memory -> save_trial_to_watchlist, get_watchlist, update_watchlist
+-- Analyst -> get_trial_details, get_trial_results, generate_digest
+-- Dispatcher -> send_digest_email, Linear ticket creation
See CLAUDE.md for detailed agent documentation, tool parameters, and example prompts.
Browser (localhost:5555)
| POST /api/*
v
FastAPI (ui_server.py) ---- 12 endpoints (1 GET + 11 POST)
| direct import
v
MCP Tools (server.py) ---- 10 tools
| \
| httpx \ arcadepy
v v
ClinicalTrials.gov Arcade API
API v2 | \
v v
Google Sheets Gmail / Linear
View the interactive architecture diagram at localhost:5555/static/architecture.html.
| Variable | Required | Default | Description |
|---|---|---|---|
ARCADE_API_KEY |
Yes | — | Your Arcade API key |
ARCADE_USER_ID |
No | support@whryter.com |
User ID for Arcade OAuth |
Google Sheets and Gmail require OAuth authorization through Arcade. On first use:
- The tool automatically triggers the OAuth flow
- Opens a Google authorization URL
- Polls for completion (up to 2 minutes)
- Retries the tool call after authorization
- Backend: Python 3.12, FastAPI, httpx, arcade-mcp-server, arcadepy
- Frontend: Vanilla HTML/CSS/JS (no build step)
- APIs: ClinicalTrials.gov v2, Arcade, Google Sheets, Gmail, Linear
- Tooling: uv, hatchling, ruff, mypy