real-world-mcp
실증 데이터 및 임상 타당성 MCP 서버
저장소: Krv-Labs/how-to-train-your-dragon
종단 청구 데이터(Komodo)와 공개 레지스트리(ClinicalTrials.gov)를 기반으로 그레이브스병 프로토콜(NCT07570316)에 대해 12개월당 예상 무작위 배정 대상자 수로 미국 의료 기관을 순위화하며, AI 에이전트를 위한 대화형 모델 컨텍스트 프로토콜(MCP) 서버로 제공됩니다.
Python 패키지는 httyd이며, MCP 서버는 real-world-mcp 로 등록됩니다. CLI 진입점: httyd, realworld-mcp, how-to-train-your-dragon.
이름의 유래? Komodo Health 청구 데이터를 기반으로 구축 — 코모도 드래곤을 길들이고 훈련시켜 실행 가능한 타당성 모델로 만듭니다.
1. 아키텍처 및 패키지 구조
how-to-train-your-dragon/
├── httyd/ # Main Python package
│ ├── models/ # L1–L5 parameters, provenance registry, recruitment math
│ ├── analysis/ # Scoring pipeline, catchment, accrual, site linkage
│ ├── data/ # Dataset catalog, loaders, CTG fetch
│ ├── evaluations/ # Temporal holdout validation
│ ├── auth/ # Kubernetes token auth & scope enforcement
│ ├── engine.py # In-memory FeasibilityEngine singleton
│ ├── cache.py # Precomputed site/geo cache loader
│ └── server.py # MCP server (16 tools, 4 resources, 2 prompts)
├── ui/ # Local observation dashboard (offline HTML)
│ ├── build_dashboard.py
│ └── (writes to output/site_feasibility.html)
├── data/ # Claims & registry assets (not committed — see below)
├── docs/ # Methodology, scoring review, evidence
├── deploy/helm/httyd/ # GKE Helm chart
├── scripts/precompute.py # Build startup cache (Docker + local dev)
├── tests/
├── pyproject.toml
└── README.md데이터 참고: Komodo 청구 CSV 파일은 gitignore 처리됩니다. data/nct07570316_sites.json(실측 픽스처)만 커밋됩니다. 엔진을 실행하기 전에 라이선스 데이터 파일을 로컬 data/ 디렉토리에 배치하세요.
방법론 및 검증 근거: docs/README.md.
2. 빠른 시작
설치
uv sync사전 계산 캐시 (권장)
전체 국가 점수 재구축에는 약 90초가 소요됩니다. 한 번 사전 계산하고 재사용하세요:
uv run python scripts/precompute.py
export REALWORLD_CACHE_DIR=./cache # optional; defaults to ./cache when present테스트 실행
REALWORLD_CACHE_DIR=./cache uv run pytest일부 테스트(민감도 재점수, 검증)는 전체 재구축을 트리거하며 총 약 2분이 소요됩니다.
MCP 서버 시작
# stdio transport (default — Claude Desktop, Cursor)
uv run httyd
# streamable-http (local dev)
AUTH_ENABLED=false REALWORLD_CACHE_DIR=./cache uv run httyd streamable-http
curl http://localhost:8080/health로컬 미리보기 대시보드 생성
uv run python ui/build_dashboard.py
open output/site_feasibility.html3. MCP 도구 표면
real-world-mcp는 6개 영역에 걸쳐 16개 도구를 제공합니다:
A. 데이터셋 탐색 및 검사
list_datasets,describe_dataset,get_cohort_summary
B. 모델 레지스트리 및 출처
list_models,get_provenance
C. 사이트 검색 및 심층 분석
search_and_score_sites,get_site_details,explain_site_score
D. 공간적 유입 구역 및 바스켓 최적화
compute_basket_catchment,find_nearby_competitors
E. 누적 예측 및 민감도
simulate_accrual_timeline,update_interim_accrual,compute_sensitivity_rescore,match_trial_facility
F. 검증 및 한계
run_model_validation,get_model_limitations
4. MCP 에이전트 구성
{
"mcpServers": {
"real-world-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/how-to-train-your-dragon",
"run",
"httyd"
],
"env": {
"REALWORLD_CACHE_DIR": "/path/to/how-to-train-your-dragon/cache"
}
}
}
}5. GKE 내부 배포
내부 ClusterIP MCP 서비스로 배포합니다. 하위 에이전트 포드는 TokenReview API를 통해 검증된 Kubernetes ServiceAccount 토큰으로 인증합니다.
아키텍처
전송: 포트 8080의
/mcp에서streamable-http인증: Bearer 토큰 = 투영된 ServiceAccount 토큰 (
audience: httyd)권한 부여: ConfigMap이
system:serviceaccount:<ns>:<name>→ 범위로 매핑네트워크: NetworkPolicy는
httyd-client: "true"로 표시된 네임스페이스에서만 인그레스를 허용
범위 | 접근 권한 |
| 탐색, 검색, 설명, 출처 도구 |
| 누적 시뮬레이션, 민감도 재점수, 바스켓 유입구역 |
빌드 및 배포
docker build -t httyd:0.1.0 .
helm upgrade --install httyd deploy/helm/httyd \
-n realworld --create-namespace \
--set image.repository=REGION-docker.pkg.dev/PROJECT/REPO/httyd \
--set image.tag=0.1.0배포 전에 deploy/helm/httyd/scopes.yaml에서 하위 에이전트 ServiceAccount를 등록하세요.
하위 에이전트 포드 구성
kubectl label namespace app httyd-client=trueserviceAccountName: subagent-feasibility-reader
volumes:
- name: mcp-token
projected:
sources:
- serviceAccountToken:
audience: httyd
expirationSeconds: 3600
path: token
volumeMounts:
- name: mcp-token
mountPath: /var/run/secrets/tokens
readOnly: true
env:
- name: HTTYD_MCP_URL
value: "http://httyd.httyd.svc:8080/mcp"
- name: HTTYD_MCP_TOKEN_FILE
value: "/var/run/secrets/tokens/token"환경 변수
변수 | 기본값 | 용도 |
|
| K8s 토큰 인증 활성화 |
|
| OAuth 리소스 식별자 |
|
| SA → 범위 매핑 |
|
| 예상 토큰 대상 |
|
| 사전 계산된 사이트/지리 JSON |
|
| HTTP 수신 포트 |
|
| HTTP 바인딩 주소 |
|
| 무상태 MCP 세션 (K8s 권장) |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Physician-reviewed medical opinions and prescriptions for AI agents.
Guardrailed FHIR access for AI agents: PHI redaction, audit trail, step-up auth, tenant isolation
FDA and CMS evidence for AI medical devices: 510(k), postmarket, reimbursement, and compliance.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Krv-Labs/how-to-train-your-dragon'
If you have feedback or need assistance with the MCP directory API, please join our Discord server