Skip to content
MCP server
RegistryRemote

DAG Studio MCP Server

Causal DAG analysis: backdoor paths, adjustment sets, bias simulation. Validated against dagitty.

DAG Studio MCP scores 66 (Good), licensed Apache-2.0 and written in JavaScript. It can be reached as a remote MCP endpoint. It declares 9 tools. Filed under Uncategorized. GitHub shows 0 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by black-swan-causal-labsApache-2.0JavaScript0 stars
Trust score
66Good
Trust score 66 of 100, Good

Good trust

66 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: apache-2.0.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 66 comes from

22 + 20 + 0 + 10 + 4 + 10 = 66. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Remote auth: API key required. Get a key or token from the provider first, then add it as a header in your client config. How remote auth works

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "black-swan-causal-labs-dagstudio-mcp": {      "url": "https://dagstudio-mcp.blackswancausallabs.com/mcp"    }  }}

Environment variables

This server does not declare environment variables.

Tools9Tool docs quality grade C

All capabilities
  • Backdoor paths, minimal sufficient adjustment sets, identifiability

  • Validate a proposed adjustment set: sufficiency (blocks every backdoor path) plus adjustment for mediators, colliders, and descendants of exposure

  • Classify effect-modifier structure (direct, indirect, proxy, common-cause, pure interaction)

  • Empirical bias of an adjustment strategy against the simulated truth

  • R / Python analysis code for a DAG, plus a one-click DAG Studio URL

  • Canonical teaching DAGs (confounding, M-bias, frontdoor, and others)

  • Parse dagitty DSL (raw or R-wrapped) into the structured DAG model

  • Simulate data from a DAG under user-specified structural coefficients

  • Run the full canonical validation suite and report engine version

About

dag-studio-mcp

CI License: Apache 2.0

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

ToolWhat it does
analyze_dagBackdoor paths, minimal sufficient adjustment sets, identifiability
parse_dagittyParse dagitty DSL (raw or R-wrapped) into the structured DAG model
generate_codeR / Python analysis code for a DAG, plus a one-click DAG Studio URL
check_overadjustmentValidate a proposed adjustment set: sufficiency (blocks every backdoor path) plus adjustment for mediators, colliders, and descendants of exposure
simulate_dataSimulate data from a DAG under user-specified structural coefficients
compute_biasEmpirical bias of an adjustment strategy against the simulated truth
classify_effect_modificationClassify effect-modifier structure (direct, indirect, proxy, common-cause, pure interaction)
get_canonical_exampleCanonical teaching DAGs (confounding, M-bias, frontdoor, and others)
validate_engineRun the full canonical validation suite and report engine version

Input and output conventions worth knowing:

  • dagitty input. Tools that take a dagitty_string accept the bare DSL (dag { ... }, as exported by dagitty.net) or the R call (dagitty('dag { ... }')), with quoted node names, chains, and {A B} groups. A bidirected edge (A <-> B) is converted to an explicit latent common cause and reported as an INPUT_REWRITTEN flag. Undirected edges and anything else that cannot be represented as a DAG are errors; no statement is dropped silently.
  • Canonical DAG input. Node ids must be unique and every edge must reference a declared node. Declare unmeasured variables as nodes with type: "latent".
  • check_overadjustment. ok is true only when the set is a valid adjustment set: it blocks every backdoor path (sufficient) and has no overadjustment problem. Paths left open are listed in open_backdoor_paths.
  • Large DAGs. Identifiability is decided exactly at any size within the input caps. When there are too many eligible covariates to enumerate every subset, analyze_dag returns valid, irreducible sets and raises IDENT_CANDIDATES_TRUNCATED to say the list is not exhaustive.

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.
  • A randomized concordance check (npm run concordance:fuzz) compares the engine with dagitty on several thousand seeded random DAGs and parser round-trips. Both checks run in CI on every push.
  • 107 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):

https://dagstudio-mcp.blackswancausallabs.com/mcp

Access is token-gated during the trial period. Request a token at jdiazdecaro@blackswancausallabs.com. 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 mcp add --transport http dag-studio \
  https://dagstudio-mcp.blackswancausallabs.com/mcp \
  --header "Authorization: Bearer <your token>"

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 dependencies
  • src/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 use
  • ci/: release-gate concordance harness against vendored dagitty
  • tests/: unit and integration tests (npm test)
  • MCP_REQUIREMENTS.md: the v1 specification
  • FDA_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

npm install
npm test                  # full suite
npm run dev               # stdio server via tsx
npm run worker:typecheck  # worker bundle typecheck
npm run worker:deploy     # deploy (stamps engine_version from git HEAD first)

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.

Frequently asked questions

What is DAG Studio MCP Server?

Causal DAG analysis: backdoor paths, adjustment sets, bias simulation. Validated against dagitty.

How do I install DAG Studio MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. DAG Studio MCP Server connects to the remote endpoint https://dagstudio-mcp.blackswancausallabs.com/mcp, so there is nothing to install locally.

Is DAG Studio MCP Server free and open source?

Yes. DAG Studio MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does DAG Studio MCP Server support remote (HTTP) connections?

Yes. DAG Studio MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.

What tools does DAG Studio MCP Server provide?

DAG Studio MCP Server provides 9 tools, including analyze_dag, check_overadjustment, classify_effect_modification, and compute_bias. See the full tool list for descriptions and parameters.

How is DAG Studio MCP Server's trust score calculated?

DAG Studio MCP Server scores 66 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server