
DAG Studio MCP
com.blackswancausallabs由 blackswancausallabs.com 發布官方發布者v0.1.0更新於 Oct 25, 2026
Causal DAG analysis: backdoor paths, adjustment sets, bias simulation. Validated against dagitty.
概覽
用於因果 DAG 分析的遠端 MCP 伺服器:建構並驗證有向無環圖、尋找調整集、模擬偏誤。
- 可以做什麼
- 分析 DAG 的後門路徑、最小充分調整集與可識別性,並檢查對中介變數、對撞變數及暴露後代的過度調整。將 dagitty DSL(原始或 R 包裝形式)解析為結構化 DAG 模型。為 DAG 產生 R 或 Python 分析程式碼及 DAG Studio 連結。依指定的結構係數模擬資料,並計算某種調整策略的經驗偏誤。判定效應修飾結構,並取得經典教學 DAG。執行標準驗證套件並回報引擎版本。
- 適用情境
- 適合流行病學、因果推論與真實世界證據工作,讓助理在分析前釐清混雜、選擇調整集或檢查 DAG。也適合講解混雜、M 偏誤與前門準則等教學範例。
- 執行需求
- 遠端 Streamable HTTP 端點,無需本機安裝。需要試用 bearer 權杖,透過 Authorization 標頭或 token 查詢參數傳遞;需向提供方以電子郵件申請。需要能連線至該託管端點的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 DAG Studio MCP,將其新增到工作區。
- 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/com.blackswancausallabs%2Fdagstudio-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"dag-studio": {
"type": "http",
"url": "https://dagstudio-mcp.blackswancausallabs.com/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
dag-studio-mcp
Model Context Protocol (MCP) server for the DAG Studio causal-inference engine. It lets AI agents construct, analyze, and validate causal directed acyclic graphs (DAGs) using the same engine that powers the DAG Studio canvas.
Built and maintained by Black Swan Causal Labs. Listed in the RWE MCP Registry.
Tools
Every analytical response carries an engine_version stamp, a concordance attestation, a diagnostics block with severity-coded flags, and citations to the underlying methods literature.
Validation
The engine is validated four ways for coherence: against Pearl (2009) theory, against the reference implementation dagitty (Textor et al. 2016), against DAG Studio's own analytical results, and empirically via compute_bias on simulated data.
- 35 canonical cases: T01 to T15 (structural identification) and EM01 to EM20 (effect modification), runnable live via
validate_engine. - A release-gate concordance check runs the engine head-to-head against dagitty (vendored at upstream commit
7a65777) and stamps the attestation surfaced in tool responses. - 93 unit and integration tests across the engine bindings, the tool layer, and the auth gate.
Hosted endpoint
The server runs as a Cloudflare Worker (Streamable HTTP):
Access is token-gated during the trial period. Request a token at [email protected]. Tokens are accepted either as a bearer header or as a ?token= query parameter (the query form exists for clients whose connector UI cannot set custom headers, such as the Claude.ai web connector).
Claude Code:
Claude.ai web: add a custom connector pointed at https://dagstudio-mcp.blackswancausallabs.com/mcp?token=<your token>.
Repository layout
dag-engine.js/dag-engine.d.ts: the analytical engine, a pure ESM module with no runtime dependenciessrc/tools/: one file per tool, each exporting{ InputSchema, OutputSchema, descriptor, handler }src/worker/: Cloudflare Worker transport and the token gate (auth.ts)src/index.ts: stdio entry point for local useci/: release-gate concordance harness against vendored dagittytests/: unit and integration tests (npm test)MCP_REQUIREMENTS.md: the v1 specificationFDA_GUIDANCE_ALIGNMENT.md: mapping of DAG Studio capabilities onto FDA draft RWE guidance protocol elements
The engine is developed alongside the DAG Studio canvas app and the vendored copy here is synced at release time. This repository is self-contained: clone it, npm install, and everything builds and tests without further setup.
Development
For interactive inspection: npx @modelcontextprotocol/inspector.
Protocol status
Built on @modelcontextprotocol/sdk (TypeScript). Current against the finalized MCP specification revision 2025-11-25. Migration to the 2026-07-28 revision is planned once stable SDK support ships.
License
Apache License 2.0 (see LICENSE).
Exception: ci/dagitty-src/ contains the dagitty reference engine (GPL-2.0, Textor et al.), vendored at upstream commit 7a65777 solely as a release-time CI fixture for the concordance check. It retains its own license, is excluded from the published npm package, and is not part of the deployed worker bundle.
來源:README.md,提交 97f3693
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Blackswancausallabs 整合

NHANES (design-correct survey analysis)
com.blackswancausallabs
一個本機 MCP 伺服器,讓助理依調查設計正確分析 NHANES 資料,自動處理權重、合併週期、信賴區間與 NCHS 可靠度標記。

DAG Studio WebMCP
由 GitHub 帳號 Black-Swan-Causal-Labs 發布
透過結構化工具讀取並編輯 DAG Studio 中即時運作的因果圖,並提供分析、程式碼產生與模擬功能。

TARGET Checklist MCP
com.blackswancausallabs
依 TARGET 指引的 21 個項目,評估目標試驗模擬研究的報告完整程度,輸出逐項、附證據的檢核清單矩陣。

ROBINS-I V2 MCP
com.blackswancausallabs
一個本機 MCP 伺服器,對非隨機追蹤或世代研究的某一結果執行確定性的 ROBINS-I V2 偏差風險評估。

openFDA Regulatory Metadata
com.blackswancausallabs
一個本機 MCP 伺服器,透過 openFDA API 將 FDA 申請編號與產品名稱解析為藥品、生物製劑與醫療器材的監管中繼資料。