
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 申请编号和产品名称解析为药品、生物制品和医疗器械的监管元数据。