Knowledge Graph Causal Discovery MCP avatar

Knowledge Graph Causal Discovery MCP

Pricing

Pay per event + usage

Go to Apify Store
Knowledge Graph Causal Discovery MCP

Knowledge Graph Causal Discovery MCP

Construct causal graphs from multi-domain data, apply do-calculus reasoning, and estimate causal effects via semiparametric methods -- all through a single MCP interface.

Pricing

Pay per event + usage

Rating

0.0

(0)

Developer

ryan clinton

ryan clinton

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Share

Knowledge Graph Causal Discovery MCP Server

Construct causal graphs from multi-domain data, apply do-calculus reasoning, and estimate causal effects via semiparametric methods -- all through a single MCP interface. This server orchestrates 17 Apify actors across academic, biomedical, regulatory, economic, and safety data sources, then applies rigorous causal inference algorithms including FCI structure discovery, TMLE estimation, RotatE knowledge graph embeddings, and sheaf cohomology consistency checking. Every tool returns structured scoring with mathematical foundations.

What data can you access?

Data PointSourceCoverage
Academic papers and citationsOpenAlex, Semantic Scholar, CrossrefGlobal research output
Preprints and open accessArXiv, COREPhysics, CS, biology, math
Biomedical literaturePubMed36M+ biomedical citations
Clinical trialsClinicalTrials.gov450K+ registered trials
NIH research grantsNIH ReporterActive and historical NIH funding
Drug adverse eventsOpenFDAFDA adverse event reports
Federal regulationsFederal RegisterUS regulatory actions
Congressional legislationCongress.govBills and resolutions
Government datasetsData.govFederal open data
Economic indicatorsFREDFederal Reserve economic data
World development indicatorsWorld Bank200+ country indicators
Product recallsCPSCConsumer product safety recalls
Consumer complaintsCFPBFinancial consumer complaints
Encyclopedia contextWikipediaBackground knowledge

MCP Tools

ToolPriceDescription
discover_causal_structure$0.10Discover causal structure via FCI with KCI tests and GES scored by BIC. Returns directed/bidirectional edges, Markov equivalence class, and BIC score.
compute_interventional_effects$0.10Compute P(Y|do(X)) via do-calculus with back-door/front-door criteria and Balke-Pearl LP bounds for unidentified effects.
simulate_counterfactuals$0.10Simulate counterfactual outcomes via twin network method. Returns probability of necessity (PN) and sufficiency (PS) with monotonicity checks.
extract_causal_claims_literature$0.10Extract causal claims from academic literature via NLP pattern matching and evidence level classification (RCT, observational, case study, review).
embed_causal_knowledge_graph$0.10Embed causal knowledge graph via RotatE complex-valued embeddings. Returns entity embeddings, link prediction metrics (MRR, Hits@10), and clusters.
estimate_causal_effect_tmle$0.10Estimate causal effects via TMLE with Super Learner ensemble. Returns ATE, influence function norms, and cross-validated risk.
check_graph_consistency$0.10Check causal graph consistency via sheaf cohomology. Tests acyclicity, faithfulness, causal sufficiency, instrument validity, and Markov compatibility.
attribute_source_contribution$0.10Attribute data source contributions to causal graph quality via Shapley values. Returns marginal contributions, nucleolus, and core stability.

Data Sources

  • OpenAlex -- Open scholarly metadata covering 250M+ works with citation graphs and author disambiguation
  • Semantic Scholar -- AI-powered academic search with citation context and influential citation detection
  • Crossref -- DOI registration agency with 150M+ metadata records and reference linking
  • ArXiv -- Open access preprint server for physics, mathematics, computer science, and quantitative biology
  • CORE -- Aggregator of 300M+ open access research papers from repositories worldwide
  • PubMed -- MEDLINE biomedical literature database with MeSH indexing and structured abstracts
  • ClinicalTrials.gov -- Registry of 450K+ clinical studies with protocol details and outcome data
  • NIH Reporter -- NIH-funded research grants with investigator, institution, and project details
  • OpenFDA Drug Events -- FDA adverse event reporting system (FAERS) for drug safety surveillance
  • Federal Register -- Daily journal of US government regulatory actions and proposed rules
  • Congress Bill Tracker -- Legislative tracking for bills, resolutions, and amendments in Congress
  • Data.gov -- Federal open data platform with 300K+ government datasets
  • FRED Economic Data -- Federal Reserve economic time series including GDP, inflation, employment, and rates
  • World Bank Data -- Development indicators across 200+ countries covering health, economics, and infrastructure
  • CPSC Recall Search -- Consumer Product Safety Commission recall notices and safety alerts
  • CFPB Complaints -- Consumer Financial Protection Bureau complaint database with company responses
  • Wikipedia -- Encyclopedia articles providing background context and entity descriptions

How the scoring works

Each tool applies a specific causal inference algorithm to the knowledge graph built from multi-source data.

Structure discovery uses FCI (Fast Causal Inference) tolerant of latent confounders, combined with GES (Greedy Equivalence Search) scored by BIC. Additive noise model orientation uses HSIC independence between residuals and cause.

Interventional effects apply Pearl's three do-calculus rules and the ID algorithm. Back-door and front-door adjustment criteria identify estimable effects. Balke-Pearl LP bounds constrain unidentified effects via linear programming.

Counterfactual simulation uses the twin network method with factual world (X=x, Y=y) and counterfactual world (X=x') sharing exogenous variables. Tian-Pearl monotonicity bounds are validated.

TMLE estimation follows the targeted maximum likelihood pipeline: Super Learner initial estimate, propensity score with positivity truncation, clever covariate, targeting step, and influence-function-based confidence intervals.

Score DimensionRangeInterpretation
BIC ScoreLower is betterModel fit quality for causal structure
Branching Ratio0.0 - 1.0Stability of causal graph (< 1 = stable)
ATE (Average Treatment Effect)VariesEstimated causal effect magnitude
MRR (Mean Reciprocal Rank)0.0 - 1.0Knowledge graph embedding quality
Shapley Value0.0 - 1.0Data source contribution proportion

How to connect this MCP server

Claude Desktop

Add to your claude_desktop_config.json:

{
"mcpServers": {
"knowledge-graph-causal-discovery": {
"url": "https://knowledge-graph-causal-discovery-mcp.apify.actor/mcp"
}
}
}

Programmatic (cURL)

curl -X POST https://knowledge-graph-causal-discovery-mcp.apify.actor/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"discover_causal_structure","arguments":{"query":"smoking lung cancer","sources":["academic","biomedical"]}},"id":1}'

Other MCP clients

This server works with any MCP-compatible client including Cursor, Windsurf, Cline, and custom MCP integrations. Point your client to the endpoint https://knowledge-graph-causal-discovery-mcp.apify.actor/mcp.

Use cases for causal discovery intelligence

Drug safety signal detection

Discover causal links between pharmaceutical compounds and adverse events by combining PubMed literature, clinical trial data, and FDA adverse event reports into a unified causal graph.

Policy impact assessment

Estimate the causal effect of regulatory interventions on economic outcomes by combining Federal Register rules, FRED economic indicators, and World Bank development data.

Systematic review automation

Extract and classify causal claims across thousands of academic papers, detecting conflicting evidence and grading claim strength from RCTs down to case studies.

Knowledge graph completion

Use RotatE embeddings to predict missing causal links in biomedical knowledge graphs, identifying undiscovered drug-disease or gene-pathway relationships.

Data source prioritization

Apply Shapley value attribution to determine which data sources contribute most to causal inference quality, guiding data acquisition and budget allocation decisions.

Treatment effect estimation

Use TMLE with Super Learner ensembles to estimate average treatment effects from observational data, producing doubly-robust confidence intervals.

How much does it cost?

This MCP uses pay-per-event pricing. You are only charged when a tool is called.

Each tool call costs $0.10. The Apify Free plan includes $5 of monthly platform credits, enough for approximately 50 causal discovery queries per month.

Usage ExampleEstimated Cost
Single causal structure discovery$0.10
Full pipeline (structure + intervention + counterfactual)$0.30
Literature review with claim extraction$0.10
Source attribution analysis across all 5 domains$0.10

How it works

  1. Tool call received -- Your MCP client sends a query with optional source category selection (academic, biomedical, regulatory, economic, safety).
  2. Parallel actor execution -- Up to 17 Apify actors run simultaneously across selected source categories, fetching papers, trials, regulations, economic indicators, and safety data.
  3. Knowledge graph construction -- Results are merged into a unified causal knowledge graph with nodes (entities, variables, concepts) and edges (causal claims, correlations, references).
  4. Algorithm application -- The requested causal inference algorithm is applied: FCI/GES for structure, do-calculus for interventions, twin networks for counterfactuals, TMLE for estimation, RotatE for embeddings, or sheaf cohomology for consistency.
  5. Structured response -- Results are returned as structured JSON with scores, confidence metrics, and supporting evidence.

FAQ

Q: How fresh is the data? A: All data is fetched live at query time from each source API. Results reflect the current state of OpenAlex, PubMed, FRED, and all other databases.

Q: Can I select which data sources to use? A: Yes. Every tool accepts a sources parameter with options: academic, biomedical, regulatory, economic, and safety. You can use any combination.

Q: What is the difference between the structure discovery and interventional tools? A: Structure discovery finds the causal graph (which variables cause which). Interventional effects compute what happens when you force a variable to a specific value. Use structure discovery first, then interventional analysis.

Q: Is this a replacement for randomized controlled trials? A: No. This provides causal inference from observational data and literature synthesis. It identifies causal hypotheses and estimates effects, but observational causal inference has inherent limitations compared to experimental designs.

Q: Is it legal to use this data? A: All data sources are publicly available APIs and open databases. See Apify's guide on web scraping legality.

Q: Can I combine this with other MCP servers? A: Yes. Use this MCP for causal analysis, then feed findings into other intelligence MCPs for domain-specific risk scoring or monitoring.

MCP ServerFocus
ryanclinton/open-source-supply-chain-risk-mcpOSS dependency risk and vulnerability propagation
ryanclinton/market-microstructure-manipulation-mcpMarket manipulation detection with Granger causality
ryanclinton/litigation-intelligence-mcpPre-litigation risk scoring from regulatory signals

Integrations

This MCP server runs on the Apify platform and integrates with the broader Apify ecosystem:

  • Apify API -- Call this MCP programmatically from any language via the Apify API
  • Scheduling -- Set up recurring causal analysis runs on a schedule
  • Webhooks -- Trigger downstream workflows when causal analysis completes
  • Integrations -- Connect to Slack, Zapier, Make, or any webhook-compatible service for automated alerts