Skip to main content
MCP server CX Codex

DAG Studio MCP — Claude Code MCP server: what it does

An MCP server for causal DAG analysis: it finds backdoor paths, adjustment sets, and simulated bias when you need to test an identification strategy.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http dag-studio-mcp https://dagstudio-mcp.blackswancausallabs.com/mcp
Open on GitHub

What DAG Studio MCP does

DAG Studio MCP gives an AI agent access to a causal-analysis engine. Its tools parse dagitty syntax, inspect backdoor paths, find minimal sufficient adjustment sets, and flag adjustment for mediators, colliders, or exposure descendants. Other tools produce R or Python analysis code, simulate data from structural coefficients, and measure empirical bias against the simulated truth.

The server also provides canonical teaching DAGs, effect-modification classification, and a full engine validation run. Responses include an engine version, a concordance attestation, severity-coded diagnostics, and method references. Validation compares the engine with Pearl’s theory, dagitty, DAG Studio results, and simulated bias checks. The hosted endpoint runs as a Cloudflare Worker and is token-gated during the trial period, so requests need a token.

For local work, the repository uses npm install, npm test, and npm run dev; the server is built on the TypeScript MCP SDK. The remote endpoint can be added to Claude Code, Codex, Cursor, GitHub Copilot, or Gemini CLI. The project is licensed under Apache-2.0.

What it helps with

  • trace backdoor paths in a causal DAG
  • choose a minimal adjustment set
  • flag mediator and collider overadjustment
  • simulate data from structural coefficients
  • measure bias from an adjustment strategy

Example prompts for the agent

  • Use analyze_dag to inspect this causal graph and find its backdoor paths.
  • Parse this dagitty definition with parse_dagitty, then create Python analysis code with generate_code.
  • Simulate data from these structural coefficients and measure the adjustment bias with simulate_data and compute_bias.

How to install DAG Studio MCP

Platform CLI: remote server

claude mcp add --transport http dag-studio-mcp https://dagstudio-mcp.blackswancausallabs.com/mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about DAG Studio MCP

How do I install DAG Studio MCP in Claude Code?

Run claude mcp add --transport http dag-studio-mcp https://dagstudio-mcp.blackswancausallabs.com/mcp. The hosted endpoint also requires a token.

What does DAG Studio MCP do?

It lets an agent construct and inspect causal DAGs, identify adjustment sets, check overadjustment, simulate data, and generate R or Python code. Its analysis responses include validation and diagnostic details.

Does the hosted server require a token?

Yes. Access is token-gated during the trial period. Clients can send the token as a bearer header or through the ?token= query parameter.

Similar MCP servers

All MCP servers for Science and research →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor