JUHE API Marketplace
lesong36 avatar
MCP Server

DoWhy MCP v2.0

A server providing rigorous causal inference tools through the Model Context Protocol (MCP), offering 42 specialized causal analysis tools that cover modeling, effect estimation, attribution, root cause analysis, counterfactuals, and sensitivity analysis.

1
GitHub Stars
11/17/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. dowhy_mcp

README Documentation

DoWhy MCP v2.0 - Rigorous Causal Inference Tools

๐ŸŽฏ Project Vision

DoWhy MCP v2.0 is a complete rewrite of the DoWhy MCP server, designed to provide rigorous, theoretically-grounded causal inference tools through the Model Context Protocol (MCP). This version matches the scientific rigor and theoretical depth of the official DoWhy library.

๐Ÿ”ฌ Theoretical Foundation

Built on the solid theoretical foundations of:

  • Structural Causal Models (SCM) - Pearl's causal hierarchy
  • Graphical Causal Models (GCM) - Modern causal discovery and inference
  • Potential Outcomes Framework - Rubin's causal model
  • Do-Calculus - Formal causal reasoning

๐Ÿš€ Key Features

โœ… What's New in v2.0

  • ๐Ÿงฎ Rigorous Statistical Inference: True Bootstrap confidence intervals, not noise simulation
  • ๐Ÿ” Comprehensive Sensitivity Analysis: Full suite of refutation tests and E-value analysis
  • ๐Ÿ“Š Complete Causal Toolkit: 42 specialized tools covering all DoWhy functionality
  • ๐ŸŽฏ Theoretical Rigor: Every method backed by solid causal inference theory
  • โšก Performance Optimized: Efficient implementation with proper error handling
  • ๐Ÿ“ˆ Advanced Visualization: Causal graphs, attribution plots, and diagnostic charts

๐Ÿ› ๏ธ Complete Tool Categories

  1. Modeling Tools (6 tools)

    • Causal graph construction and validation
    • Structural and Graphical Causal Models
    • Causal mechanism learning
  2. Causal Effect Estimation (10 tools)

    • Backdoor, frontdoor, and IV identification
    • Linear regression, PSM, doubly robust, DML
    • Causal forests and TMLE
  3. Causal Influence Quantification (6 tools)

    • Shapley value attribution
    • Direct and total causal influence
    • Path-specific effects
  4. Root Cause Analysis (5 tools)

    • Anomaly attribution
    • Distribution change attribution
    • Causal chain tracing
  5. Counterfactual Analysis (6 tools)

    • Individual and population counterfactuals
    • Intervention simulation
    • What-if scenario analysis
  6. Sensitivity Analysis (6 tools)

    • Unobserved confounder analysis
    • Comprehensive refutation tests
    • E-value and tipping point analysis
  7. Causal Discovery (3 tools)

    • PC, GES, and FCM algorithms
    • Structure learning from data

๐Ÿ“‹ Installation

# Install from source (development)
git clone https://github.com/dowhy-mcp/dowhy-mcp-v2.git
cd dowhy-mcp-v2
pip install -e ".[dev]"

# Install from PyPI (when released)
pip install dowhy-mcp-v2

๐Ÿ”ง Quick Start

from dowhy_mcp_v2 import DoWhyCausalAnalyzer

# Initialize analyzer
analyzer = DoWhyCausalAnalyzer()

# Estimate causal effect with full rigor
result = analyzer.estimate_causal_effect(
    data="data.csv",
    treatment="intervention",
    outcome="result",
    confounders=["age", "gender", "income"],
    method="doubly_robust",
    bootstrap_samples=1000,
    sensitivity_analysis=True
)

# Get comprehensive results
print(f"Causal Effect: {result.causal_effect:.4f}")
print(f"95% CI: [{result.confidence_interval[0]:.4f}, {result.confidence_interval[1]:.4f}]")
print(f"P-value: {result.p_value:.4f}")
print(f"Robustness Score: {result.robustness_score:.2f}")

๐Ÿ—๏ธ Architecture

DoWhy MCP v2.0
โ”œโ”€โ”€ Core Engine              # Causal inference engine
โ”‚   โ”œโ”€โ”€ Model Builder       # SCM/GCM construction
โ”‚   โ”œโ”€โ”€ Inference Engine    # Causal reasoning
โ”‚   โ””โ”€โ”€ Validation Framework # Result verification
โ”œโ”€โ”€ Tool Modules            # 42 specialized tools
โ”‚   โ”œโ”€โ”€ Modeling           # Graph and model tools
โ”‚   โ”œโ”€โ”€ Estimation         # Effect estimation
โ”‚   โ”œโ”€โ”€ Attribution        # Influence quantification
โ”‚   โ”œโ”€โ”€ Root Cause         # Anomaly analysis
โ”‚   โ”œโ”€โ”€ Counterfactual     # What-if analysis
โ”‚   โ”œโ”€โ”€ Sensitivity        # Robustness testing
โ”‚   โ””โ”€โ”€ Discovery          # Structure learning
โ””โ”€โ”€ MCP Interface          # Protocol integration

๐Ÿ“Š Comparison with v1.0

Featurev1.0v2.0
Theoretical RigorBasicโœ… Complete
Bootstrap CIโŒ Fake noiseโœ… True Bootstrap
Sensitivity AnalysisโŒ Simplifiedโœ… Comprehensive
Causal GraphsโŒ Limitedโœ… Full Support
Tool Count4 basic42 rigorous
Statistical TestsโŒ Missingโœ… Complete Suite
Error HandlingโŒ Basicโœ… Robust
DocumentationโŒ Minimalโœ… Comprehensive

๐Ÿงช Testing & Validation

  • Unit Tests: 95%+ coverage with rigorous testing
  • Integration Tests: End-to-end workflow validation
  • Benchmark Tests: Performance and accuracy benchmarks
  • Theoretical Tests: Validation against known causal results

๐Ÿ“š Documentation

  • ๐Ÿ“– User Guide
  • ๐Ÿ”ฌ Theoretical Background
  • ๐Ÿ› ๏ธ API Reference
  • ๐Ÿ“ Examples

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • DoWhy Team for the foundational causal inference library
  • Judea Pearl for causal inference theory
  • Microsoft Research for DoWhy development

๐Ÿ“ž Support

  • ๐Ÿ› Report Issues
  • ๐Ÿ’ฌ Discussions
  • ๐Ÿ“ง Email: support@dowhy-mcp.org

DoWhy MCP v2.0 - Where Rigorous Science Meets Practical Application

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright ยฉ 2025 - All rights reserved