
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

A hosted MCP server that builds causal knowledge graphs from multi-domain research sources and applies causal inference algorithms through eight tools.
Knowledge Graph Causal Discovery MCP Server is cataloged as an MCP server attributed to apifyforge. A hosted MCP server that builds causal knowledge graphs from multi-domain research sources and applies causal inference algorithms through eight tools. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Knowledge Graph Causal Discovery MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Up to 17 actors run in parallel depending on selected source categories: academic triggers 6, biomedical 4, regulatory 3, economic 2, and safety 2.
No. It provides observational causal inference relying on untestable assumptions and identifies causal hypotheses rather than generating experimental evidence.
Data is fetched live at query time from each source API with no cached index.
README.md · 279cf03770ba · Fetched 2026-11-13 12:10:52 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
Add to your MCP client (Claude Desktop, Cursor, Windsurf):
{
"mcpServers": {
"knowledge-graph-causal-discovery-mcp": {
"url": "https://ryanclinton--knowledge-graph-causal-discovery-mcp.apify.actor/mcp"
}
}
}
Knowledge graph causal discovery over multi-domain research data, delivered through a single Model Context Protocol interface. This MCP server is built for researchers, data scientists, and AI agents that need to go beyond correlation — discovering directed causal structure, estimating treatment effects, and reasoning about counterfactuals from the published literature and public datasets.
The server orchestrates 17 Apify actors in parallel across five source domains — academic, biomedical, regulatory, economic, and safety — assembling the results into a unified causal knowledge graph. Eight specialized tools then apply rigorous causal inference algorithms: FCI skeleton learning, GES with BIC scoring, Pearl's do-calculus with the ID algorithm, twin network counterfactuals, TMLE estimation, RotatE knowledge graph embeddings, sheaf cohomology consistency checking, and Shapley source attribution. Every tool call returns structured JSON with mathematical scores and supporting evidence.
| Data Point | Source | Coverage |
|---|---|---|
| 📄 Academic papers and citations | OpenAlex, Semantic Scholar, Crossref | 250M+ scholarly works with citation graphs |
| 📑 Preprints and open access | arXiv, CORE | Physics, CS, quantitative biology, math |
| 🧬 Biomedical literature | PubMed | 36M+ citations with MeSH indexing |
| 🏥 Clinical trials | ClinicalTrials.gov | 450K+ registered studies with protocol data |
| 💊 Drug adverse event reports | OpenFDA | FDA FAERS pharmacovigilance database |
| 🔬 NIH research grants | NIH Reporter | Active and historical funded projects |
| 📜 Federal regulations | Federal Register | US regulatory actions and proposed rules |
| 🏛️ Congressional legislation | Congress.gov | Bills, resolutions, and amendments |
| 🗂️ Government datasets | Data.gov | 300K+ federal open data assets |
| 📈 Economic time series | FRED | Federal Reserve GDP, inflation, employment |
| 🌍 World development indicators | World Bank | 200+ country development metrics |
| ⚠️ Product recall notices | CPSC | Consumer product safety recall database |
| 💬 Consumer complaints | CFPB | Financial protection complaint records |
| 📖 Encyclopedia context | Wikipedia | Background knowledge and concept disambiguation |
Assembling a causal inference pipeline from scratch requires integrating a dozen data sources, implementing graph construction logic, and coding algorithms that span three decades of academic literature. A typical research team spending a week on this still ends up with a pipeline that covers two or three data domains at best.
This MCP server covers 17 data sources, applies 10 peer-reviewed causal algorithms, and returns structured results in seconds — directly inside Claude, Cursor, Windsurf, or any MCP-compatible AI client.
| Tool | Price | Algorithm | Best for |
|---|---|---|---|
discover_causal_structure | $0.045 | FCI + GES + additive noise model | Initial causal graph structure from observational data |
compute_interventional_effects | $0.050 | Pearl's do-calculus + ID algorithm + Balke-Pearl LP | Policy evaluation, treatment planning, intervention design |
simulate_counterfactuals | $0.045 | Twin network method + Tian-Pearl bounds | "What if" analysis, legal causation, necessity/sufficiency |
extract_causal_claims_literature | $0.035 | NLP pattern matching + evidence classification | Systematic reviews, evidence synthesis, claim auditing |
embed_causal_knowledge_graph | $0.040 | RotatE complex-valued embeddings | Link prediction, entity similarity, pathway discovery |
estimate_causal_effect_tmle | $0.050 | TMLE + Super Learner ensemble + influence function CI | Semiparametric ATE estimation with doubly-robust CI |
check_graph_consistency | $0.035 | Sheaf cohomology H¹(G,F) | Validating causal assumptions, identifiability checks |
attribute_source_contribution | $0.040 | Shapley values + nucleolus + core stability | Data source prioritization, budget allocation |
Pharmacovigilance teams combine PubMed biomedical literature, ClinicalTrials.gov outcome data, and FDA adverse event reports into a single causal graph. The discover_causal_structure tool identifies directed edges between compounds and adverse outcomes. The compute_interventional_effects tool estimates P(adverse event | do(prescribe drug)) using back-door adjustment on confounders sourced from NIH grant data and OpenAlex citations.
Policy analysts estimate causal effects of regulatory interventions on economic outcomes by combining Federal Register rules, FRED economic time series, and World Bank development indicators. The estimate_causal_effect_tmle tool applies TMLE with Super Learner to produce doubly-robust average treatment effect estimates with 95% confidence intervals from the influence function — going beyond naive before/after comparison.
Literature reviewers use extract_causal_claims_literature to scan thousands of academic papers across OpenAlex, Semantic Scholar, Crossref, arXiv, and CORE simultaneously. Claims are classified by strength (strong/moderate/weak/correlational) and evidence level (RCT/observational/case study/review). Conflicting claims across sources are flagged automatically, replacing weeks of manual screening.
Legal teams and regulators assessing causation in product liability or pharmaceutical harm cases use simulate_counterfactuals to compute the Probability of Necessity (PN = P(Y_x'=0 | X=x, Y=y)) and Probability of Sufficiency (PS = P(Y_x=1 | X=x', Y=0)) via the twin network method. Tian-Pearl monotonicity bounds are validated to constrain the counterfactual probabilities.
AI research teams use embed_causal_knowledge_graph to generate RotatE complex-valued entity embeddings where relations are unit-modulus rotations in complex space (t = h · r, |r_i| = 1). MRR and Hits@10 link prediction metrics identify missing drug-disease or gene-pathway edges. Self-adversarial negative sampling with margin gamma ensures high-quality embeddings even in sparse graph regions.
Research operations teams with limited budgets use attribute_source_contribution to calculate Shapley values for each data domain (academic, biomedical, regulatory, economic, safety). The Shapley allocation phi_i quantifies each source's marginal contribution to causal graph quality across all subsets. Nucleolus computation and core non-emptiness check confirm allocation stability before committing to data subscriptions.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"knowledge-graph-causal-discovery": {
"url": "https://knowledge-graph-causal-discovery-mcp.apify.actor/mcp",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
}
}
}
}
Add the MCP endpoint in your editor's MCP settings panel:
https://knowledge-graph-causal-discovery-mcp.apify.actor/mcpimport anthropic
client = anthropic.Anthropic()
# The MCP server exposes 8 tools — ask Claude to use them
response = client.messages.create(
model="claude-opus-4-5",
max_tokens=4096,
tools=[{
"type": "custom",
"name": "discover_causal_structure",
# Claude resolves this via the connected MCP server
}],
messages=[{
"role": "user",
"content": "Discover the causal structure linking smoking exposure to lung cancer outcomes using academic and biomedical sources."
}],
mcp_servers=[{
"url": "https://knowledge-graph-causal-discovery-mcp.apify.actor/mcp",
"authorization_token": "YOUR_APIFY_TOKEN"
}]
)
print(response.content)
# Discover causal structure
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 mortality",
"sources": ["academic", "biomedical"]
}
},
"id": 1
}'
# Estimate treatment effect via TMLE
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": "estimate_causal_effect_tmle",
"arguments": {
"query": "statin therapy cardiovascular mortality reduction",
"sources": ["academic", "biomedical", "regulatory"]
}
},
"id": 2
}'
discover_causal_structureDiscovers causal graph structure from observational data using three combined algorithms:
Returns: directed and bidirectional edges, Markov equivalence class size, BIC score, p-values per edge.
Price: $0.045 per call. Calls up to 10 actors for academic + biomedical sources.
compute_interventional_effectsComputes P(Y | do(X)) — the distribution of Y under intervention on X — via Pearl's do-calculus:
Returns: do-effects with adjustment sets, identifiability flags, LP bound intervals.
Price: $0.050 per call.
simulate_counterfactualsSimulates counterfactual outcomes via the structural twin network method:
Returns: PN and PS per outcome pair, twin network size, monotonicity check result.
Price: $0.045 per call.
extract_causal_claims_literatureExtracts and classifies causal claims from academic literature via NLP pattern matching:
Draws from OpenAlex, Semantic Scholar, Crossref, arXiv, CORE (academic), and PubMed, ClinicalTrials.gov, NIH Grants, OpenFDA (biomedical) depending on selected sources.
Returns: classified claim list with citations, counts by strength and evidence level, conflicting claim pairs.
Price: $0.035 per call.
embed_causal_knowledge_graphEmbeds the causal knowledge graph using RotatE, a complex-valued knowledge graph embedding model:
Returns: entity embeddings with norms and nearest neighbours, MRR (Mean Reciprocal Rank), Hits@10, cluster labels, phase range.
Price: $0.040 per call.
estimate_causal_effect_tmleEstimates average treatment effects via TMLE (Targeted Maximum Likelihood Estimation) following the semiparametric efficiency pipeline:
Returns: ATE per treatment-outcome pair, standard error, 95% CI, influence function norm, cross-validated risk, Super Learner weights.
Price: $0.050 per call.
check_graph_consistencyChecks causal graph consistency using sheaf cohomology over the graph structure:
Returns: pass/fail per check with violation counts, H¹ cohomology dimension, global section existence flag.
Price: $0.035 per call.
attribute_source_contributionAttributes each data source's contribution to causal graph quality via cooperative game theory:
Best used with all five source categories to get meaningful attribution across the full coalition space.
Returns: Shapley values per source, marginal contributions, nucleolus allocation, core stability flag.
Price: $0.040 per call.
discover_causal_structure — smoking and lung cancer{
"nodeCount": 94,
"edgeCount": 187,
"relations": [
{
"cause": "Cigarette smoking and lung adenocarcinoma risk: a pooled analysis",
"effect": "Lung cancer incidence in never-smokers vs. ever-smokers cohort",
"edgeType": "causes",
"strength": 0.74,
"pValue": 0.003,
"method": "FCI-KCI"
},
{
"cause": "KRAS mutation frequency in tobacco-exposed lung tissue",
"effect": "Non-small-cell lung carcinoma progression",
"edgeType": "causes",
"strength": 0.61,
"pValue": 0.011,
"method": "GES-BIC"
},
{
"cause": "Secondhand smoke exposure biomarker cotinine",
"effect": "Lung cancer incidence in never-smokers vs. ever-smokers cohort",
"edgeType": "bidirectional",
"strength": 0.43,
"pValue": 0.048,
"method": "additive-noise-HSIC"
}
],
"totalEdges": 187,
"directedEdges": 141,
"bidirectionalEdges": 46,
"markovEquivalenceSize": 12,
"bicScore": -4823.7
}
estimate_causal_effect_tmle — statin therapy and cardiovascular mortality{
"nodeCount": 112,
"estimates": [
{
"treatment": "High-intensity statin therapy (atorvastatin 40-80mg)",
"outcome": "Major adverse cardiovascular events at 5 years",
"ate": -0.082,
"standardError": 0.019,
"confidenceInterval": [-0.119, -0.045],
"influenceFunctionNorm": 0.041
},
{
"treatment": "High-intensity statin therapy (atorvastatin 40-80mg)",
"outcome": "All-cause mortality",
"ate": -0.031,
"standardError": 0.014,
"confidenceInterval": [-0.058, -0.004],
"influenceFunctionNorm": 0.028
}
],
"significantCount": 2,
"averageATE": -0.056,
"crossValidatedRisk": 0.113,
"superLearnerWeights": {
"logistic": 0.34,
"randomForest": 0.41,
"xgboost": 0.25
}
}
simulate_counterfactuals — treatment necessity and sufficiency{
"nodeCount": 87,
"outcomes": [
{
"factual": "Patient received antihypertensive therapy (X=1), experienced stroke (Y=1)",
"counterfactual": "Patient did not receive antihypertensive therapy (X=0)",
"factualValue": 1.0,
"counterfactualValue": 0.0,
"probabilityOfNecessity": 0.71,
"probabilityOfSufficiency": 0.38
}
],
"twinNetworkSize": 174,
"averagePN": 0.71,
"averagePS": 0.38,
"monotonicityHolds": true
}
check_graph_consistency — causal assumption validation{
"nodeCount": 94,
"edgeCount": 187,
"checks": [
{ "check": "acyclicity", "passed": true, "violationCount": 0, "details": "No directed cycles detected" },
{ "check": "faithfulness", "passed": true, "violationCount": 2, "details": "2 near-cancelling paths detected" },
{ "check": "causal_sufficiency", "passed": false, "violationCount": 7, "details": "7 bidirectional edges suggest latent confounders" },
{ "check": "instrument_validity", "passed": true, "violationCount": 0, "details": "NIH grant instruments satisfy exclusion restriction" },
{ "check": "positivity", "passed": true, "violationCount": 0, "details": "Propensity scores in [0.04, 0.96]" },
{ "check": "markov_compatibility", "passed": true, "violationCount": 1, "details": "1 d-separation violation" }
],
"totalChecks": 6,
"passedChecks": 5,
"sheafCohomologyDim": 3,
"globalSectionExists": false
}
This MCP uses pay-per-event pricing — you are charged only when a tool is called. Platform compute costs are included.
| Tool | Price per call | 10 calls | 50 calls |
|---|---|---|---|
discover_causal_structure | $0.045 | $0.45 | $2.25 |
compute_interventional_effects | $0.050 | $0.50 | $2.50 |
simulate_counterfactuals | $0.045 | $0.45 | $2.25 |
extract_causal_claims_literature | $0.035 | $0.35 | $1.75 |
embed_causal_knowledge_graph | $0.040 | $0.40 | $2.00 |
estimate_causal_effect_tmle | $0.050 | $0.50 | $2.50 |
check_graph_consistency | $0.035 | $0.35 | $1.75 |
attribute_source_contribution | $0.040 | $0.40 | $2.00 |
Full 8-tool pipeline per query: $0.34. Running the complete causal discovery pipeline daily for a month costs approximately $10.
Apify's free plan includes $5 of monthly platform credits, which covers roughly 14 full-pipeline runs at no cost.
You can set a maximum spending limit per session in your Apify account to prevent unexpected charges. The MCP server stops charging and returns an error message if your event limit is reached.
When a tool is called, the server identifies which source categories are requested (academic, biomedical, regulatory, economic, safety) and constructs a call list of up to 17 actor invocations:
All actors run via Promise.all — parallel, not sequential. Each actor has a 180-second timeout. A failed actor returns an empty array rather than failing the entire request, ensuring partial results are always returned.
Results from all actors are merged into a typed causal graph (CausalGraph). Nodes are classified by domain signals:
intervention nodesoutcome nodesconfounder nodes (background knowledge)instrument nodes (funding as instrumental variable)intervention nodesconfounder and variable nodes respectivelyEdges are built from domain heuristics: interventions connect to outcomes with causal weights; confounders connect to both interventions and outcomes; instruments connect to their intervention targets. Variable-to-variable edges are oriented by the additive noise model: HSIC(residual, X) vs HSIC(residual, Y) determines direction.
The requested algorithm is applied to the constructed graph:
Results are serialised to JSON and returned via the MCP protocol. Every response includes nodeCount and edgeCount from the constructed graph, plus the algorithm-specific metrics.
Start with discover_causal_structure before interventional tools. The FCI/GES structure output tells you which adjustment sets are valid for do-calculus. Running compute_interventional_effects without knowing the graph structure risks incorrect confounder adjustment.
Use academic + biomedical sources as your baseline. These two categories trigger 10 actors and cover the densest evidence base. Add regulatory for policy questions, economic for macroeconomic analyses, and safety for product harm or financial misconduct queries.
For counterfactual and legal causation work, use check_graph_consistency first. The sheaf cohomology check confirms whether the graph satisfies causal sufficiency and instrument validity — two assumptions that simulate_counterfactuals relies on for valid PN/PS estimates.
Run attribute_source_contribution with all five sources to get meaningful Shapley values. With fewer than three sources, the coalition game has too few subsets to produce stable marginal contributions. The nucleolus calculation requires at least three active players.
For systematic reviews, extract_causal_claims_literature with academic + biomedical is the most cost-effective entry point at $0.035 per call. Use the returned conflicting claim pairs to identify which relationships need deeper structure discovery or TMLE estimation.
Phrase queries as domain-variable pairs for best graph construction: "smoking lung cancer" rather than "does smoking cause cancer?" The graph builder identifies causal nodes from result titles, and specific entity names produce cleaner node classification.
For rare or niche topics, add academic and include arXiv/CORE by selecting all academic sources — preprint servers often have earlier causal evidence than indexed journals for fast-moving research areas.
Combine tools in a pipeline for full causal analysis: discover_causal_structure → check_graph_consistency → compute_interventional_effects → estimate_causal_effect_tmle. Total pipeline cost: $0.18 per complete analysis.
| MCP Server | How to combine |
|---|---|
| ryanclinton/market-microstructure-manipulation-mcp | Feed causal structure output into market microstructure analysis; Granger causality in that MCP complements Pearl-style do-calculus here |
| ryanclinton/litigation-intelligence-mcp | Use counterfactual PN/PS scores as inputs to pre-litigation risk scoring; necessary causation probability is a key legal standard |
| ryanclinton/open-source-supply-chain-risk-mcp | Use causal structure discovery to identify which OSS dependencies causally propagate vulnerabilities vs. correlate with them |
| ryanclinton/esg-risk-assessment-mcp | Combine regulatory causal graphs with ESG risk scoring to distinguish causal regulatory exposure from correlated industry effects |
| ryanclinton/drug-pipeline-intelligence-mcp | Feed TMLE treatment effect estimates into drug pipeline analysis to supplement trial data with observational causal evidence |
academic and biomedical sources which have global coverage.How many data sources does a single causal discovery query touch?
Up to 17 actors run in parallel depending on which source categories you select. The academic category triggers 6 actors (OpenAlex, Semantic Scholar, Crossref, arXiv, CORE, Wikipedia). biomedical triggers 4 (PubMed, ClinicalTrials.gov, NIH Grants, OpenFDA). regulatory triggers 3, economic 2, and safety 2. Selecting all five categories runs all 17 actors simultaneously.
How is this different from a standard literature review tool or RAG pipeline? Standard literature review tools return ranked documents. This server constructs a typed causal graph from those documents and applies formal causal inference algorithms — FCI, do-calculus, twin networks, TMLE — to extract directional causal relationships, not just associations. The output is mathematical causal structure, not retrieved text.
How fresh is the data returned? All data is fetched live at query time from each source API. There is no cached index. Results reflect the current state of OpenAlex, PubMed, FRED, and the other databases at the moment of the call.
Can I use only one or two source categories to reduce cost?
Yes. Every tool accepts a sources array with any combination of academic, biomedical, regulatory, economic, and safety. Using only academic + biomedical is sufficient for most research questions and is the default for all tools except attribute_source_contribution.
What does a Shapley value of 0.4 for biomedical sources mean?
It means biomedical data sources (PubMed, ClinicalTrials.gov, NIH Grants, OpenFDA) contribute 40% of the total causal graph quality, measured as the average marginal contribution of that data domain across all possible subsets of the five source categories.
Is it legal to use the data from these sources? All 17 sources are publicly available APIs and open government databases. PubMed, ClinicalTrials.gov, FDA, FRED, World Bank, and the others are free public resources. See Apify's guide on web scraping legality.
Can this replace a randomised controlled trial?
No. TMLE and do-calculus provide observational causal inference, which relies on assumptions (no unmeasured confounding, positivity, consistency) that are untestable from data alone. The tools identify causal hypotheses and estimate effect sizes from observational evidence — they do not generate experimental evidence. The check_graph_consistency tool explicitly flags violations of causal sufficiency and other key assumptions.
How long does a typical tool call take?
Most tool calls complete in 20–60 seconds. Time depends on source category selection — academic + biomedical (10 actors) typically takes 25–45 seconds; all five categories (17 actors) may take 45–90 seconds. Actor timeouts are set to 180 seconds per source.
Can I use this with a custom MCP client or agent framework?
Yes. The server implements the standard MCP protocol at /mcp. Any client that supports MCP — including Cursor, Windsurf, Cline, custom Python MCP clients, or LangChain agent frameworks — can connect to https://knowledge-graph-causal-discovery-mcp.apify.actor/mcp.
What happens if a data source is temporarily unavailable?
Individual actor failures return empty arrays rather than propagating errors. The graph is built from available sources, and the causal algorithm runs on the reduced graph. The response always includes nodeCount and edgeCount so you can verify graph density and re-run with different sources if needed.
Can I run structure discovery and TMLE estimation on the same query to cross-validate results?
Yes, and this is the recommended workflow for high-stakes analyses. discover_causal_structure identifies the graph topology and adjustment sets. estimate_causal_effect_tmle uses that topology to select valid confounders for the Super Learner and propensity model. Running both costs $0.095.
Does the server support streaming responses for long-running queries? The server uses the Streamable HTTP transport from the MCP SDK, which supports streaming. MCP clients that implement streaming (including Claude Desktop) will receive incremental updates during long-running actor calls.
If you encounter unexpected results or errors, enable run sharing so we can diagnose issues faster:
This lets us see your run details when something goes wrong. Your data is visible only to the actor developer, not publicly.
Found a bug or need a feature? Open an issue in the Issues tab on this actor's page. For custom causal inference configurations, domain-specific ontology integration, or enterprise deployments, reach out through the Apify platform.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Knowledge Graph Causal Discovery MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/knowledge-graph-causal-discovery-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.