Skip to main content
Glama

RootCause MCP - Clinical Causality & Teaching Design MCP Server

πŸ₯ AI-guided causal analysis, feedback-loop modeling, and teaching-case construction for healthcare quality improvement

Python 3.12+ MCP License GitHub Tools

English | δΈ­ζ–‡η‰ˆ

🎯 Vision

Enable AI Agents to move in both directions of causality:

  • from clinical incidents β†’ structured, traceable root cause analysis

  • from root causes β†’ learner-ready lesson plans for medical education

RootCause MCP supports three categories of analysis models through Domain Cartridges:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      RootCause MCP                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚
β”‚  β”‚ PROSPECTIVE β”‚  β”‚RETROSPECTIVEβ”‚  β”‚   SYSTEMIC  β”‚             β”‚
β”‚  β”‚  Proactive  β”‚  β”‚Investigationβ”‚  β”‚  Complexity β”‚             β”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€             β”‚
β”‚  β”‚ β€’ HFMEA     β”‚  β”‚ β€’ HFACS  βœ… β”‚  β”‚ β€’ STAMP/STPAβ”‚             β”‚
β”‚  β”‚ β€’ HVA       β”‚  β”‚ β€’ 5-Whys βœ… β”‚  β”‚ β€’ FRAM      β”‚             β”‚
β”‚  β”‚ β€’ Bowtie    β”‚  β”‚ β€’ Fishboneβœ…β”‚  β”‚ β€’ AcciMap   β”‚             β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚                          β–Ό                                      β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚              β”‚   Unified Graph API   β”‚                          β”‚
β”‚              β”‚    (21 MCP Tools)     β”‚                          β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ Core Features

Retrospective Cartridge (Implemented βœ…)

Feature

Description

Status

🐟 Fishbone (6M)

Healthcare-specialized Ishikawa diagram

βœ… 4 tools

πŸ” 5-Why Analysis

Deep cause exploration with Proximate/Ultimate classification

βœ… 4 tools

πŸ” Bidirectional Causality

Cross-links, escalation loops, and feedback cycle modeling

βœ… 1 tool

πŸŽ“ Teaching Case Builder

Convert RCA chains into medical student lesson plans

βœ… 1 tool

πŸ“Š HFACS-MES

Human Factors Analysis auto-suggestion (5-level, 25 categories)

βœ… 6 tools

βœ… Causation Verify

Bradford Hill criteria-based verification

βœ… 1 tool

πŸ”— 6M-HFACS Mapping

Cross-reference between taxonomies

βœ… 1 tool

πŸ’Ύ Session Management

Persistent analysis sessions

βœ… 4 tools

Prospective Cartridge (Planned πŸ“‹)

  • HFMEA - Healthcare Failure Mode and Effect Analysis

  • HVA - Hazard Vulnerability Analysis

  • Bowtie - Threat and consequence analysis

Systemic Cartridge (Planned πŸ“‹)

  • STAMP/STPA - Control loop analysis

  • FRAM - Functional Resonance Analysis Method

πŸ”§ Available Tools

HFACS Tools (6)

Tool

Description

rc_suggest_hfacs

Auto-suggest HFACS codes from cause description

rc_confirm_classification

Confirm or override HFACS classification

rc_get_hfacs_framework

Get full HFACS-MES framework structure

rc_list_learned_rules

List learned classification rules

rc_reload_rules

Hot-reload YAML rules

rc_get_6m_hfacs_mapping

Get 6M-HFACS cross-reference table

Session Tools (4)

Tool

Description

rc_start_session

Create new RCA session

rc_get_session

Get session details

rc_list_sessions

List all sessions

rc_archive_session

Archive completed session

Fishbone Tools (4)

Tool

Description

rc_init_fishbone

Initialize fishbone diagram

rc_add_cause

Add cause to 6M category

rc_get_fishbone

Get fishbone structure

rc_export_fishbone

Export as Mermaid/Markdown/JSON

Why Tree Tools (6)

Tool

Description

rc_ask_why

Progressive 5-Why questioning

rc_get_why_tree

Get Why tree structure

rc_mark_root_cause

Mark node as root cause

rc_export_why_tree

Export as Mermaid/Markdown/JSON

rc_add_causal_link

Add feedback loops and bidirectional causal links

rc_build_teaching_case

Build a teaching-ready lesson plan from an RCA chain

Verification Tools (1)

Tool

Description

rc_verify_causation

Verify causation with 4-criteria test

πŸš€ Quick Start

# Install with uv (recommended)
uv pip install -e .

# Or development mode
uv pip install -e ".[dev]"

# Run MCP Server
python -m rootcause_mcp.interface.server

VS Code Integration

Add to your .vscode/mcp.json:

{
  "servers": {
    "rootcause-mcp": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "python", "-m", "rootcause_mcp.interface.server"],
      "cwd": "${workspaceFolder}"
    }
  }
}

πŸ“ Project Structure

rootcause-mcp/
β”œβ”€β”€ src/rootcause_mcp/
β”‚   β”œβ”€β”€ domain/           # Domain Layer (DDD)
β”‚   β”‚   β”œβ”€β”€ entities/     # Session, Cause, Fishbone, WhyNode
β”‚   β”‚   β”œβ”€β”€ value_objects/# HFACSCode, Scores, Identifiers
β”‚   β”‚   β”œβ”€β”€ repositories/ # Repository interfaces
β”‚   β”‚   └── services/     # HFACSSuggester, CausationValidator
β”‚   β”œβ”€β”€ application/      # Application Layer
β”‚   β”‚   β”œβ”€β”€ session_progress_tracker.py
β”‚   β”‚   └── guided_response_builder.py
β”‚   β”œβ”€β”€ infrastructure/   # Infrastructure Layer
β”‚   β”‚   └── persistence/  # SQLite + SQLModel
β”‚   └── interface/        # Interface Layer
β”‚       β”œβ”€β”€ tools/        # MCP Tool definitions
β”‚       β”œβ”€β”€ handlers/     # Tool handlers
β”‚       └── server.py     # MCP Server entry
β”œβ”€β”€ config/hfacs/         # YAML configurations
β”‚   β”œβ”€β”€ hfacs_mes.yaml    # HFACS-MES framework
β”‚   β”œβ”€β”€ fishbone_6m.yaml  # Healthcare 6M categories
β”‚   └── keyword_rules.yaml# Classification rules
β”œβ”€β”€ tests/                # Test suites
β”œβ”€β”€ docs/                 # Documentation
β”‚   └── spec_v2.md        # Full specification v2.5.0
└── memory-bank/          # Project memory (for AI)

MCP

Purpose

Integration

asset-aware-mcp

Data decomposition & table refactoring

Pre-processing

HHRAG MCP

Knowledge graph retrieval

Context enrichment

CGU MCP

Creative divergent thinking

Cause brainstorming

πŸ“š Documentation

πŸ”§ Development

# Run tests
pytest tests/ -v

# Code linting
ruff check src tests
mypy src --strict

# Security scan
bandit -r src

# Dead code detection
vulture src

🀝 Contributing

Contributions welcome! Please see CONTRIBUTING.md.

πŸ“„ License

Apache 2.0 License - See LICENSE


Made with ❀️ for Healthcare Quality Improvement

Install Server
A
license - permissive license
A
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/u9401066/rootcause-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server